Skip to content

Instantly share code, notes, and snippets.

import os
cmd = '''
curl 'https://api.uscyberpatriot.org/api/Competitor?userName={EMAIL}&token={TOKEN}' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'Referer: https://volunteer.uscyberpatriot.org/' \
-H 'sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \
-H 'Accept: application/json, text/plain, */*' \
@Bigjango13
Bigjango13 / PCM-dumper.py
Created May 20, 2024 02:53
PCM/Wav converters
import sys, wave, struct
import lief
if len(sys.argv) < 2:
print("Usage: <file to find sounds in>")
sys.exit()
elf = lief.parse(sys.argv[1])
for sym in elf.dynamic_symbols:
@Bigjango13
Bigjango13 / zipdiff.py
Last active January 25, 2025 21:30
Tool for diffing zip files (and related files, like jars)
import zipfile
from sys import argv, exit
# Open
if len(argv) < 3:
print("Usage: zipdiff.py old.zip new.zip <dont smoosh folders")
exit(0)
za, zb = zipfile.ZipFile(argv[1]), zipfile.ZipFile(argv[2])
sa, sb = set(za.infolist()), set(zb.infolist())
@Bigjango13
Bigjango13 / 0.6.1.txt
Last active May 13, 2023 23:00 — forked from shoghicp/0.6.1.txt
Minecraft: Pocket Edition 0.6.1 protocol
[C ==> S] 0x82 LoginPacket (username: string, protocol_one: i32, protocol_two: i32)
[C <== S] 0x83 LoginStatusPacket (status: i32)
[C ==> S] 0x84 ReadyPacket (status: u8)
[C <== S] 0x85 MessagePacket (message: string)
[C <== S] 0x86 SetTimePacket (time: u64)
[C <== S] 0x87 StartGamePacket (seed: u64, unknown: i32, gamemode: i32, entity id: i32, x: f32, y: f32, z: f32)
[C <== S] 0x88 AddMobPacket (entity id: i32, type: i32, x: f32, y: f32, z: f32, pitch: i8, yaw: i8, metadata: Metadata)
[C <== S] 0x89 AddPlayerPacket (guid: u64, name: string, entity id: i32, x: f32, y: f32, z: f32, pitch: i8, yaw: i8, held item id: i16, held item meta: i16, metadata: Metadata)
[C <== S] 0x8A RemovePlayerPacket (entity id: i32, guid: GUID)
@Bigjango13
Bigjango13 / canopener.zsh
Last active March 28, 2022 20:51
A small function to see what programs can open a file.
canopener (){
if [[ $1 == "" ]]; then
echo "You need to specify a file."
else
grep "`xdg-mime query filetype $1`" -R /usr/share/applications/* --files-with-matches --color=never | grep -v mimeinfo.cache | xargs grep "^Exec=" --no-filename | awk -F'=' '{print $2}' | awk -F' ' '{print $1}' | sort | uniq
fi
}