Ignore:
Timestamp:
Jan 4, 2007, 2:09:04 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Implement -P / --protect.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/zzuf.c

    r1546 r1554  
    111111            { "stdin",     0, NULL, 'i' },
    112112            { "include",   1, NULL, 'I' },
     113            { "protect",   1, NULL, 'P' },
    113114            { "quiet",     0, NULL, 'q' },
    114115            { "ratio",     1, NULL, 'r' },
     
    118119            { "version",   0, NULL, 'v' },
    119120        };
    120         int c = getopt_long(argc, argv, "B:cdE:F:hiI:qr:s:ST:v",
     121        int c = getopt_long(argc, argv, "B:cdE:F:hiI:P:qr:s:ST:v",
    121122                            long_options, &option_index);
    122123#   else
    123124#       define MOREINFO "Try `%s -h' for more information.\n"
    124         int c = getopt(argc, argv, "B:cdE:F:hiI:qr:s:ST:v");
     125        int c = getopt(argc, argv, "B:cdE:F:hiI:P:qr:s:ST:v");
    125126#   endif
    126127        if(c == -1)
     
    167168        case 'T': /* --max-time */
    168169            maxtime = atof(optarg);
     170            break;
     171        case 'P': /* --protect */
     172            setenv("ZZUF_PROTECT", optarg, 1);
    169173            break;
    170174        case 'q': /* --quiet */
     
    542546static void usage(void)
    543547{
    544     printf("Usage: zzuf [ -vqdhic ] [ -r ratio ] [ -s seed | -s start:stop ]\n");
    545     printf("                        [ -F children ] [ -B bytes ] [ -T seconds ]\n");
    546     printf("                        [ -I include ] [ -E exclude ] COMMAND [ARGS]...\n");
     548    printf("Usage: zzuf [ -qdic ] [ -r ratio ] [ -s seed | -s start:stop ]\n");
     549    printf("                      [ -F children ] [ -B bytes ] [ -T seconds ] [ -P protect ]\n");
     550    printf("                      [ -I include ] [ -E exclude ] COMMAND [ARGS]...\n");
     551    printf("       zzuf -h\n");
     552    printf("       zzuf -v\n");
    547553    printf("Run COMMAND and randomly fuzz its input.\n");
    548554    printf("\n");
     
    554560    printf("  -E, --exclude <regex>    do not fuzz files matching <regex>\n");
    555561    printf("  -F, --fork <count>       number of concurrent children (default 1)\n");
    556     printf("  -h, --help               display this help and exit\n");
    557562    printf("  -i, --stdin              fuzz standard input\n");
    558563    printf("  -I, --include <regex>    only fuzz files matching <regex>\n");
     564    printf("  -P, --protect <list>     protect bytes and characters in <list>\n");
    559565    printf("  -q, --quiet              do not print children's messages\n");
    560566    printf("  -r, --ratio <ratio>      bit fuzzing ratio (default 0.004)\n");
     
    563569    printf("  -S, --signal             prevent children from diverting crashing signals\n");
    564570    printf("  -T, --max-time <n>       kill children that run for more than <n> seconds\n");
     571    printf("  -h, --help               display this help and exit\n");
    565572    printf("  -v, --version            output version information and exit\n");
    566573#   else
     
    570577    printf("  -E <regex>       do not fuzz files matching <regex>\n");
    571578    printf("  -F <count>       number of concurrent forks (default 1)\n");
    572     printf("  -h               display this help and exit\n");
    573579    printf("  -i               fuzz standard input\n");
    574580    printf("  -I <regex>       only fuzz files matching <regex>\n");
     581    printf("  -P <list>        protect bytes and characters in <list>\n");
    575582    printf("  -q               do not print the fuzzed application's messages\n");
    576583    printf("  -r <ratio>       bit fuzzing ratio (default 0.004)\n");
     
    579586    printf("  -S               prevent children from diverting crashing signals\n");
    580587    printf("  -T <n>           kill children that run for more than <n> seconds\n");
     588    printf("  -h               display this help and exit\n");
    581589    printf("  -v               output version information and exit\n");
    582590#   endif
Note: See TracChangeset for help on using the changeset viewer.