mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 03:18:07 +00:00
add --help/--version/...
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
# written by jhertz
|
# written by jhertz
|
||||||
#
|
#
|
||||||
|
|
||||||
test "$1" = "-h" -o "$1" = "-hh" && {
|
test "$1" = "-h" -o "$1" = "-hh" -o "$1" = "--help" && {
|
||||||
echo 'afl-persistent-config'
|
echo 'afl-persistent-config'
|
||||||
echo
|
echo
|
||||||
echo $0
|
echo $0
|
||||||
@ -17,6 +17,11 @@ test "$1" = "-h" -o "$1" = "-hh" && {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
echo "ERROR: Unknown option(s): $@"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "WARNING: This scripts makes permanent configuration changes to the system to"
|
echo "WARNING: This scripts makes permanent configuration changes to the system to"
|
||||||
echo " increase the performance for fuzzing. As a result, the system also"
|
echo " increase the performance for fuzzing. As a result, the system also"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
test "$1" = "-h" -o "$1" = "-hh" && {
|
test "$1" = "-h" -o "$1" = "-hh" -o "$1" = "--help" && {
|
||||||
echo 'afl-system-config by Marc Heuse <mh@mh-sec.de>'
|
echo 'afl-system-config by Marc Heuse <mh@mh-sec.de>'
|
||||||
echo
|
echo
|
||||||
echo $0
|
echo $0
|
||||||
@ -13,6 +13,10 @@ test "$1" = "-h" -o "$1" = "-hh" && {
|
|||||||
echo configuration options.
|
echo configuration options.
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
echo "ERROR: Unknown option(s): $@"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
DONE=
|
DONE=
|
||||||
PLATFORM=`uname -s`
|
PLATFORM=`uname -s`
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
- added AFL_IGNORE_SEED_PROBLEMS to skip over seeds that time out instead
|
- added AFL_IGNORE_SEED_PROBLEMS to skip over seeds that time out instead
|
||||||
of exiting with an error message
|
of exiting with an error message
|
||||||
- allow -S/-M naming up to 50 characters (from 24)
|
- allow -S/-M naming up to 50 characters (from 24)
|
||||||
|
- added scale support to CMPLOG (-l S)
|
||||||
|
- added --version and --help command line parameters
|
||||||
- afl-whatsup:
|
- afl-whatsup:
|
||||||
- detect instanced that are starting up and show them as such as not dead
|
- detect instanced that are starting up and show them as such as not dead
|
||||||
- now also shows coverage reached
|
- now also shows coverage reached
|
||||||
|
@ -872,7 +872,7 @@ static void __afl_start_snapshots(void) {
|
|||||||
|
|
||||||
if (__afl_debug) {
|
if (__afl_debug) {
|
||||||
|
|
||||||
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
fprintf(stderr, "DEBUG: target forkserver recv: %08x\n", was_killed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1139,7 +1139,7 @@ static void __afl_start_forkserver(void) {
|
|||||||
|
|
||||||
if (__afl_debug) {
|
if (__afl_debug) {
|
||||||
|
|
||||||
fprintf(stderr, "target forkserver recv: %08x\n", was_killed);
|
fprintf(stderr, "DEBUG: target forkserver recv: %08x\n", was_killed);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1472,6 +1472,7 @@ __attribute__((constructor(1))) void __afl_auto_second(void) {
|
|||||||
|
|
||||||
__afl_debug = 1;
|
__afl_debug = 1;
|
||||||
fprintf(stderr, "DEBUG: debug enabled\n");
|
fprintf(stderr, "DEBUG: debug enabled\n");
|
||||||
|
fprintf(stderr, "DEBUG: AFL++ afl-compiler-rt" VERSION "\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1700,11 +1701,12 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
|||||||
|
|
||||||
if (__afl_debug) {
|
if (__afl_debug) {
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(
|
||||||
"Running __sanitizer_cov_trace_pc_guard_init: %p-%p (%lu edges) "
|
stderr,
|
||||||
"after_fs=%u\n",
|
"DEBUG: Running __sanitizer_cov_trace_pc_guard_init: %p-%p (%lu edges) "
|
||||||
start, stop, (unsigned long)(stop - start),
|
"after_fs=%u\n",
|
||||||
__afl_already_initialized_forkserver);
|
start, stop, (unsigned long)(stop - start),
|
||||||
|
__afl_already_initialized_forkserver);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1802,7 +1804,8 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
|||||||
u8 ignore_dso_after_fs = !!getenv("AFL_IGNORE_PROBLEMS_COVERAGE");
|
u8 ignore_dso_after_fs = !!getenv("AFL_IGNORE_PROBLEMS_COVERAGE");
|
||||||
if (__afl_debug && ignore_dso_after_fs) {
|
if (__afl_debug && ignore_dso_after_fs) {
|
||||||
|
|
||||||
fprintf(stderr, "Ignoring coverage from dynamically loaded code\n");
|
fprintf(stderr,
|
||||||
|
"DEBUG: Ignoring coverage from dynamically loaded code\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1872,7 +1875,8 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
|||||||
if (__afl_debug) {
|
if (__afl_debug) {
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Done __sanitizer_cov_trace_pc_guard_init: __afl_final_loc = %u\n",
|
"DEBUG: Done __sanitizer_cov_trace_pc_guard_init: __afl_final_loc "
|
||||||
|
"= %u\n",
|
||||||
__afl_final_loc);
|
__afl_final_loc);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1883,7 +1887,7 @@ void __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop) {
|
|||||||
|
|
||||||
if (__afl_debug) {
|
if (__afl_debug) {
|
||||||
|
|
||||||
fprintf(stderr, "Reinit shm necessary (+%u)\n",
|
fprintf(stderr, "DEBUG: Reinit shm necessary (+%u)\n",
|
||||||
__afl_final_loc - __afl_map_size);
|
__afl_final_loc - __afl_map_size);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -486,6 +486,22 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
struct timezone tz;
|
struct timezone tz;
|
||||||
|
|
||||||
|
doc_path = access(DOC_PATH, F_OK) != 0 ? (u8 *)"docs" : (u8 *)DOC_PATH;
|
||||||
|
|
||||||
|
if (argc > 1 && strcmp(argv_orig[1], "--version") == 0) {
|
||||||
|
|
||||||
|
printf("afl-fuzz" VERSION "\n");
|
||||||
|
exit(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc > 1 && strcmp(argv_orig[1], "--help") == 0) {
|
||||||
|
|
||||||
|
usage(argv_orig[0], 1);
|
||||||
|
exit(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#if defined USE_COLOR && defined ALWAYS_COLORED
|
#if defined USE_COLOR && defined ALWAYS_COLORED
|
||||||
if (getenv("AFL_NO_COLOR") || getenv("AFL_NO_COLOUR")) {
|
if (getenv("AFL_NO_COLOR") || getenv("AFL_NO_COLOUR")) {
|
||||||
|
|
||||||
@ -515,8 +531,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
SAYF(cCYA "afl-fuzz" VERSION cRST
|
SAYF(cCYA "afl-fuzz" VERSION cRST
|
||||||
" based on afl by Michal Zalewski and a large online community\n");
|
" based on afl by Michal Zalewski and a large online community\n");
|
||||||
|
|
||||||
doc_path = access(DOC_PATH, F_OK) != 0 ? (u8 *)"docs" : (u8 *)DOC_PATH;
|
|
||||||
|
|
||||||
gettimeofday(&tv, &tz);
|
gettimeofday(&tv, &tz);
|
||||||
rand_set_seed(afl, tv.tv_sec ^ tv.tv_usec ^ getpid());
|
rand_set_seed(afl, tv.tv_sec ^ tv.tv_usec ^ getpid());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user