library/src/exploitation/WebExploitation/CommandExecution/BP-WebExploitationCommandExecution.cc
// Destroy the commadn line injection session
Destroy the commadn line injection session
Destroy the commadn line injection session
BP_ERROR_T BP_CommandInjectionDestroySession(P_BP_WEB_COMMAND_INJECTION_TEST_SESSION cmd_injection_session)
{
	if(!cmd_injection_session)
		return ERR_FAILURE;
	if(cmd_injection_session->php_gadget_library)
		BP_PHPCloseDestroyGadgetLibrary(cmd_injection_session->php_gadget_library);
	if(cmd_injection_session->tq)
		BP_DestroyLinkL(cmd_injection_session->tq, BP_TRUE);
	sem_destroy(&cmd_injection_session->lock);
	bpfree(cmd_injection_session);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_CommandInjectionDestroySession ( P_BP_WEB_COMMAND_INJECTION_TEST_SESSION cmd_injection_session ) { if ( ! cmd_injection_session ) return ERR_FAILURE ; if ( cmd_injection_session -> php_gadget_library ) BP_PHPCloseDestroyGadgetLibrary ( cmd_injection_session -> php_gadget_library ) ; if ( cmd_injection_session -> tq ) BP_DestroyLinkL ( cmd_injection_session -> tq , BP_TRUE ) ; sem_destroy ( & cmd_injection_session -> lock ) ; bpfree ( cmd_injection_session ) ; return ERR_SUCCESS ; }
Destroy the commadn line injection session
Destroy the commadn line injection session
// ensure we have an injection session // destroy the php gadget library // destroy the command injection session if set // destroy the semaphore // destroy the command injection session // return indicating success