Skip to content

Instantly share code, notes, and snippets.

@Wh1terat
Wh1terat / ztools.py
Created September 23, 2019 12:12
Z-Link Firmware Tools
#!/usr/bin/env python3
import os
import mmap
import argparse
from collections import OrderedDict
__title__ = "Z-Link Firmware Tools"
__version__ = "0.1"
__author__ = "Gareth Bryan"
__license__ = "MIT"
@Wh1terat
Wh1terat / deob.py
Created February 4, 2020 10:57
Incapsula JS Deobfuscator (obfuscator.io) - Python
#!/usr/bin/env python3
import sys
import json
import string
import random
import visitor
import mytemplates
from pyjsparser import parse
from base64 import b64decode
@Wh1terat
Wh1terat / deob.js
Last active September 25, 2024 05:24
Incapsula JS Deobfuscator (obfuscator.io) - JS
#!/usr/bin/env node
var fs = require('fs');
var esprima = require('esprima');
var escodegen = require('escodegen');
var estraverse = require('estraverse');
var debug = true;
var rename = true;
var stringrotatefunc = `
(function (array, times) {
@Wh1terat
Wh1terat / inscrapesula.py
Last active June 11, 2023 12:21
Inscrapesula
#!/usr/bin/env python3
"""
InSCRAPEsula v0.1
Inspired by and sections borrowed from https://github.com/ziplokk1/incapsula-cracker-py3"
"""
import logging
import re
from ast import literal_eval
from base64 import b64encode, b64decode
from random import random
@Wh1terat
Wh1terat / cleverspa.py
Last active September 10, 2021 14:57
CleverSpa - Get Auth Token and Device IDs
#!/usr/bin/env python3
import requests
from getpass import getpass
GOOGLE_AUTH_URL = (
"https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword"
)
GOOGLE_AUTH_KEY = "AIzaSyByDiPaSuvWgnB61aSoseEcE292UcUg_Xg"
FIREBASE_DB = "https://cleverspa-2e6a6.firebaseio.com"
@Wh1terat
Wh1terat / mitm-mi-rc4.py
Last active July 20, 2024 17:21
mitmproxy contentview for Mi RC4 messages
from typing import Optional
from mitmproxy import contentviews, flow, http, ctx
from base64 import b64decode, b64encode
import hashlib
import json
ssecurity = None
@Wh1terat
Wh1terat / fw_unpack.py
Last active June 18, 2024 21:26
Lumi FW Unpacker
#!/usr/bin/env python3
import os
import sys
import ctypes
import tarfile
from io import BytesIO, RawIOBase
from textwrap import dedent
from base64 import b64decode
#!/usr/bin/env python3
import sys
import zlib
import json
signals = []
with open(sys.argv[1], "rb") as data:
fver = data.readline().decode('utf-8').strip()
sn = data.readline().decode('utf-8').strip()
#!/usr/bin/env python3
import requests
import time
import uuid
import json
import urllib.parse
from Crypto.PublicKey import RSA
from Crypto.Hash import MD5
from Crypto.Cipher import PKCS1_v1_5
from base64 import b64encode
#!/usr/bin/env python3
import argparse
__title__ = "Xanavi CRC Tool"
__version__ = "0.1"
__author__ = "Gareth Bryan"
__license__ = "MIT"
FILETYPES = {
#Type Start, End, 2sComp