diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-01-30 22:54:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 22:54:23 +0100 |
commit | 19ebdf31b999223e4965f701077f9af9d550e386 (patch) | |
tree | 9c6d27d58d0606d59725ef46766eb1961e908d31 /src/afl-fuzz.c | |
parent | b050c1158398dd07e25a6cd65234da84e5656fa6 (diff) | |
parent | 6e9fce1c2d654c92dbf8e6b8cc21a88d8cba9496 (diff) | |
download | afl++-19ebdf31b999223e4965f701077f9af9d550e386.tar.gz |
Merge pull request #178 from vanhauser-thc/CmpLog
Cmp log
Diffstat (limited to 'src/afl-fuzz.c')
-rw-r--r-- | src/afl-fuzz.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c index 9a7495ef..74bc0ee2 100644 --- a/src/afl-fuzz.c +++ b/src/afl-fuzz.c @@ -100,6 +100,7 @@ static void usage(u8* argv0) { " -f file - location read by the fuzzed program (stdin)\n" " -t msec - timeout for each run (auto-scaled, 50-%d ms)\n" " -m megs - memory limit for child process (%d MB)\n" + " -c program - enable CmpLog specifying a binary compiled for it\n" " -Q - use binary-only instrumentation (QEMU mode)\n" " -U - use unicorn-based instrumentation (Unicorn mode)\n" " -W - use qemu-based instrumentation with Wine (Wine " @@ -193,12 +194,20 @@ int main(int argc, char** argv) { init_seed = tv.tv_sec ^ tv.tv_usec ^ getpid(); while ((opt = getopt(argc, argv, - "+i:I:o:f:m:t:T:dnCB:S:M:x:QNUWe:p:s:V:E:L:hR")) > 0) + "+c:i:I:o:f:m:t:T:dnCB:S:M:x:QNUWe:p:s:V:E:L:hRP:")) > 0) switch (opt) { case 'I': infoexec = optarg; break; + case 'c': { + + cmplog_mode = 1; + cmplog_binary = ck_strdup(optarg); + break; + + } + case 's': { init_seed = strtoul(optarg, 0L, 10); @@ -858,6 +867,8 @@ int main(int argc, char** argv) { if (!out_file) setup_stdio_file(); + if (cmplog_binary) + check_binary(cmplog_binary); check_binary(argv[optind]); start_time = get_cur_time(); |