1.0.0 • Published 6 years ago
windivert v1.0.0
node-windivert: NodeJS bindings for WinDivert
- Introduction
This module provides NodeJS bindings for the WinDivert project. WinDivert provides packet sniffing, modification, injection and blocking for windows. WinDivert: https://reqrypt.org/windivert.html
See the windivert readme: https://github.com/basil00/Divert/blob/master/README
- Usage
npm install windivert
var wd = require("windivert");
wd.listen("tcp.DstPort==80 or tcp.SrcPort==80", function(data, inbound){
console.log("HTTP packet with length", data.length);
});- Other Examples
//Block Packet
var wd = require("windivert");
wd.listen("tcp.DstPort==80 or tcp.SrcPort==80", function(data, inbound){
console.log("BLOCKED HTTP packet with length", data.length);
return false;
});
//Modify Packet
require("buffertools").extend();
var wd = require("windivert");
wd.listen("tcp.DstPort==80 or tcp.SrcPort==80", function(data, inbound){ //inbound is bool
var d = new Buffer(data);
console.log(data.length);
var i = d.indexOf(new Buffer("BOB"));
if(i>=0){
d.writeUInt8("S".charCodeAt(0), i++);
d.writeUInt8("A".charCodeAt(0), i++);
d.writeUInt8("M".charCodeAt(0), i++);
}
return wd.HelperCalcChecksums(d, 0);
});- Building
1) Make sure node-gyp is installed and working. Instructions are here: https://github.com/nodejs/node-gyp
2) Download WinDivert-1.1.8-MSVC.zip from https://reqrypt.org/windivert.html and extract its contents into the module directory.
3) node-gyp clean configure build
4) Windivert will automatically use the custom built binary from build/Release if it exists, instead of the precompiled binaries in ./bin1.0.0
6 years ago
0.0.19
6 years ago
0.0.18
6 years ago
0.0.17
6 years ago
0.0.16
9 years ago
0.0.15
9 years ago
0.0.14
9 years ago
0.0.13
9 years ago
0.0.12
9 years ago
0.0.11
9 years ago
0.0.10
10 years ago
0.0.9
10 years ago
0.0.8
10 years ago
0.0.6
10 years ago
0.0.5
10 years ago
0.0.4
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago