diff --git a/README b/README index c2c94c3..955320e 100644 --- a/README +++ b/README @@ -22,7 +22,7 @@ input and restricting fuzzing to filenames matching the regular expression "foo[.]jpeg" (because convert will also open its own configuration files and we do not want zzuf to fuzz them): - # zzuf -i 'foo[.]jpeg' convert -- foo.jpeg -format tga /dev/null + # zzuf -I 'foo[.]jpeg' convert -- foo.jpeg -format tga /dev/null Fuzz the input of VLC, using file movie.avi as the original input, and generate fuzzy-movie.avi which is a file that can be fed to VLC to reproduce @@ -36,12 +36,12 @@ the behaviour without using zzuf: Fuzz mplayer's input with seeds 0 to 9999 and kill processes that take more than one minute to read the movie file: - # zzuf -q -s 0:10000 -T 60 -r 0.02 -i movie.avi \ + # zzuf -q -s 0:10000 -T 60 -r 0.02 -I movie.avi \ mplayer movie.avi -- -benchmark -vo null -fps 1000 Same as above with up to 15 simultaneous child processes because we are playing a sound file: - # zzuf -F 15 -q -s 0:10000 -T 60 -r 0.02 -i song.mp3 \ + # zzuf -F 15 -q -s 0:10000 -T 60 -r 0.02 -I song.mp3 \ mplayer song.mp3 -- -benchmark -ao null diff --git a/doc/zzuf.1 b/doc/zzuf.1 index b882bdc..102d92c 100644 --- a/doc/zzuf.1 +++ b/doc/zzuf.1 @@ -32,10 +32,10 @@ zzuf \- multiple purpose fuzzer .IP .PD [ -.B \-i +.B \-I .I include ] [ -.B \-e +.B \-E .I exclude ] .I COMMAND [ARGS]... @@ -111,13 +111,13 @@ situations. Hide the output of the fuzzed application. This is useful if the application is very verbose but only its exit code is really useful to you. .TP -.B \-i, \-\-include +.B \-I, \-\-include Only fuzz files whose name matches the .B regular expression. Use this for instance if your application reads configuration files in many places and you do not want them to be fuzzed. .TP -.B \-e, \-\-exclude +.B \-E, \-\-exclude Do not fuzz files whose name matches the .B regular expression. This option supersedes anything that is specified by the @@ -167,7 +167,7 @@ will also open its own configuration files and we do not want to fuzz them): .nf -.B % zzuf -i "foo[.]jpeg" convert -- foo.jpeg -format tga /dev/null +.B % zzuf -I "foo[.]jpeg" convert -- foo.jpeg -format tga /dev/null .fi Fuzz the input of @@ -197,7 +197,7 @@ and killing if it takes more than one minute to read the file: .fn -.B % zzuf -q -s 0:10000 -F 3 -T 60 -r 0.02 -i movie.avi mplayer movie.avi -- -benchmark -vo null -fps 1000 +.B % zzuf -q -s 0:10000 -F 3 -T 60 -r 0.02 -I movie.avi mplayer movie.avi -- -benchmark -vo null -fps 1000 .fi .RI diff --git a/src/zzuf.c b/src/zzuf.c index 4186db9..411cea6 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -95,8 +95,8 @@ int main(int argc, char *argv[]) static struct option long_options[] = { /* Long option, needs arg, flag, short option */ - { "include", 1, NULL, 'i' }, - { "exclude", 1, NULL, 'e' }, + { "include", 1, NULL, 'I' }, + { "exclude", 1, NULL, 'E' }, { "seed", 1, NULL, 's' }, { "ratio", 1, NULL, 'r' }, { "fork", 1, NULL, 'F' }, @@ -107,21 +107,21 @@ int main(int argc, char *argv[]) { "help", 0, NULL, 'h' }, { "version", 0, NULL, 'v' }, }; - int c = getopt_long(argc, argv, "i:e:s:r:F:B:T:qdhv", + int c = getopt_long(argc, argv, "I:E:s:r:F:B:T:qdhv", long_options, &option_index); # else # define MOREINFO "Try `%s -h' for more information.\n" - int c = getopt(argc, argv, "i:e:s:r:F:B:T:qdhv"); + int c = getopt(argc, argv, "I:E:s:r:F:B:T:qdhv"); # endif if(c == -1) break; switch(c) { - case 'i': /* --include */ + case 'I': /* --include */ setenv("ZZUF_INCLUDE", optarg, 1); break; - case 'e': /* --exclude */ + case 'E': /* --exclude */ setenv("ZZUF_EXCLUDE", optarg, 1); break; case 's': /* --seed */ @@ -427,7 +427,7 @@ static void usage(void) { printf("Usage: zzuf [ -vqdh ] [ -r ratio ] [ -s seed | -s start:stop]\n"); printf(" [ -F children ] [ -B bytes ] [ -T seconds ]\n"); - printf(" [ -i include ] [ -e exclude ] COMMAND [ARGS]...\n"); + printf(" [ -I include ] [ -E exclude ] COMMAND [ARGS]...\n"); printf("Run COMMAND and randomly fuzz its input files.\n"); printf("\n"); printf("Mandatory arguments to long options are mandatory for short options too.\n"); @@ -439,8 +439,8 @@ static void usage(void) printf(" -B, --max-bytes kill children that output more than bytes\n"); printf(" -T, --max-time kill children that run for more than seconds\n"); printf(" -q, --quiet do not print children's messages\n"); - printf(" -i, --include only fuzz files matching \n"); - printf(" -e, --exclude do not fuzz files matching \n"); + printf(" -I, --include only fuzz files matching \n"); + printf(" -E, --exclude do not fuzz files matching \n"); printf(" -d, --debug print debug messages\n"); printf(" -h, --help display this help and exit\n"); printf(" -v, --version output version information and exit\n"); @@ -452,8 +452,8 @@ static void usage(void) printf(" -B kill children that output more than bytes\n"); printf(" -T kill children that run for more than seconds\n"); printf(" -q do not print the fuzzed application's messages\n"); - printf(" -i only fuzz files matching \n"); - printf(" -e do not fuzz files matching \n"); + printf(" -I only fuzz files matching \n"); + printf(" -E do not fuzz files matching \n"); printf(" -d print debug messages\n"); printf(" -h display this help and exit\n"); printf(" -v output version information and exit\n");