1
mirror of https://github.com/rapid7/metasploit-payloads synced 2025-04-12 04:12:05 +02:00
HD Moore 118d6b2bfb Merge in some recent meterpreter work, still a ways off before this is ready to use.
git-svn-id: file:///home/svn/framework3/trunk@13044 4d416f70-5f16-0410-b530-b9f4589650da
2011-06-28 05:57:36 +00:00

57 lines
1.2 KiB
C

#ifndef _METERPRETER_LIB_REMOTE_H
#define _METERPRETER_LIB_REMOTE_H
#include "crypto.h"
#include "thread.h"
/*
* 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