forked from google/AFL
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option -V: Show version number and exit (google#82)
* Add option -V to afl-analyze: Show version number and exit * Add option -V to afl-fuzz: Show version number and exit * Show option -V to afl-showmap: Show version number and exit * Add option -V to afl-tmin: Show version number and exit
- Loading branch information
1 parent
fc718c7
commit fcf734a
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -822,6 +822,10 @@ static void usage(u8* argv0) { | |
|
||
" -e - look for edge coverage only, ignore hit counts\n\n" | ||
|
||
"Other stuff:\n\n" | ||
|
||
" -V - show version number and exit\n\n" | ||
|
||
"For additional tips, please consult %s/README.\n\n", | ||
|
||
argv0, EXEC_TIMEOUT, MEM_LIMIT, doc_path); | ||
|
@@ -959,7 +963,7 @@ int main(int argc, char** argv) { | |
|
||
SAYF(cCYA "afl-analyze " cBRI VERSION cRST " by <[email protected]>\n"); | ||
|
||
while ((opt = getopt(argc,argv,"+i:f:m:t:eQ")) > 0) | ||
while ((opt = getopt(argc,argv,"+i:f:m:t:eQV")) > 0) | ||
|
||
switch (opt) { | ||
|
||
|
@@ -1039,6 +1043,11 @@ int main(int argc, char** argv) { | |
qemu_mode = 1; | ||
break; | ||
|
||
case 'V': /* Show version number */ | ||
|
||
/* Version number has been printed already, just quit. */ | ||
exit(0); | ||
|
||
default: | ||
|
||
usage(argv[0]); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -833,6 +833,10 @@ static void usage(u8* argv0) { | |
" -e - solve for edge coverage only, ignore hit counts\n" | ||
" -x - treat non-zero exit codes as crashes\n\n" | ||
|
||
"Other stuff:\n\n" | ||
|
||
" -V - show version number and exit\n\n" | ||
|
||
"For additional tips, please consult %s/README.\n\n", | ||
|
||
argv0, EXEC_TIMEOUT, MEM_LIMIT, doc_path); | ||
|
@@ -986,7 +990,7 @@ int main(int argc, char** argv) { | |
|
||
SAYF(cCYA "afl-tmin " cBRI VERSION cRST " by <[email protected]>\n"); | ||
|
||
while ((opt = getopt(argc,argv,"+i:o:f:m:t:B:xeQ")) > 0) | ||
while ((opt = getopt(argc,argv,"+i:o:f:m:t:B:xeQV")) > 0) | ||
|
||
switch (opt) { | ||
|
||
|
@@ -1098,6 +1102,11 @@ int main(int argc, char** argv) { | |
read_bitmap(optarg); | ||
break; | ||
|
||
case 'V': /* Show version number */ | ||
|
||
/* Version number has been printed already, just quit. */ | ||
exit(0); | ||
|
||
default: | ||
|
||
usage(argv[0]); | ||
|