mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-06-09 12:03:41 +02:00

This commit contains a bunch of code tidying (formatting, spaces, naming, etc) as well as new exports for each of the modules so that the extension can be identified. The plan is for the loader to know which modules are loaded so that when stageless meterpreter fires up MSF can query the existing extensions and load the appropriate functionality on the client side.
26 lines
424 B
C
26 lines
424 B
C
#include "metsrv.h"
|
|
|
|
#ifdef _WIN32
|
|
|
|
#include <windows.h> // for EXCEPTION_ACCESS_VIOLATION
|
|
#include <excpt.h>
|
|
|
|
#define UnpackAndLinkLibs(p, s)
|
|
|
|
#endif
|
|
|
|
/*
|
|
* Entry point for the DLL (or not if compiled as an EXE)
|
|
*/
|
|
#ifdef _WIN32
|
|
DWORD __declspec(dllexport) Init(SOCKET fd)
|
|
{
|
|
return server_setup(fd);
|
|
}
|
|
#else
|
|
|
|
// rtld dynamically links libc/libm/libcrypto/libssl/metsrv_main
|
|
// then calls server_setup for us ;D
|
|
|
|
#endif
|