library/src/exploitation/ModularExploitation/BuiltInExploitModules/UnitTestExploitModule/BP-ExploitModule_ut.cc
// create the exploit module within this routine.  By create, I mean generate the structure
// and fill out the non-auto pointers.
create the exploit module within this routine.  By create, I mean generate the structure
and fill out the non-auto pointers.
create the exploit module within this routine . By create I mean generate the structure and fill out the non - auto pointers .
P_BP_EXPLOIT_MODULE BP_ExploitModule_ut()
{
	P_BP_EXPLOIT_MODULE mme_module = (P_BP_EXPLOIT_MODULE) bpcalloc(sizeof(BP_EXPLOIT_MODULE), 1);
	if(!mme_module)
		return NULL;
	mme_module->name = (char *) bpstrdup("Unit Testing Exploit Module for Testing Blockparty Functionality");
	mme_module->major_version = 1;
	mme_module->minor_version = 1;
	mme_module->exploit_init_fn          = BP_ExploitModule_ut_init;
	mme_module->exploit_load_fn          = BP_ExploitModule_ut_load;
	mme_module->exploit_unload_fn        = BP_ExploitModule_ut_unload;
	mme_module->exploit_retarget_fn      = BP_ExploitModule_ut_retarget;
	mme_module->exploit_assess_target_fn = BP_ExploitModule_ut_assess_target;
	mme_module->exploit_fire_fn          = BP_ExploitModule_ut_fire;
	mme_module->exploit_db_report_fn     = BP_ExploitModule_ut_db_report;
	return mme_module;
}
P_BP_EXPLOIT_MODULE BP_ExploitModule_ut ( ) { P_BP_EXPLOIT_MODULE mme_module = ( P_BP_EXPLOIT_MODULE ) bpcalloc ( sizeof ( BP_EXPLOIT_MODULE ) , 1 ) ; if ( ! mme_module ) return NULL ; mme_module -> name = ( char * ) bpstrdup ( " " ) ; mme_module -> major_version = 1 ; mme_module -> minor_version = 1 ; mme_module -> exploit_init_fn = BP_ExploitModule_ut_init ; mme_module -> exploit_load_fn = BP_ExploitModule_ut_load ; mme_module -> exploit_unload_fn = BP_ExploitModule_ut_unload ; mme_module -> exploit_retarget_fn = BP_ExploitModule_ut_retarget ; mme_module -> exploit_assess_target_fn = BP_ExploitModule_ut_assess_target ; mme_module -> exploit_fire_fn = BP_ExploitModule_ut_fire ; mme_module -> exploit_db_report_fn = BP_ExploitModule_ut_db_report ; return mme_module ; }
create the exploit module within this routine.
create the exploit module within this routine .
// allocate space for the new module // ensure we've created enough space for the module // set module name // set major and minor versions // set unit test functions // return the module