Skip to content

Instantly share code, notes, and snippets.

@brettowe
brettowe / functional_bug_scan.txt
Created June 3, 2026 16:33
a prompt for ai for bug hunting
Perform a comprehensive scan to identify any bugs that affects how the application functions. Any bug can become a security bug. Find everything that causes incorrect behavior, crashes, data loss, or deviations from expected operation.
BUG CATEGORIES
Detect issues across all of the following categories:
LOGIC ERRORS
- Incorrect conditional expressions (wrong operators, inverted logic)
- Off-by-one errors in loops, array indexing, or range checks
- Incorrect algorithm implementation or formula errors
- Missing or incorrect base cases in recursive functions
":set verbose=9
" not vi Compatable
set nocompatible
" encoding to utf-8
set tenc=utf-8
set enc=utf-8
" quiet erroring
@brettowe
brettowe / wgphys.sh
Last active September 5, 2025 16:43
wireguard namespace script, based off the script found here https://www.wireguard.com/netns/, made more automatic for pulling info from wg-quick configs and deal with a system using NetworkManager
#!/bin/bash
# based off the basic script idea found here: https://www.wireguard.com/netns/
set -ex
# namespace name
ns=physical
# ethernet type device list, seperated by spaces
physeth="enp1s0"
# wifi devices
physwifi="wlp2s0"
@brettowe
brettowe / x48-gcc15.patch
Created September 5, 2025 01:32
compile fix for x48-0.6.4 with gcc 15.2
diff -ur src/src/debugger.c src-update/src/debugger.c
--- src/src/debugger.c 2011-11-14 19:03:40.000000000 -0800
+++ src-update/src/debugger.c 2025-09-04 18:19:21.821404084 -0700
@@ -1585,7 +1585,7 @@
saturn.mem_cntl[1].config[0] = ram_base;
saturn.mem_cntl[1].config[1] = ram_mask;
- return;
+ return 0;
}
@brettowe
brettowe / fido-shutdown.py
Created May 4, 2022 21:28
script that uses a yubikey on headless machines without a power button to initialize shutdown
#!/usr/bin/env python3
# this script listens for a yubikey to be plugged into a device and shutdown if the button is pressed on it
# handy for headless devices that have no power buttons but need to be shutdown
# no verification is done to see if its an authorized yubi key
# changelog
# 20220504 - initial release
import functools
import os.path