library/src/exploitation/WebExploitation/BP-WebExploitationXss.cc
// Runs XSS Tests against an anchor
Runs XSS Tests against an anchor
Runs XSS Tests against an anchor
P_BP_WEB_XSS_TEST_RESULT BP_XSSRunTestsAgainstAnchor
(
		P_BP_WEB_XSS_TEST     tests,
		P_BP_HTML_ANCHOR_LIST anchor,
		P_BP_HTTP_SESSION     session,
		BP_XSS_ATTACK_LEVEL   attackLevel,
		size_t                secondsBetweenTest,
		size_t                maxTests
)
{
	if(!tests || !anchor || !session)
		return NULL;
	if(!anchor->vars)
		return NULL;
	P_BP_HTML_ANCHOR_VAR_LIST tmpVars = anchor->vars;
	size_t anchorVarCount = 0;
	for
	(
		tmpVars = tmpVars->first;
		tmpVars;
		tmpVars = tmpVars->next
	)
	{
		anchorVarCount++;
	}
	if(anchorVarCount == 0)
		return NULL;
	char *attackAnchor = NULL;
	int i = 0;
	int x = 0;
	size_t testCount = 0;
	for
	(
		i = 0;
		i < testCount;
		i++
	)
	{
		for
		(
			x = 0;
			x < anchorVarCount;
			x++
		)
		{}
	}
	return NULL;
}
P_BP_WEB_XSS_TEST_RESULT BP_XSSRunTestsAgainstAnchor ( P_BP_WEB_XSS_TEST tests , P_BP_HTML_ANCHOR_LIST anchor , P_BP_HTTP_SESSION session , BP_XSS_ATTACK_LEVEL attackLevel , size_t secondsBetweenTest , size_t maxTests ) { if ( ! tests || ! anchor || ! session ) return NULL ; if ( ! anchor -> vars ) return NULL ; P_BP_HTML_ANCHOR_VAR_LIST tmpVars = anchor -> vars ; size_t anchorVarCount = 0 ; for ( tmpVars = tmpVars -> first ; tmpVars ; tmpVars = tmpVars -> next ) { anchorVarCount ++ ; } if ( anchorVarCount == 0 ) return NULL ; char * attackAnchor = NULL ; int i = 0 ; int x = 0 ; size_t testCount = 0 ; for ( i = 0 ; i < testCount ; i ++ ) { for ( x = 0 ; x < anchorVarCount ; x ++ ) { } } return NULL ; }
Runs XSS Tests against an anchor
Runs XSS Tests against an anchor
// NULL Checks // Make sure the anchor has vars // Count the number of variables in the anchor // make sure we have injectable parameters // get number of tests // size_t testCount = sizeof(xssTests) / sizeof(BP_WEB_XSS_TEST); // get number of variables // Attack anchor (realloced in loop with new values) // XSS Variable Loop Counter // walk the xss tests // one test per anchor element /*
		// Anchor Structure
		typedef struct _BP_HTML_ANCHOR_LIST{

			// anchor number
			size_t num;

			// anchor leads offsite, TRUE/FALSE
			size_t offsite;

			// delimiter set used to extract variables from the string
			P_BP_HTML_ANCHOR_DELIMITERS delims;

			// RAW unparsed href
			char * href;

			// Anchor Protocol
			BP_ANCHOR_PROTO proto;

			// bpstrnduped protocol string
			char * protoStr;

			// All embedded variables found in the string
			P_BP_HTML_ANCHOR_VAR_LIST vars;

			// Anchor Path relative to site rootdir
			char * relativePath;

			// Linked List Pointers
			struct _BP_HTML_ANCHOR_LIST *first;
			struct _BP_HTML_ANCHOR_LIST *prev;
			struct _BP_HTML_ANCHOR_LIST *next;

		} BP_HTML_ANCHOR_LIST, *P_BP_HTML_ANCHOR_LIST;
*/