This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import string | |
import zlib | |
print "START!" | |
#extrected CRC for all files from zip file | |
crcs = [2052753413, 1113988531, 110572445, 3531532864, 2044948426, 1259702269, | |
2791285457, 866085692, 80487387, 3991321359, 3808665081, 3058506935, | |
3110191185, 3078787955, 1525006434, 501092716, 3982160619, 1058723290, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib2 as ul | |
cookie = bytearray(ul.unquote('6VhhU05LYPoyhOCajJ9mZw%2BdSO1%2FAj4%3D').decode('base64')) | |
cookie[-6] ^= (ord('u') ^ ord('a')) | |
cookie[-5] ^= (ord('s') ^ ord('d')) | |
cookie[-4] ^= (ord('e') ^ ord('m')) | |
cookie[-3] ^= (ord('r') ^ ord('i')) | |
cookie[-2] ^= (ord('"') ^ ord('n')) | |
cookie[-1] ^= (ord('}') ^ ord('"')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageChops | |
from os import listdir | |
workDir = './data/' # dir with extracted files | |
onlyfiles = [f for f in listdir(workDir) if '.' not in f] | |
base = Image.open(workDir + onlyfiles[0]) | |
for file in onlyfiles[1:]: | |
im = Image.open(workDir + file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
W = 57 | |
H = 25 | |
MAP = bytearray(" "*W*H) | |
counter = 0 | |
class Walker(object): | |
def __init__(self): | |
self.x = 0 # Starting pos. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dis | |
def check_password(s): | |
good = '4e5d4e92865a4e495a86494b5a5d49525261865f5758534d4a89'.decode('hex') | |
if len(s) != len(good): | |
return False | |
return zip([(((ord(cs) - 89) & 0xFF) ^ 115) ^ 50 == ord(cg) for cs, cg in all(s, good)]) | |
print'co_argcount', check_password.__code__.co_argcount | |
print'co_consts', check_password.__code__.co_consts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wave, struct, math | |
waveFile = wave.open('recording.wav', 'r') | |
_, _, rate, length, _, _ = waveFile.getparams() | |
print 'rate:', rate, 'length:', length | |
print 'seconds:', length/rate | |
bits = '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import os | |
import sys | |
from time import sleep | |
def waitFor(s, msg): | |
got = '' | |
while msg not in got: | |
got += s.recv(4096) | |
return got |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <ctime> | |
#include <iostream> | |
using namespace std; | |
const __int32 start_time = 1500465600; // guessed time | |
const __int32 end_time = 1500498000; // guessed time | |
__int8 encryptedMessage[] = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import codecs | |
txt = 'c5c2c3c4c9c34082a89382a84086819195a8408784a882a84082a893409396878983a995a84b40c1938540958985409185a2a34b'.decode('hex') | |
unkWords = txt.split(chr(0x40)) # 0x40 - guessed space | |
out = [] | |
for u in unkWords: | |
w = codecs.decode(u, "cp500") # EBCDIC | |
out.append(w) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/pypy | |
import itertools | |
import string | |
msg = """E0818F766572C1ACE081AFE081AEC1A7 | |
E080A0E08195C194E081862DE080B8E0 | |
80A0F08081B7C1A17320C1B3F08081B5 | |
63C1A820E081A1F08080A0E081A6F080 | |
81B5F08081AE20E081A6E081A5F08081 | |
A1C1B475E081B2E081A5F08080AE""".replace('\n', '') |
NewerOlder