Skip to content

Instantly share code, notes, and snippets.

View withzombies's full-sized avatar

Ryan Stortz withzombies

View GitHub Profile
@withzombies
withzombies / git.sh
Last active November 7, 2025 03:30
a git wrapper for LLMs
#!/bin/bash
# A git wrapper to prevent the use of '--no-verify' on commits.
# This ensures that all pre-commit hooks, such as linters and tests, are always executed.
# Find the absolute path to the real git executable, avoiding this script itself.
# 'command -v' is a reliable way to find the first 'git' in the PATH.
REAL_GIT=$(command -v git)
# If this script is the first 'git' in the PATH, we need to find the *next* one.
@withzombies
withzombies / colima.sh
Last active November 4, 2025 18:26
colima install script
#!/bin/bash
set -e
# Create unique temp directory and ensure cleanup on exit
TMPDIR=$(mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
ARCH="$(uname -m)" # expects 'x86_64' or 'arm64'
# Map architecture for Docker Compose and Docker CLI (use aarch64 instead of arm64)
#!/bin/bash
# Check formatting
# This used to just enforce a check, but it was silly watching the agent attempting
# the commit two or three times after trying to fix the formatting by hand
FILES=$(git diff --cached --name-only --diff-filter=ACMRTUXB | grep -E '(.*\.(rs))$')
echo "Running formatting with cargo fmt..."
cargo fmt -- $FILES
git add $FILES
@withzombies
withzombies / install-api.py
Created September 21, 2016 04:21
Install the Binary Ninja Python API
#!/usr/bin/env python
import os
import sys
import os.path
import site
try:
import binaryninja
print "Binary Ninja API Installed"
@withzombies
withzombies / recommit
Created April 30, 2025 19:59
rust git recommit script
#!/bin/bash
# Check formatting
echo "Checking formatting with cargo fmt..."
if ! cargo fmt --all -- --check; then
echo "Error: Code is not formatted. Please run 'cargo fmt --all' before committing."
exit 1
fi
# Run Clippy linter
@withzombies
withzombies / crackaddr_vuln.c
Last active April 22, 2025 21:52
halvar's reimplementation of mark dowd's crackaddr vulnerability
/*
Copyright (c) 2011, Thomas Dullien
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer. Redistributions
@withzombies
withzombies / lazy_buffer_reader.rs
Last active March 27, 2025 16:15
A class that turns a Read reader into a Read + Seek reader
#![allow(incomplete_features)]
#![feature(specialization)]
use std::cmp::min;
use std::io;
use std::io::{Read, Seek, SeekFrom};
pub trait ReadSeek: Read + Seek {}
impl<T: Read + Seek> ReadSeek for T {}
@withzombies
withzombies / gist:d18171b6776c8a465e18
Last active February 10, 2025 02:33
IDA SDK Build Instructions
To build the IDA and HexRays SDK on Mac OS X:
1. Unzip the sdk
2. Copy the libida.dylib and libida64.dylib (from your IDA install) into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 (these actually might go into bin and not lib...)
3. Install libiconv via brew (mine was libiconv.2.4.0.dylib)
4. Copy libiconv.2.4.0.dylib into idasdk67/lib/x86_mac_gcc_32 and idasdk67/lib/x64_mac_gcc_64 and rename it to libiconv.2.2.0.dylib
5. Copy the hexrays_sdk
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/include/* idasdk67/include/
cp -r /Applications/IDA Pro 6.7/IDA binaries/plugins/hexrays_sdk/plugins/* idasdk67/plugins/
6. Edit the plugin makefile to remove qwindow
CREATE TABLE _SqliteDatabaseProperties (key TEXT, value TEXT, UNIQUE(key));
CREATE TABLE deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL);
CREATE TABLE sqlite_sequence(name,seq);
CREATE TABLE chat_handle_join (chat_id INTEGER REFERENCES chat (ROWID) ON DELETE CASCADE, handle_id INTEGER REFERENCES handle (ROWID) ON DELETE CASCADE, UNIQUE(chat_id, handle_id));
CREATE TABLE sync_deleted_messages (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT );
CREATE TABLE message_processing_task (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, task_flags INTEGER NOT NULL );
CREATE TABLE handle (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, id TEXT NOT NULL, country TEXT, service TEXT NOT NULL, uncanonicalized_id TEXT, person_centric_id TEXT, UNIQUE (id, service) );
CREATE TABLE sync_deleted_chats (ROWID INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, guid TEXT NOT NULL, recordID TEXT,timestamp INTEGER);
CREATE TABLE message_attachment_join
@withzombies
withzombies / changed-crypt.txt
Last active May 3, 2023 19:51
Apple RSR changes 16.4.1 (a)
./.fseventsd/fseventsd-uuid
./System/Library/Accounts/DataclassOwners/Bookmarks.bundle/Bookmarks
./System/Library/Accounts/DataclassOwners/Bookmarks.bundle/Info.plist
./System/Library/Accounts/Notification/WebBookmarksNotificationPlugin.bundle/Info.plist
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.01
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.02
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.03
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.04
./System/Library/Caches/com.apple.dyld/dyld_shared_cache_arm64e.05