library/src/exploitation/WebExploitation/BP-WebExploitation.cc
// XSS: Checks a web assessment to see if it contains a vulnerabile form input.  If so, it looks up the
// form action (aka target page), and returns the HTML form property structure that contains its value/size.
// Returns null on failure.
Checks a web assessment to see if it contains a vulnerabile form input.  If so, it looks up the
form action (aka target page), and returns the HTML form property structure that contains its value/size.
Returns null on failure.
Checks a web assessment to see if it contains a vulnerabile form input . If so it looks up the form action ( aka target page ) and returns the HTML form property structure that contains its value / size . Returns null on failure .
P_BP_HTML_FORM_PROPERTY_LIST BP_GetVulnerableFormActionPropertyXSS(P_BP_WEB_XSS_TEST_RESULT xss)
{
	if(!xss)
		return NULL;
	if(!xss->form)
		return NULL;
	P_BP_HTML_FORM_PROPERTY_LIST fprops = xss->form->properties;
	if(!fprops)
		return NULL;
	for
	(
		fprops = fprops->first;
		fprops;
		fprops = fprops->next
	)
	{
		if( ! BP_strncasecmp(fprops->name, "action", bpstrlen("action")) )
		{
			return fprops;
		}
	}
	return NULL;
}
P_BP_HTML_FORM_PROPERTY_LIST BP_GetVulnerableFormActionPropertyXSS ( P_BP_WEB_XSS_TEST_RESULT xss ) { if ( ! xss ) return NULL ; if ( ! xss -> form ) return NULL ; P_BP_HTML_FORM_PROPERTY_LIST fprops = xss -> form -> properties ; if ( ! fprops ) return NULL ; for ( fprops = fprops -> first ; fprops ; fprops = fprops -> next ) { if ( ! BP_strncasecmp ( fprops -> name , " " , bpstrlen ( " " ) ) ) { return fprops ; } } return NULL ; }
XSS: Checks a web assessment to see if it contains a vulnerabile form input.
XSS : Checks a web assessment to see if it contains a vulnerabile form input .
// ensure we have an xss parameter // ensure we have a form // set the form properties // return null if we have no form properties // walk property list and check for action property // didn't find an action, exit with null for failure