library/src/decoders/HTML/BP-HTMLDecoder.cc
// Root extracted form structure printing function
Root extracted form structure printing function
Root extracted form structure printing function
void HTMLPrintForms(P_BP_HTML_FORM_LIST formFirst, size_t display_blacklisted){
	size_t i = 0;
	if(formFirst == NULL){
		printf("\n [+] HTML Forms -- No Forms Were Found on Page.");
	}
	if(formFirst != NULL)
	for( i = 0 ; formFirst != NULL; formFirst = formFirst->next){
		if(!formFirst->properties)
			continue;
		if(formFirst->blacklisted && !display_blacklisted)
			continue;
		printf("\n");
		printf("\n [+] Displaying Form %i: (%p)", i, formFirst);
		printf("\n     blacklisted: %s", formFirst->blacklisted ? "Yes" : "No");
		printf("\n     properties:  %p", formFirst->properties);
		printf("\n     host:        %s", formFirst->host);
		printf("\n     base:        %s", formFirst->base);
		printf("\n     path:        %s", formFirst->path);
		printf("\n     script:      %s", formFirst->script);
		printf("\n     full_url:    %s", formFirst->full_url);
		if(formFirst->properties != NULL)
		{
			printf("\n");
			HTMLPrintFormPropertyList(formFirst->properties);
		}
		if(formFirst->inputs != NULL)
		{
			printf("\n");
			printf("\n               [+] Form Inputs:     %p", formFirst->inputs);
			if(formFirst->inputs != NULL)
				HTMLPrintFormInputList(formFirst->inputs);
		}
		printf("\n ");
		i++;
	}
}
void HTMLPrintForms ( P_BP_HTML_FORM_LIST formFirst , size_t display_blacklisted ) { size_t i = 0 ; if ( formFirst == NULL ) { printf ( " \n " ) ; } if ( formFirst != NULL ) for ( i = 0 ; formFirst != NULL ; formFirst = formFirst -> next ) { if ( ! formFirst -> properties ) continue ; if ( formFirst -> blacklisted && ! display_blacklisted ) continue ; printf ( " \n " ) ; printf ( " \n " , i , formFirst ) ; printf ( " \n " , formFirst -> blacklisted ? " " : " " ) ; printf ( " \n " , formFirst -> properties ) ; printf ( " \n " , formFirst -> host ) ; printf ( " \n " , formFirst -> base ) ; printf ( " \n " , formFirst -> path ) ; printf ( " \n " , formFirst -> script ) ; printf ( " \n " , formFirst -> full_url ) ; if ( formFirst -> properties != NULL ) { printf ( " \n " ) ; HTMLPrintFormPropertyList ( formFirst -> properties ) ; } if ( formFirst -> inputs != NULL ) { printf ( " \n " ) ; printf ( " \n " , formFirst -> inputs ) ; if ( formFirst -> inputs != NULL ) HTMLPrintFormInputList ( formFirst -> inputs ) ; } printf ( " \n " ) ; i ++ ; } }
Root extracted form structure printing function
Root extracted form structure printing function
// display properties if they exist