Skip to content

Instantly share code, notes, and snippets.

@indutny indutny/2.js Secret
Created May 1, 2013

Embed
What would you like to do?
var Buffer = require('buffer').Buffer,
net = require('net');
var handshake1 = new Buffer('16030100e7010000e3030251811d4b6df3d56253035ffa2dd1568f7d7ca018e462c779494f15991dc035a6000048c014c00a00390038c00fc0050035c012c00800160013c00dc003000ac013c00900330032c00ec004002fc011c007c00cc002000500040015001200090014001100080006000300ff01000072000000260024000021757365722d736572766963652e636f6e64656e6173746469676974616c2e636f6d000b000403000102000a00340032000e000d0019000b000c00180009000a00160017000800060007001400150004000500120013000100020003000f001000110023000033740000', 'hex');
var handshake2 = new Buffer('160301010701000103030251811d4b6df3d56253035ffa2dd1568f7d7ca018e462c779494f15991dc035a6000068c014c00ac022c0210039003800880087c00fc00500350084c012c008c01cc01b00160013c00dc003000ac013c009c01fc01e00330032009a009900450044c00ec004002f009600410007c011c007c00cc002000500040015001200090014001100080006000300ff01000072000000260024000021757365722d736572766963652e636f6e64656e6173746469676974616c2e636f6d000b000403000102000a00340032000e000d0019000b000c00180009000a00160017000800060007001400150004000500120013000100020003000f001000110023000033740000', 'hex');
var socket = net.connect(443, '165.193.220.80', function() {
socket.write(handshake2);
socket.on('data', function(data) {
console.log(data);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.