RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: j...@rpm5.org Module: skipfish Date: 06-Jul-2010 20:26:23 Branch: HEAD Handle: 2010070618262201 Modified files: skipfish .cvsignore Makefile.am configure.ac skipfish.c Log: - skipfish: stub-in POPT handling. - skipfish: add libtool and -lrpmio linkage. Summary: Revision Changes Path 1.5 +2 -0 skipfish/.cvsignore 1.4 +14 -5 skipfish/Makefile.am 1.6 +2 -0 skipfish/configure.ac 1.3 +85 -1 skipfish/skipfish.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: skipfish/.cvsignore ============================================================================ $ cvs diff -u -r1.4 -r1.5 .cvsignore --- skipfish/.cvsignore 6 Jul 2010 17:21:53 -0000 1.4 +++ skipfish/.cvsignore 6 Jul 2010 18:26:22 -0000 1.5 @@ -16,8 +16,10 @@ configure depcomp install-sh +ltmain.sh mkinstalldirs missing stamp-h1 same_test skipfish +skipfish.wl @@ . patch -p0 <<'@@ .' Index: skipfish/Makefile.am ============================================================================ $ cvs diff -u -r1.3 -r1.4 Makefile.am --- skipfish/Makefile.am 6 Jul 2010 17:20:21 -0000 1.3 +++ skipfish/Makefile.am 6 Jul 2010 18:26:23 -0000 1.4 @@ -10,9 +10,18 @@ AM_CPPFLAGS = \ -I. \ - -I$(srcdir) - -AM_CFLAGS = $(OPENMP_CFLAGS) + -I$(srcdir) \ + -I.. \ + -I../rpmio + +AM_CFLAGS = -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT $(OPENMP_CFLAGS) + +RPMMISC_LDADD_COMMON = \ + ../misc/librpmmisc.la + +RPMIO_LDADD_COMMON = \ + ../rpmio/librpmio.la \ + $(RPMMISC_LDADD_COMMON) bin_PROGRAMS = skipfish @@ -26,9 +35,9 @@ skipfish_SOURCES = \ $(SKIPFISH_COMMON) skipfish.c skipfish_LDFLAGS = $(LDFLAGS) -skipfish_LDADD = +skipfish_LDADD = $(RPMIO_LDADD_COMMON) same_test_SOURCES = \ $(SKIPFISH_COMMON) same_test.c same_test_LDFLAGS = $(LDFLAGS) -same_test_LDADD = +same_test_LDADD = $(RPMIO_LDADD_COMMON) @@ . patch -p0 <<'@@ .' Index: skipfish/configure.ac ============================================================================ $ cvs diff -u -r1.5 -r1.6 configure.ac --- skipfish/configure.ac 6 Jul 2010 17:20:21 -0000 1.5 +++ skipfish/configure.ac 6 Jul 2010 18:26:23 -0000 1.6 @@ -22,10 +22,12 @@ AC_PROG_CC_STDC AC_PROG_CC AC_PROG_CPP +AC_PROG_CXX AC_USE_SYSTEM_EXTENSIONS AC_PROG_INSTALL +AC_PROG_LIBTOOL dnl # GCC specifics AC_PROG_GCC_TRADITIONAL @@ . patch -p0 <<'@@ .' Index: skipfish/skipfish.c ============================================================================ $ cvs diff -u -r1.2 -r1.3 skipfish.c --- skipfish/skipfish.c 5 Jul 2010 18:02:53 -0000 1.2 +++ skipfish/skipfish.c 6 Jul 2010 18:26:23 -0000 1.3 @@ -34,6 +34,11 @@ #include <termios.h> #include <fcntl.h> +#include <poptIO.h> +#define _(Text) Text +#define D_(Text) Text +#define N_(Text) Text + #include "types.h" #include "alloc-inl.h" #include "string-inl.h" @@ -138,10 +143,87 @@ clear_screen = 1; } +static struct poptOption rpmskfOptionsTable[] = { + +#ifdef NOTYET + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioAllPoptTable, 0, + N_(" Common options for all rpmio executables:"), NULL }, +#endif + + POPT_AUTOALIAS + POPT_AUTOHELP + + { NULL, (char)-1, POPT_ARG_INCLUDE_TABLE, NULL, 0, + N_("\ +Usage: %s [ options ... ] -o output_dir start_url [ start_url2 ... ]\n\ +\n\ +Authentication and access options:\n\ +\n\ + -A user:pass - use specified HTTP authentication credentials\n\ + -F host:IP - pretend that 'host' resolves to 'IP'\n\ + -C name=val - append a custom cookie to all requests\n\ + -H name=val - append a custom HTTP header to all requests\n\ + -b (i|f) - use headers consistent with MSIE / Firefox\n\ + -N - do not accept any new cookies\n\ +\n\ +Crawl scope options:\n\ +\n\ + -d max_depth - maximum crawl tree depth (%u)\n\ + -c max_child - maximum children to index per node (%u)\n\ + -r r_limit - max total number of requests to send (%u)\n\ + -p crawl%% - node and link crawl probability (100%%)\n\ + -q hex - repeat probabilistic scan with given seed\n\ + -I string - only follow URLs matching 'string'\n\ + -X string - exclude URLs matching 'string'\n\ + -S string - exclude pages containing 'string'\n\ + -K string - do not fuzz parameters named 'string'\n\ + -D domain - crawl cross-site links to another domain\n\ + -B domain - trust, but do not crawl, another domain\n\ + -Z - do not descend into 5xx locations\n\ + -O - do not submit any forms\n\ + -P - do not parse HTML, etc, to find new links\n\ +\n\ +Reporting options:\n\ +\n\ + -o dir - write output to specified directory (required)\n\ + -J - be less picky about MIME / charset mismatches\n\ + -M - log warnings about mixed content\n\ + -E - log all HTTP/1.0 / HTTP/1.1 caching intent mismatches\n\ + -U - log all external URLs and e-mails seen\n\ + -Q - completely suppress duplicate nodes in reports\n\ + -u - be quiet, disable realtime progress stats\n\ +\n\ +Dictionary management options:\n\ +\n\ + -W wordlist - load an alternative wordlist (%s)\n\ + -L - do not auto-learn new keywords for the site\n\ + -V - do not update wordlist based on scan results\n\ + -Y - do not fuzz extensions in directory brute-force\n\ + -R age - purge words hit more than 'age' scans ago\n\ + -T name=val - add new form auto-fill rule\n\ + -G max_guess - maximum number of keyword guesses to keep (%d)\n\ +\n\ +Performance settings:\n\ +\n\ + -g max_conn - max simultaneous TCP connections, global (%u)\n\ + -m host_conn - max simultaneous connections, per target IP (%u)\n\ + -f max_fail - max number of consecutive HTTP errors (%u)\n\ + -t req_tmout - total request response timeout (%u s)\n\ + -w rw_tmout - individual network I/O timeout (%u s)\n\ + -i idle_tmout - timeout on idle HTTP connections (%u s)\n\ + -s s_limit - response size limit (%u B)\n\ +\n\ +Send comments and complaints to <lcam...@google.com>.\n\ +"), NULL }, + + POPT_TABLEEND +}; /* Main entry point */ -int main(int argc, char** argv) { +int main(int argc, char** argv) +{ + poptContext con = rpmioInit(argc, argv, rpmskfOptionsTable); s32 opt; u32 loop_cnt = 0, purge_age = 0, seed; u8 dont_save_words = 0, show_once = 0, be_quiet = 0, display_mode = 0; @@ -524,6 +606,8 @@ fflush(0); + con = rpmioFini(con); + return 0; } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org