library/src/exploitation/WebExploitation/BP-WebExploitationExploitRequestSets.cc
// generates an exploit request set from an anchor
generates an exploit request set from an anchor
generates an exploit request set from an anchor
P_BP_WEB_EXPLOIT_REQUEST_SET BP_GenWebExploitRequestSet(char *get_data, char *post_data)
{
	if(!get_data && !post_data)
	{
		printf("\n [+] Error.  Cannot generate request set due to 2 null parameters.  Returning null.");
		return NULL;
	}
	P_BP_WEB_EXPLOIT_REQUEST_SET ers = (P_BP_WEB_EXPLOIT_REQUEST_SET) bpcalloc(sizeof(BP_WEB_EXPLOIT_REQUEST_SET), 1);
	if(!ers)
		return NULL;
	if(get_data)
		ers->get_str  = bpstrdup(get_data);
	if(post_data)
		ers->post_str = bpstrdup(post_data);
	return ers;
}
P_BP_WEB_EXPLOIT_REQUEST_SET BP_GenWebExploitRequestSet ( char * get_data , char * post_data ) { if ( ! get_data && ! post_data ) { printf ( " \n " ) ; return NULL ; } P_BP_WEB_EXPLOIT_REQUEST_SET ers = ( P_BP_WEB_EXPLOIT_REQUEST_SET ) bpcalloc ( sizeof ( BP_WEB_EXPLOIT_REQUEST_SET ) , 1 ) ; if ( ! ers ) return NULL ; if ( get_data ) ers -> get_str = bpstrdup ( get_data ) ; if ( post_data ) ers -> post_str = bpstrdup ( post_data ) ; return ers ; }
generates an exploit request set from an anchor
generates an exploit request set from an anchor
// create the exploit request set // duplicate get and post data (bpstrdup ok!) // return the exploit request set