Exemplo n.º 1
0
/*!
 * @brief Deregister a full list of commands from meterpreter.
 * @param commands The array of commands that are to be deregistered from the module/extension.
 */
void command_deregister_all(Command commands[])
{
	DWORD index;

	for (index = 0; commands[index].method; index++)
		command_deregister(&commands[index]);
}
Exemplo n.º 2
0
/*
 * Deregisters previously registered custom commands
 */
VOID remote_deregister_core_dispatch_routines()
{
	DWORD index;

	for (index = 0;
	     custom_commands[index].method;
	     index++)
		command_deregister(&custom_commands[index]);
}
Exemplo n.º 3
0
/*
 * Deinitialize the server extension
 */
DWORD __declspec(dllexport) DeinitServerExtension(Remote *remote)
{
	DWORD index;

	for (index = 0;
	     customCommands[index].method;
	     index++)
		command_deregister(&customCommands[index]);
	MgrDestroy(hMgr);
	return ERROR_SUCCESS;
}
Exemplo n.º 4
0
DWORD DeinitServerExtension(Remote *remote)
#endif
{
	DWORD index;

	for (index = 0;
	     customCommands[index].method;
	     index++)
		command_deregister(&customCommands[index]);

	return ERROR_SUCCESS;
}
Exemplo n.º 5
0
/*
 * Deinitialize the server extension
 */
DWORD __declspec(dllexport) DeinitServerExtension(Remote *remote)
{
	DWORD index;

	for (index = 0;
	     customCommands[index].method;
	     index++)
		command_deregister(&customCommands[index]);

	destroyDHCPServer(dhcpserver);
	dhcpserver = NULL;
	destroyTFTPServer(tftpserver);
	tftpserver = NULL;

	return ERROR_SUCCESS;
}
/*
 * Deregisters previously registered custom commands and loaded extensions.
 */
VOID deregister_dispatch_routines( Remote * remote )
{
	DWORD index;

	while( TRUE )
	{
		EXTENSION * extension = list_pop( extension_list );
		if( !extension )
			break;

		extension->deinit( remote );

		free( extension );
	}

	for( index=0 ; custom_commands[index].method ; index++ )
		command_deregister( &custom_commands[index] );

	list_destroy( extension_list );
}
Exemplo n.º 7
0
/*
 * Deinitialize the server extension
 */
DWORD __declspec(dllexport) DeinitServerExtension(Remote *remote)
{
	DWORD index;

	for (index = 0;
	     customCommands[index].method;
	     index++)
		command_deregister(&customCommands[index]);

#ifdef _WIN32
	MgrDestroy(hMgr);
#else
	if(packet_filter) {
		free(packet_filter);
		packet_filter = NULL;
	}
#endif

	lock_destroy(snifferm);
	return ERROR_SUCCESS;
}