Skip to content

Instantly share code, notes, and snippets.

View skerit's full-sized avatar

Jelle De Loecker skerit

View GitHub Profile
@skerit
skerit / send_syn.js
Created March 15, 2018 20:18 — forked from zachary822/send_syn.js
Send TCP SYN with node.js and raw-socket package
/**
* Sending a TCP SYN packet properly using the raw-socket package.
*/
var raw = require('raw-socket');
var crypto = require('crypto');
// create a raw socket using TCP
var s = raw.createSocket({
protocol: raw.Protocol.TCP
});
@skerit
skerit / binary-plist.js
Created November 1, 2015 10:13 — forked from clee/binary-plist.js
initial binary plist implementation in nodejs
#!/usr/bin/env node
var fs = require('fs');
var sys = require('sys');
var bin = require('binary');
function bytesize(n) {
// JavaScript can't handle 64-bit ints natively.
// TODO: hack it up anyway.
// (n & 0xFFFFFFFF00000000) ? 8 : ...