Skip to content

Instantly share code, notes, and snippets.

@ariankordi
ariankordi / gambitpost.py
Created July 26, 2017 08:54
A little useless: extract a TGA from a Splatoon POST request then convert it to PNG.
import sys, os
from PIL import Image
if len(sys.argv) < 2:
print("Usage: {0} [POST data file]".format(sys.argv[0]))
sys.exit(1)
try:
file = open(sys.argv[1], mode="rb").read()
except Exception as ex:
print("Failed to open {0}.\r\n\r\n{1}".format(sys.argv[1], str(ex)))
<?php
# gen
$reqpsd = 'hello';
$salt = substr(strtr(base64_encode(openssl_random_pseudo_bytes(22)),'+','.'),0,22);
$hash = hash_pbkdf2('sha512', $reqpsd, $salt, 1000, 50).':'.$salt;
# /gen
# check
$passwd = 'hello';