-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.js
45 lines (40 loc) · 1.07 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var sys = require('sys');
// Global config
global.config = {
myMAC: "11:22:33:44:55:66",
myIP: "10.0.0.99",
};
// Source list
global.sources = {
// Aircrack protocol from ethetnet port
'aircrack-eth': {
description: "AirServ from ethernet port",
library: './aircrack',
constructor: 'AirCrackConnection',
arguments: [ 'localhost', '6666' ],
decoder: 'EthernetPacket',
},
// Aircrack from wifi network
'aircrack-wifi': {
description: "AirServ from WiFi network",
library: './aircrack',
constructor: 'AirCrackConnection',
arguments: [ 'localhost', '666' ],
decoder: 'AirCrackRxHeader',
filter: function(buf) {
var offset = 32; // Skip aircrack rx header
var x = buf[offset];
return ((x >> 2) & 3) == 2; // Take only data packets
}
},
// Pcap file
'pcap-file': {
description: "capture file",
library: './pcap-connection',
constructor: function() {
return require('pcap').createOfflineSession("./sample/lib2.cap", '');
},
decoder: 'RadioTapPacket',
byteLimit: 200,
},
};