diff options
| author | vanhauser-thc <vh@thc.org> | 2023-08-31 14:42:16 +0200 |
|---|---|---|
| committer | vanhauser-thc <vh@thc.org> | 2023-08-31 14:42:16 +0200 |
| commit | 8f5c510be18df03fe201c1bae9bde8e7e7bc0bd9 (patch) | |
| tree | c15fce54f5e730a74f9c2ca9e6f15a2cc2f84471 /frida_mode/util | |
| parent | 88ca5c75634d8edfa268005f2e1855a35a5b9e2e (diff) | |
| parent | 5020e6b275adf0d74e9174b278ff417b5c6a64d2 (diff) | |
| download | afl++-8f5c510be18df03fe201c1bae9bde8e7e7bc0bd9.tar.gz | |
Merge branch 'dev' of ssh://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'frida_mode/util')
| -rwxr-xr-x | frida_mode/util/frida_get_symbol_addr.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/frida_mode/util/frida_get_symbol_addr.sh b/frida_mode/util/frida_get_symbol_addr.sh index fb0002b7..2e682255 100755 --- a/frida_mode/util/frida_get_symbol_addr.sh +++ b/frida_mode/util/frida_get_symbol_addr.sh @@ -31,12 +31,13 @@ file=$(file $target|sed 's/.*: //') arch=$(echo $file|awk -F, '{print$2}'|tr -d ' ') bits=$(echo $file|sed 's/-bit .*//'|sed 's/.* //') pie=$(echo $file|grep -wqi pie && echo pie) +dso=$(echo $file|grep -wqi "shared object" && echo dso) test $(uname -s) = "Darwin" && symbol=_"$symbol" tmp_addr=$(nm "$target" | grep -i "T $symbol" | awk '{print$1}' | tr a-f A-F) test -z "$tmp_addr" && { echo Error: function $symbol not found 1>&2; exit 1; } -test -z "$pie" && { echo 0x$tmp_addr; exit 0; } +test -z "$pie" && test -z "$dso" && { echo 0x$tmp_addr; exit 0; } test -z "$base" && { test "$bits" = 32 -o "$bits" = 64 || { echo "Error: could not identify arch (bits=$bits)" 1>&2 ; exit 1; } |
