Skip to content

Instantly share code, notes, and snippets.


Eduard-Mihai Burtescu eddyb

View GitHub Profile
View GL.js
var GL = require("GL");
GL.initWindow("GL test", 800, 600);
var angle = 0;
GL.clear(0, 0, 0, 0);
GL.rotate(angle++, 1, 1, 1);
View gist:1209947
function unpackMobMetadata(pkt) {
var x, data = {};
while((x = unpackers.byte(pkt)) != 0x7f) {
var id = x & 0x1f;
switch(x >> 5) {
case 0:
data[id] = unpackers.byte(pkt);
case 1:
data[id] = unpackers.short(pkt);
View gist:1213202
if(password) {
var login = 'user='+username+'&password='+password+'&version=1000000';
https.request({host: '', method: 'POST', 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Length': login.length}, function(res) {
res.on('data', function(data) {
data = data.toString('utf8');
if(data == 'Bad login\n') {
this.emit('error', 'Bad login');
View gist:1213207
http.get({host: '', path: '/game/joinserver.jsp?user='+this.username+'&sessionId='+this.sessionID+'&serverId='+packet.hash}, function(res) {
res.on('data', function(data) {
data = data.toString('utf8');
if(data == 'Bad login\n') {
this.emit('error', 'Bad login');
this.send(proto.packets.LOGIN, {protoVersion: socket.version, username: this.username});
View gist:1214575
var pack = require('jspack').jspack, zlib = require('zlib');
(function() {
var ev = '';
'byte short int long float double str8 str16 bool mobMetadata optionalItem itemList compressedChunk multiBlock'.split(' ').forEach(function(type) {
ev += 'var '+type+' = function '+type+'(n){return ["'+type+'",n||"~"];};';
exports.client2server = {
eddyb / Orar 10C
Created September 14, 2011 09:20
View Orar 10C
Luni: chimie, engle, mate, info, mate, fizica
Marti: geo, bio, rom, franca, rom, desen/muzica, bio
Miercuri: isto, mate, mate, franc, fizica, engleza
Joi: info, info, info, fizica, chimie, sport
Vineri: tic, ed antreprenoriala, psihologie, rom, sport, religie
View gist:1224773
wc.Chunk = function(x, z, data) {
this.x = x / 16;
this.z = z / 16;
this.size = 16*128*16;
data = atob(data);
function byte(pos) {
return data.charCodeAt(pos);
View gist:1226013
0x00: [int('id')],
0x01: [int('protoVersion'), str16('username'), long(/*seed*/), int(/*mode*/), byte(/*world*/), byte(), ubyte(/*height*/), ubyte(/*maxPlayers*/)],
0x02: [str16('username')],
0x03: [str16('message')],
0x05: [int('EID'), short('slot'), short('itemID'), short('dataValue')],
0x07: [int('playerEID'), int('targetEID'), bool('leftClick')],
0x09: [byte('world'), byte(), byte('mode'), short('height'), long('seed')],
0x0a: [bool('onGround')],
0x0b: [double('x'), double('y'), double('stance'), double('z'), bool('onGround')],
class Auth(object):
"""Provides an interface to services provided by"""
def __init__(self, username, password):
self.username = username
self.password = password
self.launcher_ver = 999999999
def _get_version(self):
from urllib import urlopen
View gist:1251896
To build John the Ripper, type:
make clean SYSTEM
where SYSTEM can be one of the following:
linux-x86-64 Linux, x86-64 with SSE2 (best tested)
linux-x86-64-avx Linux, x86-64 with AVX (experimental)
linux-x86-64-xop Linux, x86-64 with AVX and XOP (experimental)
linux-x86-64-icc Linux, x86-64 compiled with icc (best)
linux-x86-64-clang Linux, x86-64 compiled with clang (good)
linux-x86-sse2 Linux, x86 32-bit with SSE2 (best tested if 32-bit)
linux-x86-sse2i Linux, x86 32-bit with SSE2 (32-bit, intrinsic)