From db77b126f9202bb602c41880e248801f13e26b5a Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 18 Dec 2006 13:23:56 +0000 Subject: [PATCH] * Improved help. --- src/zzuf.c | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/src/zzuf.c b/src/zzuf.c index c5e5f13..a3ad58c 100644 --- a/src/zzuf.c +++ b/src/zzuf.c @@ -106,7 +106,8 @@ int main(int argc, char *argv[]) if(optind >= argc) { - usage(); + printf("%s: missing argument\n", argv[0]); + printf(MOREINFO, argv[0]); return -1; } @@ -149,21 +150,43 @@ static void set_ld_preload(char const *progpath) static void version(void) { - printf("zzuf %s by Sam Hocevar \n", VERSION); + printf("zzuf %s\n", VERSION); + printf("Copyright (C) 2006 Sam Hocevar \n"); + printf("This is free software. You may redistribute copies of it under the\n"); + printf("terms of the Do What The Fuck You Want To Public License, Version 2\n"); + printf(".\n"); + printf("There is NO WARRANTY, to the extent permitted by law.\n"); + printf("\n"); + printf("Written by Sam Hocevar. Report bugs to .\n"); } #if defined(HAVE_GETOPT_H) static void usage(void) { printf("Usage: zzuf [ -vdh ] [ -i include ] [ -e exclude ]\n"); - printf(" [ -r ratio ] [ -s seed ] PROGRAM ARGS...\n"); + printf(" [ -r ratio ] [ -s seed ] 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"); # ifdef HAVE_GETOPT_LONG - printf(" -h, --help display this help and exit\n"); - printf(" -v, --version output version information and exit\n"); + printf(" -i, --include only fuzz files matching \n"); + printf(" -e, --exclude do not fuzz files matching \n"); + printf(" -r, --ratio bit fuzzing ratio (default 0.004)\n"); + printf(" -s, --seed random seed (default 0)\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"); # else - printf(" -h display this help and exit\n"); - printf(" -v output version information and exit\n"); + printf(" -i only fuzz files matching \n"); + printf(" -e do not fuzz files matching \n"); + printf(" -r bit fuzzing ratio (default 0.004)\n"); + printf(" -s random seed (default 0)\n"); + printf(" -d print debug messages\n"); + printf(" -h display this help and exit\n"); + printf(" -v output version information and exit\n"); # endif + printf("\n"); + printf("Written by Sam Hocevar. Report bugs to .\n"); } #endif