library/src/exploitation/WebExploitation/BP-WebExploitation.cc
// Appends a result set to the end of an application engine assessment set
Appends a result set to the end of an application engine assessment set
Appends a result set to the end of an application engine assessment set
size_t BP_WebAssessmentAppendAppEngineResultToList(P_BP_WEB_APPSERVER_TEST_RESULT inList, P_BP_WEB_APPSERVER_TEST_RESULT appendList)
{
	if (!inList || !appendList)
		return ERR_FAILURE;
	P_BP_WEB_APPSERVER_TEST_RESULT savedFirst = inList->first;
	for
	(
		inList = inList->first;
		inList->next != NULL;
		inList = inList->next
	){}
	if (inList && !inList->next)
	{
		inList->next = appendList;
		appendList->prev  = inList;
		appendList->first = inList->first;
		appendList->next  = NULL;
		appendList = savedFirst;
		return ERR_SUCCESS;
	}
	return ERR_FAILURE;
}
size_t BP_WebAssessmentAppendAppEngineResultToList ( P_BP_WEB_APPSERVER_TEST_RESULT inList , P_BP_WEB_APPSERVER_TEST_RESULT appendList ) { if ( ! inList || ! appendList ) return ERR_FAILURE ; P_BP_WEB_APPSERVER_TEST_RESULT savedFirst = inList -> first ; for ( inList = inList -> first ; inList -> next != NULL ; inList = inList -> next ) { } if ( inList && ! inList -> next ) { inList -> next = appendList ; appendList -> prev = inList ; appendList -> first = inList -> first ; appendList -> next = NULL ; appendList = savedFirst ; return ERR_SUCCESS ; } return ERR_FAILURE ; }
Appends a result set to the end of an application engine assessment set
Appends a result set to the end of an application engine assessment set
// check pointers // save the first pointer // move to the end of the list // add to the list // link next to the original list // link up the append list with the inlist pointers // reset pointer to position and return // return indicating success // Return failure if link is impossible