diff options
author | Alexander Shvedov <60114847+a-shvedov@users.noreply.github.com> | 2024-05-30 11:13:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 11:13:56 +0300 |
commit | 64293cdc82e4b313532e46788782cd43cdbefc2c (patch) | |
tree | 55a641390cb1f82299691d2a164a31c72d383add | |
parent | f8a5f1cd9ea907654f42fa06ce6b6bfd4b8c1b13 (diff) | |
download | afl++-64293cdc82e4b313532e46788782cd43cdbefc2c.tar.gz |
Create make_dict.sh
-rw-r--r-- | utils/libtokencap/make_dict.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/libtokencap/make_dict.sh b/utils/libtokencap/make_dict.sh new file mode 100644 index 00000000..92c383fa --- /dev/null +++ b/utils/libtokencap/make_dict.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +LD_PRELOAD_PATH="/path/to/libtokencap.so" +AFL_TOKEN_FILE=${PWD}/temp_output.txt +AFL_DICT_FILE=$(basename ${target_output}) +target_bin="/path/to/target/program" +target_output="/path/to/target/output" +timeout_sec="5" + +{ +touch $AFL_TOKEN_FILE +for i in $(find ${target_output} -type f -name "id*"); do + LD_PRELOAD=${LD_PRELOAD_PATH} \ + timeout -s SIGKILL ${timeout_sec} \ + ${target_bin} ${i} +done +} >${AFL_TOKEN_FILE} + +sort -u ${AFL_TOKEN_FILE} >${AFL_DICT_FILE}.dict |