Skip to content

Instantly share code, notes, and snippets.

View eddyb's full-sized avatar

Eduard-Mihai Burtescu eddyb

View GitHub Profile
var GL = require("GL");
GL.initWindow("GL test", 800, 600);
GL.enable(GL.DEPTH_TEST);
var angle = 0;
GL.mainLoop({redraw:function(){
GL.clear(0, 0, 0, 0);
GL.loadIdentity();
GL.rotate(angle++, 1, 1, 1);
GL.color(0,1,1);
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);
break;
case 1:
data[id] = unpackers.short(pkt);
if(password) {
var login = 'user='+username+'&password='+password+'&version=1000000';
https.request({host: 'login.minecraft.net', 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');
return;
}
http.get({host: 'minecraft.net', 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');
return;
}
this.send(proto.packets.LOGIN, {protoVersion: socket.version, username: this.username});
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||"~"];};';
});
eval(ev);
exports.client2server = {
@eddyb
eddyb / Orar 10C
Created September 14, 2011 09:20
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
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);
}
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 minecraft.net"""
def __init__(self, username, password):
self.username = username
self.password = password
self.launcher_ver = 999999999
def _get_version(self):
from urllib import urlopen
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)