Skip to content

Instantly share code, notes, and snippets.

data = [
"1f9111".decode("hex"),
"1799".decode("hex"),
"0790001226d8".decode("hex"),
"0a9e1e5c3ada".decode("hex"),
"1f".decode("hex"),
"099e195e".decode("hex"),
"0a97075a21dac1".decode("hex"),
"0a9710".decode("hex"),
"199e075131d3".decode("hex"),
msg = '100000011100010110001111000001000000011100000100001110000001000000000001010000001000000101000100000100000000000001000000000000010100110000111010001011000000100000001000011110000010011000000010100000101000001000000000000010100010000010100110000101000001011000000100110000000100110000011101'
takeLeftLeaf = '0'
def getHex(t):
x = t[0]
if t[0] == takeLeftLeaf:
if t[1] == takeLeftLeaf:
#!/usr/bin/pypy
import itertools
import string
msg = """10101011101000110100011101111111011111110111010010110010011100101111001011001001
10111001101000111011111110100101111010011101111011001011001001110101011110110011
11101011111011110111101111011101111111001011001001011001001110110011100101100100
11010001110110011110110100101100100110111001110010111""".replace('\n', '')
def deTree(tree, data):
# oryginalna wersja
#def magic1(a, b):
# o = 0
# i = 0
# while i < a:
# o += 1
# i += 1
# i = 0
# while i < b:
# o += 1
#!/usr/bin/pypy
import itertools
import string
msg = """E0818F766572C1ACE081AFE081AEC1A7
E080A0E08195C194E081862DE080B8E0
80A0F08081B7C1A17320C1B3F08081B5
63C1A820E081A1F08080A0E081A6F080
81B5F08081AE20E081A6E081A5F08081
A1C1B475E081B2E081A5F08080AE""".replace('\n', '')
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)
#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[] =
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
import wave, struct, math
waveFile = wave.open('recording.wav', 'r')
_, _, rate, length, _, _ = waveFile.getparams()
print 'rate:', rate, 'length:', length
print 'seconds:', length/rate
bits = ''
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