Skip to content

Instantly share code, notes, and snippets.

@wyattearp
wyattearp / summarize_junit.py
Created February 18, 2023 00:17
Generate a summary of Junit unit data from potentially multiple test suites
#!/usr/bin/env python3
# If it doesn't work, blame ChatGPT because I asked it to do this while I was fixing something else
import xml.etree.ElementTree as ET
import argparse
def summarize_junit_results(file_path):
try:
tree = ET.parse(file_path)
root = tree.getroot()
@wyattearp
wyattearp / afl_it.sh
Last active September 2, 2022 13:09
quick busybox qemu runner for ARM
#AFL_DEBUG=1 \
AFL_SKIP_CPUFREQ=1 \
AFL_QEMU_PERSISTENT_ADDR=0xXXXX \
AFL_QEMU_PERSISTENT_RET=0xXXXX \
LD_LIBRARY_PATH=./lib \
QEMU_LD_PREFIX=./ \
USE_RAW_FORMAT=1 \
AFL_PRELOAD="/home/wyatt/git_repos/desockmulti/desockmulti.so" \
PREENY_DEBUG=1 \
PREENY_INFO=1 \
@wyattearp
wyattearp / ghidra.desktop
Created April 28, 2022 02:18
~/.local/share/applications/ghidra.desktop
[Desktop Entry]
Name=Ghidra
Comment=Ghidra Disassebler
Exec=/home/wyatt/.local/bin/ghidraRun
Terminal=false
Type=Application
Categories=Development;IDE;
Icon=/home/wyatt/.local/share/ghidra-icon.png
import os
import sys
import gdb
def run_cmd(cmd):
#tmpfile = '/tmp/tmp_cmd.txt'
#os.system(f'rm -f {tmpfile}')
#gdb.execute(f'set logging file {tmpfile}')
#gdb.execute(f'set logging on')
@wyattearp
wyattearp / printer_cam.sh
Created January 3, 2022 16:02
Ender 5 Logitech Camera Settings
#/bin/bash
# set the items for the Logitech camera
echo -n "setting custom camera commands.. "
/usr/bin/v4l2-ctl -c focus_auto=0
/usr/bin/v4l2-ctl -c focus_absolute=25
/usr/bin/v4l2-ctl -c zoom_absolute=100
echo "done"
# Special mode for GDB that allows to debug/disassemble REAL MODE x86 code
#
# It has been designed to be used with QEMU or BOCHS gdb-stub
#
# 08/2011 Hugo Mercier - GPL v3 license
#
# Freely inspired from "A user-friendly gdb configuration file" widely available
# on the Internet
set confirm off
@wyattearp
wyattearp / rc4brute.py
Created November 21, 2021 13:48 — forked from cosu/rc4brute.py
Educational tool to bruteforce RC4 encrypted files.
__author__ = 'cdumitru'
import sys
from Crypto.Cipher import ARC4
import numpy
import string
import itertools
from multiprocessing import Pool
from time import time
import cProfile
@wyattearp
wyattearp / auto_rotate_pics.sh
Created February 25, 2021 23:22
Quick script to batch convert a bunch of images with `convert` auto-orient
#!/bin/bash
mkdir -p out
mkdir -p bak
for i in `ls -1 *.jpg`; do
cp -v $i bak/$i;
convert $i -auto-orient out/$i;
done
mv out/* .
@wyattearp
wyattearp / end.gcode
Last active December 12, 2020 03:52
ender5-end.gcode
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G1 X220 Y220 ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
@wyattearp
wyattearp / starup.gcode
Created December 7, 2020 03:04
ender5 startup code
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
G28 ;Home
;G29 ;ABL
M420 S1 ;restore abl settings