Skip to content

Instantly share code, notes, and snippets.

View ddevault's full-sized avatar

Drew DeVault ddevault

View GitHub Profile
@ddevault
ddevault / gist:4325665
Created December 18, 2012 06:52
How spawning dropped items works in 1.4.6
{11:45:40.253} [SERVER->CLIENT] SpawnObjectOrVehicle (0x17)
[
17 00 00 1A 49 02 FF FF DE B6 00 00 07 E4 00 00 . . . . I . . . . . . . . . . .
1D A4 00 3E 00 00 00 01 00 00 00 00 00 00 . . . . . . . . . . . . . .
]
Entity Id (Int32): 6729
Type (Byte): 2
X (Int32): -8522
Y (Int32): 2020
Z (Int32): 7588
@ddevault
ddevault / gist:4356494
Created December 21, 2012 23:14
Minecraft 1.4.6 encryption/login packets
NOTE: The encryption packets are manipulated by SMProxy to allow it to get control over the encrypted
connection. The actual keys used are different than what you see here.
{04:12:35.397} [CLIENT->SERVER] Handshake (0x02)
[
02 33 00 08 00 53 00 69 00 72 00 43 00 6D 00 70 . 3 . . . S . i . r . C . m . p
00 77 00 6E 00 09 00 31 00 32 00 37 00 2E 00 30 . w . n . . . 1 . 2 . 7 . . . 0
00 2E 00 30 00 2E 00 31 00 00 63 DC . . . 0 . . . 1 . . c .
]
Protocol Version (Byte): 51
@ddevault
ddevault / gist:4356524
Created December 21, 2012 23:22
Window-related 1.4.6 packets
In this, I laid out most of the window-producing thing in the game, then started up the proxy.
I opened up a chest, used a workbench to craft some wood, enchanted an item, etc.
I made sure to have an enchanted item in my inventory. I also had a mob head, which has a tile
entity associated with it.
{04:19:18.997} [SERVER->CLIENT] SetWindowItems (0x68)
[
68 00 00 2D FF FF FF FF FF FF FF FF FF FF FF FF h . . . . . . . . . . . . . . .
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF . . . . . . . . . . . . . . . .
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF . . . . . . . . . . . . . . . .
@ddevault
ddevault / gist:4356540
Last active December 10, 2015 01:09
Spawning entities in Minecraft 1.4.6
This includes mobs, minecarts, item drops, experience orbs, paintings...
{04:23:52.285} [SERVER->CLIENT] SpawnObjectOrVehicle (0x17)
[
17 00 00 08 2D 0B 00 00 06 70 00 00 07 D0 00 00 . . . . . . . . . p . . . . . .
22 70 00 00 00 00 00 00 . p . . . . . .
]
Entity Id (Int32): 2093
Type (Byte): 11
X (Int32): 1648
@ddevault
ddevault / gist:4356559
Created December 21, 2012 23:28
Map chunks in 1.4.6
This file has been truncated, but you can view the full file.
I included 0x33 chunks in the packet filter, but I'm pretty sure Vanilla Minecraft doesn't
use those any more.
{04:26:59.406} [SERVER->CLIENT] MapChunkBulk (0x38)
[
38 00 05 00 00 26 57 01 78 9C ED 9D CD 8E 23 C7 8 . . . . . W . x . . . . . . .
95 EF 19 95 3D C3 DB EA CE CA 24 01 61 96 6C B5 . . . . . . . . . . . . a . l .
DE 40 57 18 34 06 B8 C0 60 6C 2D B8 1B 18 1E AD . . W . 4 . . . . l . . . . . .
67 E3 AB 17 18 78 B4 BE 1B 5F BD 81 EC FB 04 96 g . . . . x . . . . . . . . . .
0D 8C D7 EA 36 AC 7D 57 49 FD 00 45 F6 3C 80 8A . . . . 6 . . W I . . E . . . .
@ddevault
ddevault / gist:4356572
Created December 21, 2012 23:30
Explosions in 1.4.6
Created with TNT.
{04:28:39.988} [SERVER->CLIENT] Explosion (0x3C)
[
3C 40 49 D9 AF 64 2F 3C 02 40 4F BE B8 52 00 00 . . I . . d . . . . O . . R . .
00 40 70 C8 88 CE AB C6 81 40 80 00 00 00 00 02 . . p . . . . . . . . . . . . .
A4 03 03 FC 03 03 FD 03 03 00 03 03 01 03 03 FE . . . . . . . . . . . . . . . .
03 03 FF 06 02 01 FC FF 02 FC FF 03 03 03 03 03 . . . . . . . . . . . . . . . .
03 02 03 03 04 03 00 03 03 00 04 FE 01 00 FE 01 . . . . . . . . . . . . . . . .
01 FE 01 FE FE 01 FF 03 02 FC FE 01 FC FE 01 FD . . . . . . . . . . . . . . . .

Keybase proof

I hereby claim:

  • I am sircmpwn on github.
  • I am sircmpwn (https://keybase.io/sircmpwn) on keybase.
  • I have a public key whose fingerprint is 1E0A 3290 FCAF 4A11 8B5D 687F 83A9 44D9 F4EA 1B88

To claim this, I am signing this object:

usb 6-1.5: new full-speed USB device number 8 using ehci-pci
input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1.5/6-1.5:1.0/0003:1B1C:1B11.000C/input/input34
hid-generic 0003:1B1C:1B11.000C: input,hidraw1: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1d.0-1.5/input0
usbhid 6-1.5:1.1: can't add hid device: -110
usbhid: probe of 6-1.5:1.1 failed with error -110
00000
01110
01210
01110
00000
#!/usr/bin/python
import requests
import sys
import psycopg2
from bs4 import BeautifulSoup
connection = psycopg2.connect('dbname=bash user=sircmpwn')
sql = connection.cursor()
def get_page(page):