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
unstable
HD Moore 2009-09-26 16:26:05 +00:00
parent e715789e7c
commit bf5068f6b1
8 changed files with 12 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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;

View File

@ -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);