mirror of
https://github.com/rapid7/metasploit-payloads
synced 2024-12-08 23:33:07 +01:00
Land #44, fix webcam crashes
This commit is contained in:
commit
454e56adb3
@ -171,13 +171,13 @@ void real_dprintf(char *filename, int line, const char *function, char *format,
|
||||
#endif
|
||||
|
||||
/*! @brief Sets `dwResult` to the return value of `GetLastError()`, prints debug output, then does `break;` */
|
||||
#define BREAK_ON_ERROR( str ) { dwResult = GetLastError(); dprintf( "%s. error=%d", str, dwResult ); break; }
|
||||
#define BREAK_ON_ERROR( str ) { dwResult = GetLastError(); dprintf( "%s. error=%d (0x%u)", str, dwResult, (ULONG_PTR)dwResult ); break; }
|
||||
/*! @brief Sets `dwResult` to `error`, prints debug output, then `break;` */
|
||||
#define BREAK_WITH_ERROR( str, err ) { dwResult = err; dprintf( "%s. error=%d", str, dwResult ); break; }
|
||||
#define BREAK_WITH_ERROR( str, err ) { dwResult = err; dprintf( "%s. error=%d (0x%u)", str, dwResult, (ULONG_PTR)dwResult ); break; }
|
||||
/*! @brief Sets `dwResult` to the return value of `WASGetLastError()`, prints debug output, then does `break;` */
|
||||
#define BREAK_ON_WSAERROR( str ) { dwResult = WSAGetLastError(); dprintf( "%s. error=%d", str, dwResult ); break; }
|
||||
#define BREAK_ON_WSAERROR( str ) { dwResult = WSAGetLastError(); dprintf( "%s. error=%d (0x%u)", str, dwResult, (ULONG_PTR)dwResult ); break; }
|
||||
/*! @brief Sets `dwResult` to the return value of `GetLastError()`, prints debug output, then does `continue;` */
|
||||
#define CONTINUE_ON_ERROR( str ) { dwResult = GetLastError(); dprintf( "%s. error=%d", str, dwResult ); continue; }
|
||||
#define CONTINUE_ON_ERROR( str ) { dwResult = GetLastError(); dprintf( "%s. error=%d (0x%u)", str, dwResult, (ULONG_PTR)dwResult ); continue; }
|
||||
|
||||
/*! @brief Close a service handle if not already closed and set the handle to NULL. */
|
||||
#define CLOSE_SERVICE_HANDLE( h ) if( h ) { CloseServiceHandle( h ); h = NULL; }
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "net/net.h"
|
||||
#include "ui/ui.h"
|
||||
#include "webcam/webcam.h"
|
||||
#include "webcam/audio.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "railgun/railgun.h" // PKS, win32 specific at the moment.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,33 +1,17 @@
|
||||
/*!
|
||||
* @file webcam.h
|
||||
* @brief Contains webcam interaction function declarations.
|
||||
*/
|
||||
|
||||
#ifndef _METERPRETER_SOURCE_EXTENSION_WEBCAM_SERVER_VIDEO_H
|
||||
#define _METERPRETER_SOURCE_EXTENSION_WEBCAM_SERVER_VIDEO_H
|
||||
|
||||
#include "audio.h"
|
||||
|
||||
#define TLV_TYPE_EXTENSION_WEBCAM 0
|
||||
|
||||
#define TLV_TYPE_WEBCAM_IMAGE \
|
||||
MAKE_CUSTOM_TLV( \
|
||||
TLV_META_TYPE_RAW, \
|
||||
TLV_TYPE_EXTENSION_WEBCAM, \
|
||||
TLV_EXTENSIONS + 1)
|
||||
|
||||
#define TLV_TYPE_WEBCAM_INTERFACE_ID \
|
||||
MAKE_CUSTOM_TLV( \
|
||||
TLV_META_TYPE_UINT, \
|
||||
TLV_TYPE_EXTENSION_WEBCAM, \
|
||||
TLV_EXTENSIONS + 2)
|
||||
|
||||
#define TLV_TYPE_WEBCAM_QUALITY \
|
||||
MAKE_CUSTOM_TLV( \
|
||||
TLV_META_TYPE_UINT, \
|
||||
TLV_TYPE_EXTENSION_WEBCAM, \
|
||||
TLV_EXTENSIONS + 3)
|
||||
|
||||
#define TLV_TYPE_WEBCAM_NAME \
|
||||
MAKE_CUSTOM_TLV( \
|
||||
TLV_META_TYPE_STRING, \
|
||||
TLV_TYPE_EXTENSION_WEBCAM, \
|
||||
TLV_EXTENSIONS + 4)
|
||||
#define TLV_TYPE_WEBCAM_IMAGE MAKE_CUSTOM_TLV(TLV_META_TYPE_RAW, TLV_TYPE_EXTENSION_WEBCAM, TLV_EXTENSIONS + 1)
|
||||
#define TLV_TYPE_WEBCAM_INTERFACE_ID MAKE_CUSTOM_TLV(TLV_META_TYPE_UINT, TLV_TYPE_EXTENSION_WEBCAM, TLV_EXTENSIONS + 2)
|
||||
#define TLV_TYPE_WEBCAM_QUALITY MAKE_CUSTOM_TLV(TLV_META_TYPE_UINT, TLV_TYPE_EXTENSION_WEBCAM, TLV_EXTENSIONS + 3)
|
||||
#define TLV_TYPE_WEBCAM_NAME MAKE_CUSTOM_TLV(TLV_META_TYPE_STRING, TLV_TYPE_EXTENSION_WEBCAM, TLV_EXTENSIONS + 4)
|
||||
|
||||
DWORD request_webcam_list(Remote *remote, Packet *packet);
|
||||
DWORD request_webcam_start(Remote *remote, Packet *packet);
|
||||
|
Loading…
Reference in New Issue
Block a user