Skip to content

Instantly share code, notes, and snippets.

# python3 foo.py
# AssertionError: b'?' != b'42'
# flask --app foo run
# $ curl http://127.0.0.1:5000 -H 'Content-Type: application/json' --data '{"dejavu": 42}'
# ?
# $ curl http://127.0.0.1:5000 -H 'Content-Type: application/json' --data '{"dejavu": 42}'
# ?
@mephi42
mephi42 / kek.py
Created January 20, 2021 13:09 — forked from vient/kek.py
Python abomination
#!/usr/bin/env python3
import π—Œπ”Άπ˜΄
import πš›π–Ίπ”«β…†om
import π’”π˜΅π“»π’Ύπš—π’ˆ
import ο½•π˜―π•šο½ƒπ• π’Ήο½…π–½π™–π•₯𝖆
from ο½π”Άπ˜¨ο½π‘’π™£t𝑠 import β‚—β…‡β‚“β‚‘ο½’ΕΏ as Lπ˜¦π—‘πšŽα΅£π¬
𝖀𝗑𝕴π‘ͺO𝑫ℰ_π˜Ύπ΄π™²β„‹π„π•Ύ = {}
def π˜§π•šπ“΅π˜­_ο½•π™£β±π™˜π—ˆde_π“·π™–π¦π™šπ•€():
@mephi42
mephi42 / rpc.py
Created May 21, 2020 15:50
pypy3 worker
import argparse
import errno
import pickle
import subprocess
import sys
class Client(object):
def __init__(self, worker, worker_args):
self.worker = worker
@mephi42
mephi42 / gist:924c8359cdcc181ac90c07080e3356b1
Created November 2, 2016 01:57
Script to extract penguin vacation sounds
#!/usr/bin/env python
import hashlib
with open('key.bin') as fp:
key = bytearray(fp.read())
def decode(x, pos, count):
salt = map(ord, hashlib.md5('Casino data file %d bytes' % len(x)).hexdigest())