Skip to content

Instantly share code, notes, and snippets.

import io, logging, secrets, socket, sqlite3, struct, time, traceback
# TODO replace with something faster
from CryptICE import IceKey
logging.basicConfig(
format="%(asctime)s %(levelname)-8s %(message)s",
filename="trackerserver.log",
encoding="utf-8",
level=logging.DEBUG)
hashtable size: 4 entries, specified at offset 0x20 in the header
full table size: hashtable size + number of entries in manifest, specified at 0x0c in the header
lookup section:
00: 04 00 00 00 points to 04 in full table
01: 06 00 00 00 points to 06 in full table
02: 0A 00 00 00 etc
03: 0C 00 00 00
entry index sections:
import hashlib, io, socket, struct, threading, time, hmac, random
from Crypto.Cipher import AES
from user import *
from secondblob import *
def steamtime_to_unixtime(steamtime_bin):
steamtime, = struct.unpack("<Q", steamtime_bin)
unixtime = steamtime // 1000000 - 62135596800
import hashlib, sys
b58ab = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
def b58csum(s):
return hashlib.sha256(hashlib.sha256(s).digest()).digest()[0:4]
def b58decode(s, checksum=True):
idx = 0
while s[idx] == "1":
@ymgve
ymgve / recover.py
Last active January 8, 2022 18:02
import hashlib, itertools, json, socket, ssl, sys
words = [ "like", "just", "love", "know", "never", "want", "time", "out",
"there", "make", "look", "eye", "down", "only", "think", "heart", "back",
"then", "into", "about", "more", "away", "still", "them", "take", "thing",
"even", "through", "long", "always", "world", "too", "friend", "tell",
"try", "hand", "thought", "over", "here", "other", "need", "smile",
"again", "much", "cry", "been", "night", "ever", "little", "said", "end",
"some", "those", "around", "mind", "people", "girl", "leave", "dream",
"left", "turn", "myself", "give", "nothing", "really", "off", "before",
;
; +-------------------------------------------------------------------------+
; | This file has been generated by The Interactive Disassembler (IDA) |
; | Copyright (c) 2015 Hex-Rays, <support@hex-rays.com> |
; | License info: 48-B611-7234-BB |
; | Doskey Lee, Kingsoft Internet Security Software |
; +-------------------------------------------------------------------------+
;
import struct, sys, cStringIO, os
from edoslib import *
def decodebits(s):
cs = cStringIO.StringIO(s)
res = ""
while True:
t = "01"
import struct, sys
p = ("\x2f\x43", "\x43\x2f")
pnewdata = "\x57\x43"
penddata = "\x57\x2f"
def add_kernel_byte(c):
s = pnewdata
c = ord(c)
import struct, sys
p = ("\x2f\x43", "\x43\x2f")
pnewdata = "\x57\x43"
penddata = "\x57\x2f"
def add_kernel_byte(c):
s = pnewdata
c = ord(c)
import sys
def decryptheader(header):
sbox_i = [126, 64, 19, 187, 247, 222, 80, 197, 245, 163, 169, 189, 193, 28, 143, 161, 182, 116, 145, 18, 70, 156, 178, 218, 148, 219, 39, 147, 229, 77, 48, 158, 127, 96, 216, 61, 160, 231, 49, 190, 107, 0, 35, 238, 29, 71, 121, 117, 85, 8, 78, 202, 241, 146, 214, 150, 184, 2, 76, 20, 164, 138, 86, 68, 3, 93, 13, 38, 246, 170, 152, 5, 135, 242, 133, 69, 103, 207, 82, 172, 59, 154, 209, 58, 253, 132, 129, 221, 115, 217, 66, 235, 185, 100, 255, 168, 237, 249, 4, 7, 94, 244, 124, 205, 114, 102, 21, 130, 191, 165, 42, 63, 142, 113, 41, 65, 16, 12, 118, 120, 125, 83, 180, 79, 112, 72, 24, 43, 149, 25, 95, 233, 227, 228, 141, 234, 192, 203, 62, 47, 105, 131, 111, 239, 14, 232, 87, 208, 155, 92, 136, 22, 140, 6, 27, 212, 26, 40, 55, 37, 188, 199, 123, 162, 52, 201, 99, 215, 195, 176, 32, 196, 15, 250, 53, 81, 60, 194, 10, 84, 122, 31, 119, 75, 98, 179, 134, 1, 34, 128, 88, 89, 45, 109, 151, 252, 226, 240, 17, 139, 175, 67, 166, 224, 91, 230, 36, 213, 159, 211, 198, 137, 200,