diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-06-23 15:08:49 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-06-23 15:08:49 +0200 |
commit | aad433e11efa4a8350a264313c66db8ef6d17088 (patch) | |
tree | a8249027f61f17e259e4a4ef6f2339e0394b1e35 /examples/aflpp_driver/aflpp_driver.cpp | |
parent | c1eb2bccaae8f5b31546e6af3b00583e46bd842b (diff) | |
parent | 59e1a18197b08b08ad9e75b23fb6a5c740a0b9dd (diff) | |
download | afl++-aad433e11efa4a8350a264313c66db8ef6d17088.tar.gz |
Merge branch 'dev' of github.com:vanhauser-thc/AFLplusplus into dev
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver.cpp')
-rw-r--r-- | examples/aflpp_driver/aflpp_driver.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.cpp b/examples/aflpp_driver/aflpp_driver.cpp index a60eb264..cf96dc4f 100644 --- a/examples/aflpp_driver/aflpp_driver.cpp +++ b/examples/aflpp_driver/aflpp_driver.cpp @@ -54,6 +54,10 @@ If 1, close stdout at startup. If 2 close stderr; if 3 close both. #include <iostream> #include <vector> +#ifdef _DEBUG +#include "hash.h" +#endif + // Platform detection. Copied from FuzzerInternal.h #ifdef __linux__ #define LIBFUZZER_LINUX 1 @@ -273,7 +277,11 @@ int main(int argc, char **argv) { int num_runs = 0; while (__afl_persistent_loop(N)) { #ifdef _DEBUG - fprintf(stderr, "len: %u\n", *__afl_fuzz_len); + fprintf(stderr, "CLIENT crc: %08x len: %u\n", hash32(__afl_fuzz_ptr, *__afl_fuzz_len, 0xa5b35705), *__afl_fuzz_len); + fprintf(stderr, "RECV:"); + for (int i = 0; i < *__afl_fuzz_len; i++) + fprintf(stderr, "%02x", __afl_fuzz_ptr[i]); + fprintf(stderr,"\n"); #endif if (*__afl_fuzz_len) { num_runs++; |