Skip to content

Instantly share code, notes, and snippets.

@Wh1terat
Wh1terat / decrypt_pass.py
Last active June 18, 2024 19:24
Decrypt <pack:Password> from service42 files
#!/usr/bin/env python3
import sys
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.backends import default_backend
from base64 import b64decode
__title__ = "service42 Password Decryptor"
__version__ = "0.1"
#!/usr/bin/env python3
import serial
import signal
DEVICE = '/dev/ttyUSB0'
BAUD = 38400
PROMPT = 'FW>'
BLOCK_SIZE = 0x1000
class KeyboardInterruptException(Exception):
@Wh1terat
Wh1terat / ipam-vis.html
Created July 31, 2023 15:55
IPv4 IPAM Visualiser
<!DOCTYPE html>
<html>
<head>
<title>IPAM</title>
</head>
<body>
<canvas id="ipam"></canvas>
<div id="tooltip" style="position: absolute; display: none; background-color: #ffffff; border: 1px solid #000000; padding: 5px;"></div>
<script>
class DrawIPAM {
#!/usr/bin/env python3
from __future__ import annotations
import secrets
import gzip
import json
import uuid
import requests
from dataclasses import dataclass, asdict, is_dataclass, field
from Crypto.PublicKey import RSA
from Crypto.Cipher import AES, PKCS1_v1_5
#!/usr/bin/env python3
import argparse
from pathlib import Path
from struct import pack, unpack, iter_unpack
__title__ = "Xanavi RCL (Un)packer"
__version__ = "0.1"
__author__ = "Gareth Bryan"
__license__ = "MIT"
#!/usr/bin/env python3
import argparse
__title__ = "Xanavi CRC Tool"
__version__ = "0.1"
__author__ = "Gareth Bryan"
__license__ = "MIT"
FILETYPES = {
#Type Start, End, 2sComp
#!/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 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()
@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
@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