Skip to content

Instantly share code, notes, and snippets.

@bmaia
bmaia / find_cheat.lua
Created Aug 15, 2022
BizHawk Lua Script to automatically find cheat codes
View find_cheat.lua
console.clear()
st1 = 'save_stage1'
st2 = 'save_stage2'
st3 = 'save_stage3'
-- initial memory lookup method [increase, decrease, diff]
lookup_method = 'increase'
-- joystick definitions
View imgparser.py
#!/usr/bin/python3
import sys
#
# NBA Jam/Midway IMG format parser
# https://github.com/historicalsource/nba-jam
#
if __name__ == '__main__':
View luabot-strace.sh
1078 write(1<socket:[4448]>, "Hi. Mail me if u want: routerbots@_____.__\n", 44) = 44
1078 socket(AF_LOCAL, SOCK_STREAM, 0) = 7<socket:[22218]>
1078 bind(7<socket:[22218]>, {sa_family=AF_LOCAL, sun_path=@"bbot_mutex_202613"}, 110) = 0
1078 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xc6048) = 1079
1078 exit_group(0) = ?
1078 +++ exited with 0 +++
1079 setsid() = 1079
1079 clone( <unfinished ...>
(...)
1080 gettimeofday({500, 278384}, NULL) = 0
@bmaia
bmaia / anonabox-build
Created Apr 7, 2015
Anonabox (partially) Reproducible Build
View anonabox-build
# download files from https://github.com/lbthomsen/anonabox
~/anonabox $ ls -lha | grep mtd | grep -v extracted
-rw-r--r-- 1 bernardomr bernardomr 128K Abr 7 01:15 mtd0
-rw-r--r-- 1 bernardomr bernardomr 1,1M Abr 7 01:15 mtd1
-rw-r--r-- 1 bernardomr bernardomr 15M Abr 7 01:15 mtd2
-rw-r--r-- 1 bernardomr bernardomr 13M Abr 7 01:15 mtd3
-rw-r--r-- 1 bernardomr bernardomr 64K Abr 7 01:15 mtd4
-rw-r--r-- 1 bernardomr bernardomr 48K Abr 7 01:15 mtd5
# unpack firmware using binwalk
View gist:9042869
python binwally.py squashfs-root squashfs-root-TheMoon
View gist:9042866
pmemsave 0 0xFFFFFFF memory.raw
View gist:9042862
apt-get install strace
strace -o /root/strace.txt -e trace=open,read,write,readv,writev,recv,recvfrom,send,sendto,network chroot . ./tmp/EXr.pdf
View gist:9042842
mount --bind /dev /mnt/squashfs-root/dev
mount --bind /proc /mnt/squashfs-root/proc
mount --bind /sys /mnt/squashfs-root/sys
mount --bind /dev/pts /mnt/squashfs-root/dev/pts
cp /etc/resolv.conf /mnt/squashfs-root/tmp/resolv.conf
View gist:9042835
wget http://downloads.linksys.com/downloads/firmware/FW_E2500_1.0.07.001_US_20121129.bin
binwalk -Me FW_E2500_1.0.07.001_US_20121129.bin
tar -cpvzf e2500.tar.gz squashfs-root/
View gist:9042823
udhcpc -i br-lan
echo nameserver 8.8.8.8 > /etc/resolv.conf