From 9616996dcd623a094bbe975f7e11118d33523afb Mon Sep 17 00:00:00 2001 From: Niklas Baumstark Date: Mon, 16 Mar 2015 22:32:07 +0100 Subject: initial commit --- dump | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 dump (limited to 'dump') diff --git a/dump b/dump new file mode 100755 index 0000000..bc9d2ec --- /dev/null +++ b/dump @@ -0,0 +1,16 @@ +#!/bin/bash +if [[ $# < 1 ]]; then + echo >&2 "Usage: $0 id [name1 [name2 ...]]" + exit 2 +fi +id=$1 +shift 1 +if [[ $# == 0 ]]; then + names="__libc_start_main_ret system dup2 recv str_bin_sh" +else + names="$@" +fi +for name in $names; do + offset=`cat db/${id}.symbols | grep "^$name " | cut -d' ' -f2` + echo "offset_${name} = 0x${offset}" +done -- cgit v1.2.3-54-g00ecf