Ignore:
Timestamp:
Jan 13, 2007, 8:33:48 PM (14 years ago)
Author:
Sam Hocevar
Message:
  • Added auto-increment mode. Not very handy to use yet.
File:
1 edited

Legend:

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

    r1661 r1663  
    112112    for(;;)
    113113    {
    114 #   define OPTSTR "B:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:xhv"
     114#   define OPTSTR "AB:cC:dD:E:F:iI:mM:nP:qr:R:s:ST:xhv"
    115115#   ifdef HAVE_GETOPT_LONG
    116116#       define MOREINFO "Try `%s --help' for more information.\n"
     
    119119        {
    120120            /* Long option, needs arg, flag, short option */
     121            { "autoinc",     0, NULL, 'A' },
    121122            { "max-bytes",   1, NULL, 'B' },
    122123            { "cmdline",     0, NULL, 'c' },
     
    152153        switch(c)
    153154        {
     155        case 'A': /* --autoinc */
     156            setenv("ZZUF_AUTOINC", "1", 1);
     157            break;
    154158        case 'B': /* --max-bytes */
    155159            maxbytes = atoi(optarg);
     
    723727static void usage(void)
    724728{
    725     printf("Usage: zzuf [-cdimnqSx] [-r ratio] [-s seed | -s start:stop]\n");
    726     printf("                        [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
    727     printf("                        [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
    728     printf("                        [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
     729    printf("Usage: zzuf [-AcdimnqSx] [-r ratio] [-s seed | -s start:stop]\n");
     730    printf("                         [-D delay] [-F forks] [-C crashes] [-B bytes]\n");
     731    printf("                         [-T seconds] [-M bytes] [-P protect] [-R refuse]\n");
     732    printf("                         [-I include] [-E exclude] [PROGRAM [--] [ARGS]...]\n");
    729733#   ifdef HAVE_GETOPT_LONG
    730734    printf("       zzuf -h | --help\n");
     
    738742    printf("Mandatory arguments to long options are mandatory for short options too.\n");
    739743#   ifdef HAVE_GETOPT_LONG
     744    printf("  -A, --autoinc            increment seed each time a new file is opened\n");
    740745    printf("  -B, --max-bytes <n>      kill children that output more than <n> bytes\n");
    741746    printf("  -c, --cmdline            only fuzz files specified in the command line\n");
     
    762767    printf("  -v, --version            output version information and exit\n");
    763768#   else
     769    printf("  -A               increment seed each time a new file is opened\n");
    764770    printf("  -B <n>           kill children that output more than <n> bytes\n");
    765771    printf("  -c               only fuzz files specified in the command line\n");
Note: See TracChangeset for help on using the changeset viewer.