library/src/exploitation/WebExploitation/CommandExecution/BP-WebExploitationCommandExecution.cc
// Display a single file verification test
Display a single file verification test
Display a single file verification test
BP_ERROR_T BP_CommandInjectionDisplayFileVerificationTest(P_BP_WEB_COMMAND_INJECTION_FILE_VERIFICATION_TEST test)
{
	if(!test)
		return ERR_FAILURE;
	printf("\n\t\t\t\t [+] File Upload/Creation Test");
	printf("\n\t\t\t\t     programming_language_for_file_upload: ");
	switch(test->programming_language_for_file_upload)
	{
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_NONE:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_NONE");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_PHP:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_PHP");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_ASP:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_ASP");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_JSP:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_JSP");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_CFM:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_CFM");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_DNET:
			printf("BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_DNET");
			break;
		default:
			printf("BAD_VAL");
			break;
	}
	printf("\n\t\t\t\t     verification_path_type:               ");
	switch(test->verification_path_type)
	{
		case BP_WEB_COMMAND_INJECTION_FILE_CHECK_NONE:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CHECK_NONE");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_CHECK_RELATIVE_PATH:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CHECK_RELATIVE_PATH");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_CHECK_ABSOLUTE_PATH:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CHECK_ABSOLUTE_PATH");
			break;
		default:
			printf("BAD_VAL");
			break;
	}
	printf("\n\t\t\t\t     cleanup_indicator:                    ");
	switch(test->cleanup_indicator)
	{
		case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_NONE:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_NONE");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_LEAVE_SHELL:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_LEAVE_SHELL");
			break;
		case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_DESTROY_SHELL:
			printf("BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_DESTROY_SHELL");
			break;
		default:
			printf("BAD_VAL");
			break;
	}
	printf("\n\t\t\t\t     upload_file_name: %s", test->upload_file_name);
	printf("\n\t\t\t\t     upload_file_path: %s", test->upload_file_path);
	printf("\n\t\t\t\t     upload_file_body: %s", test->upload_file_body);
	printf("\n\t\t\t\t     front_part:       %s", test->front_part);
	printf("\n\t\t\t\t     back_part:        %s", test->back_part);
	printf("\n");
	return ERR_SUCCESS;
}
BP_ERROR_T BP_CommandInjectionDisplayFileVerificationTest ( P_BP_WEB_COMMAND_INJECTION_FILE_VERIFICATION_TEST test ) { if ( ! test ) return ERR_FAILURE ; printf ( " \n \t \t \t \t " ) ; printf ( " \n \t \t \t \t " ) ; switch ( test -> programming_language_for_file_upload ) { case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_NONE : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_PHP : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_ASP : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_JSP : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_CFM : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_PROGRAMMING_LANGUAGE_DNET : printf ( " " ) ; break ; default : printf ( " " ) ; break ; } printf ( " \n \t \t \t \t " ) ; switch ( test -> verification_path_type ) { case BP_WEB_COMMAND_INJECTION_FILE_CHECK_NONE : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_CHECK_RELATIVE_PATH : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_CHECK_ABSOLUTE_PATH : printf ( " " ) ; break ; default : printf ( " " ) ; break ; } printf ( " \n \t \t \t \t " ) ; switch ( test -> cleanup_indicator ) { case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_NONE : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_LEAVE_SHELL : printf ( " " ) ; break ; case BP_WEB_COMMAND_INJECTION_FILE_CLEANUP_DESTROY_SHELL : printf ( " " ) ; break ; default : printf ( " " ) ; break ; } printf ( " \n \t \t \t \t " , test -> upload_file_name ) ; printf ( " \n \t \t \t \t " , test -> upload_file_path ) ; printf ( " \n \t \t \t \t " , test -> upload_file_body ) ; printf ( " \n \t \t \t \t " , test -> front_part ) ; printf ( " \n \t \t \t \t " , test -> back_part ) ; printf ( " \n " ) ; return ERR_SUCCESS ; }
Display a single file verification test
Display a single file verification test
// ensure we have a test // display the test // return indicating success