1.0.0 • Published 4 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 ./bin
1.0.0
4 years ago
0.0.19
4 years ago
0.0.18
4 years ago
0.0.17
4 years ago
0.0.16
7 years ago
0.0.15
7 years ago
0.0.14
7 years ago
0.0.13
7 years ago
0.0.12
7 years ago
0.0.11
8 years ago
0.0.10
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago