mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-04-12 04:12:05 +02:00

* Added the doxygen binaries and configuration. * Added a `make docs` which generates documentation to the `docs` folder. * Added some documentation to various areas of the source that I was working with. Over time I'll be adding more and more rather than trying to do it all in one hit. * Refactored the kitrap0d code a bit to try to reduce code size.
56 lines
1.2 KiB
C
56 lines
1.2 KiB
C
#ifndef _METERPRETER_LIB_REMOTE_H
|
|
#define _METERPRETER_LIB_REMOTE_H
|
|
|
|
#include "crypto.h"
|
|
#include "thread.h"
|
|
|
|
/*!
|
|
* @brief Remote context allocation.
|
|
*
|
|
* Wraps the initialized file descriptor for extension purposes.
|
|
*/
|
|
typedef struct _Remote
|
|
{
|
|
HMODULE hMetSrv;
|
|
SOCKET fd;
|
|
CryptoContext *crypto;
|
|
SSL_METHOD *meth;
|
|
SSL_CTX *ctx;
|
|
SSL *ssl;
|
|
LOCK * lock; // lock must be acquired before doing any OpenSSL related action.
|
|
HANDLE hServerThread;
|
|
HANDLE hServerToken;
|
|
HANDLE hThreadToken;
|
|
|
|
DWORD dwOrigSessionId;
|
|
DWORD dwCurrentSessionId;
|
|
char * cpOrigStationName;
|
|
char * cpCurrentStationName;
|
|
char * cpOrigDesktopName;
|
|
char * cpCurrentDesktopName;
|
|
|
|
DWORD transport;
|
|
char *url;
|
|
char *uri;
|
|
HANDLE hInternet;
|
|
HANDLE hConnection;
|
|
|
|
int expiration_time;
|
|
int start_time;
|
|
int comm_last_packet;
|
|
int comm_timeout;
|
|
|
|
} Remote;
|
|
|
|
Remote *remote_allocate(SOCKET fd);
|
|
VOID remote_deallocate(Remote *remote);
|
|
|
|
VOID remote_set_fd(Remote *remote, SOCKET fd);
|
|
SOCKET remote_get_fd(Remote *remote);
|
|
|
|
DWORD remote_set_cipher(Remote *remote, LPCSTR cipher,
|
|
struct _Packet *initializer);
|
|
CryptoContext *remote_get_cipher(Remote *remote);
|
|
|
|
#endif
|