mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-02 11:36:22 +01:00
Fixes #288 and #320. This should fix the BSoD issue with the sniffer module (other than the mac filter change, this matches the vendor's example) and confirmed that the keyscan_dump fix works
git-svn-id: file:///home/svn/framework3/trunk@7066 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
18f0d3588c
commit
185ccc3d31
@ -347,11 +347,13 @@ DWORD request_sniffer_capture_stop(Remote *remote, Packet *packet) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
EnterCriticalSection(&sniffercs);
|
||||
|
||||
j->active = 0;
|
||||
AdpSetMacFilter(j->adp, 0);
|
||||
AdpCloseAdapter(j->adp);
|
||||
AdpDestroy(j->adp);
|
||||
|
||||
EnterCriticalSection(&sniffercs);
|
||||
|
||||
for(i=0; i<j->max_pkts; i++) {
|
||||
if(!j->pkts[i]) break;
|
||||
|
@ -216,10 +216,14 @@ DWORD request_ui_get_keys(Remote *remote, Packet *request)
|
||||
Packet *response = packet_create_response(request);
|
||||
DWORD result = ERROR_SUCCESS;
|
||||
|
||||
// This works because NULL defines the end of data (or if its wrapped, the whole buffer)
|
||||
packet_add_tlv_string(response, TLV_TYPE_KEYS_DUMP, KeyScanBuff);
|
||||
memset(KeyScanBuff, 0, KeyScanSize);
|
||||
KeyScanIndex = 0;
|
||||
if(tKeyScan) {
|
||||
// This works because NULL defines the end of data (or if its wrapped, the whole buffer)
|
||||
packet_add_tlv_string(response, TLV_TYPE_KEYS_DUMP, KeyScanBuff);
|
||||
memset(KeyScanBuff, 0, KeyScanSize);
|
||||
KeyScanIndex = 0;
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
|
||||
// Transmit the response
|
||||
packet_transmit_response(result, remote, response);
|
||||
|
Loading…
Reference in New Issue
Block a user