1.0.0 • Published 6 years ago

windivert v1.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

node-windivert: NodeJS bindings for WinDivert

  1. 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

  1. 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);
});
  1. 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);
});
  1. 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

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

8 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

9 years ago

0.0.10

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago