autosec-devel Mailing List for Automated Security Tools (Page 2)
Brought to you by:
red0x
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(30) |
Aug
(53) |
Sep
(4) |
Oct
(39) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
(1) |
Apr
(31) |
May
(15) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(42) |
Oct
(37) |
Nov
(39) |
Dec
(15) |
2004 |
Jan
(10) |
Feb
(17) |
Mar
(2) |
Apr
(56) |
May
(22) |
Jun
(17) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2005 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2007 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: red0x <re...@us...> - 2004-05-21 07:57:31
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24230/src Modified Files: plugin.h Log Message: Changed port list from int to char, saving memory Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** plugin.h 6 May 2004 20:12:22 -0000 1.48 --- plugin.h 21 May 2004 07:57:21 -0000 1.49 *************** *** 166,170 **** char *entry; //! List of ports to scan (see PORT_SCAN et al. in plugin.h) ! int ports[MAX_PORTS]; //! Address info structue, including family, protocol, and socket type (see getaddrinfo(3)) struct addrinfo *addrinfo; --- 166,170 ---- char *entry; //! List of ports to scan (see PORT_SCAN et al. in plugin.h) ! char ports[MAX_PORTS]; //! Address info structue, including family, protocol, and socket type (see getaddrinfo(3)) struct addrinfo *addrinfo; |
From: red0x <re...@us...> - 2004-05-21 07:56:32
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24023/plugins Modified Files: Makefile.am Makefile.in Added Files: network_banner.c network_banner.h Log Message: Added a banner grab plugin Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.in,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Makefile.in 19 May 2004 08:19:15 -0000 1.34 --- Makefile.in 21 May 2004 07:56:21 -0000 1.35 *************** *** 99,103 **** CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = --- 99,103 ---- CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_banner.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = *************** *** 112,115 **** --- 112,119 ---- libsonar_net_tcp_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_net_banner_la_SOURCES = network_banner.c network_banner.h + libsonar_net_banner_la_LIBADD = + libsonar_net_banner_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h libsonar_inp_random_la_LIBADD = *************** *** 135,138 **** --- 139,145 ---- am_libsonar_net_ack_la_OBJECTS = rfc793.lo libsonar_net_ack_la_OBJECTS = $(am_libsonar_net_ack_la_OBJECTS) + libsonar_net_banner_la_DEPENDENCIES = + am_libsonar_net_banner_la_OBJECTS = network_banner.lo + libsonar_net_banner_la_OBJECTS = $(am_libsonar_net_banner_la_OBJECTS) libsonar_net_icmp_la_DEPENDENCIES = am_libsonar_net_icmp_la_OBJECTS = network_icmp.lo *************** *** 156,159 **** --- 163,167 ---- @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/inp_rand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo ./$(DEPDIR)/log_xml.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/network_banner.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_connect.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo *************** *** 167,175 **** CFLAGS = @CFLAGS@ DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ ! $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ ! $(libsonar_net_tcp_la_SOURCES) $(libsonar_out_log_la_SOURCES) \ ! $(libsonar_out_xml_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_net_tcp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) all: all-am --- 175,184 ---- CFLAGS = @CFLAGS@ DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ ! $(libsonar_net_ack_la_SOURCES) \ ! $(libsonar_net_banner_la_SOURCES) \ ! $(libsonar_net_icmp_la_SOURCES) $(libsonar_net_tcp_la_SOURCES) \ ! $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_banner_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_net_tcp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) all: all-am *************** *** 214,217 **** --- 223,228 ---- libsonar_net_ack.la: $(libsonar_net_ack_la_OBJECTS) $(libsonar_net_ack_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsonar_net_ack_la_LDFLAGS) $(libsonar_net_ack_la_OBJECTS) $(libsonar_net_ack_la_LIBADD) $(LIBS) + libsonar_net_banner.la: $(libsonar_net_banner_la_OBJECTS) $(libsonar_net_banner_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libsonar_net_banner_la_LDFLAGS) $(libsonar_net_banner_la_OBJECTS) $(libsonar_net_banner_la_LIBADD) $(LIBS) libsonar_net_icmp.la: $(libsonar_net_icmp_la_OBJECTS) $(libsonar_net_icmp_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsonar_net_icmp_la_LDFLAGS) $(libsonar_net_icmp_la_OBJECTS) $(libsonar_net_icmp_la_LIBADD) $(LIBS) *************** *** 232,235 **** --- 243,247 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_xml.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_banner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_icmp.Plo@am__quote@ --- NEW FILE: network_banner.h --- /*************************************************************************** network_banner.h - Banner Grabbing network plugin ------------------- begin : Thu May 20 2004 copyright : (C) 2004 by red0x email : re...@us... rcsid : $Id: network_banner.h,v 1.1 2004/05/21 07:56:21 red0x Exp $ ***************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _NETWORK_BANNER_H #define _NETWORK_BANNER_H #include "plugin.h" #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <signal.h> #include <errno.h> #define MAX_BANNER_LEN 70 struct banner_opts { char *filename; FILE *fd; }; void *plugin_init(void *in_data); #endif /* _NETWORK_BANNER_H */ --- NEW FILE: network_banner.c --- /*************************************************************************** network_banner.c - Banner Grabbing network plugin ------------------- begin : Tue May 18 2004 copyright : (C) 2004 by red0x email : re...@us... rcsid : $Id: network_banner.c,v 1.1 2004/05/21 07:56:21 red0x Exp $ ***************************************************************************/ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** @file network_banner.c * File contains Banner Grabbing plugin functions */ #include "network_banner.h" #include <assert.h> static const char rcsid[] = "\100$ autosec/sonar: $Id: network_banner.c,v 1.1 2004/05/21 07:56:21 red0x Exp $"; /// my last error static uint16_t my_errno; /// my socket static int my_socket; /// my local options struct banner_opts opts; /// Plugin's plugin_t structure, built by plugin_init static plugin_t plugin_ctx; /// Sonar's sonar_t structure, built by sonar, passed to this plugin static sonar_t *sonar_ctx; static int banner_destroy(void); static int banner_open(void *cmdline, int len); static int banner_close(void); static int banner_sweep(target_t * targets); static void banner_status(void); static void banner_usage(void); static int banner_last_error(void); /** @fn plugin_init(void *in_data) * Plugin Init function, part of the Plugin API * @param in_data Pointer to a sonar_t structure that will be * passed from sonar when your plugin is loaded. * @return A pointer to a filled plugin_t structure or NULL on error. */ void * plugin_init(void *in_data) { assert(in_data != NULL); sonar_ctx = (sonar_t *) in_data; if(sonar_ctx->api < 6) { sonar_ctx->err_ptrs->err_msg("Plugin API must be 6 or higher, please update\n"); return NULL; } my_errno = PLUGIN_LOADED; my_socket = -1; plugin_ctx.version = 6; /* set API version */ plugin_ctx.type = NETWORK_PLUGIN; plugin_ctx.err = (int16_t *) & my_errno; plugin_ctx.ready = false; plugin_ctx.plugin_char = 'B'; plugin_ctx.shortname = "banner grab\0"; plugin_ctx.longname = "Banner Grabbing scan\0"; plugin_ctx.plugin_init = &plugin_init; plugin_ctx.plugin_destroy = &banner_destroy; plugin_ctx.plugin_open = &banner_open; plugin_ctx.plugin_close = &banner_close; plugin_ctx.plugin_next = NULL; plugin_ctx.plugin_sweep = &banner_sweep; plugin_ctx.plugin_output = NULL; plugin_ctx.plugin_results = NULL; plugin_ctx.plugin_usage = &banner_usage; plugin_ctx.plugin_status = &banner_status; plugin_ctx.plugin_last_error = &banner_last_error; return &plugin_ctx; } /** @fn banner_destroy(void) * Plugin Unload function * @return PLUGIN_UNLOADED */ static int banner_destroy(void) { if(my_socket > 0) close(my_socket); my_errno = PLUGIN_UNLOADED; return PLUGIN_UNLOADED; } static void get_socket(void) { my_socket = socket(PF_INET, SOCK_STREAM, 0); if(my_socket == -1) { sonar_ctx->err_ptrs->err_ret("could not get a socket\n"); exit(-1); } } static void process_opts(char *cmd, int len) { //int i; char *next; /* first arg is a filename */ next = strchr(cmd, ','); if(next) *(next++) = 0x00; opts.filename = strndup(cmd, strlen(cmd)); opts.fd = fopen(opts.filename, "w+"); if(!opts.fd) free(opts.filename); /* save for later cmd = next; next = NULL; while(cmd) { next = strchr(cmd, ','); if(next) *(next++) = 0x00; cmd = next; next = NULL; }*/ } /** @fn banner_open(void *cmdline, int len) * Plugin Start function * @param cmdline Arguments passed on the command line * @param len length of arguments passed * @return PLUGIN_OK */ static int banner_open(void *cmdline, int len) { /* XXX: Take some options, like TTL, etc. */ if(cmdline && len > 0) process_opts(cmdline, len); if(sonar_ctx->opts.iPostDelay == -1) sonar_ctx->opts.iPostDelay = 0; get_socket(); plugin_ctx.ready = true; return PLUGIN_OK; } /** @fn banner_close(void) * Plugin destroy function * Call this before banner_destroy * @return PLUGIN_OK */ static int banner_close(void) { close(my_socket); my_socket = -1; plugin_ctx.ready = false; if(opts.fd) fclose(opts.fd); free(opts.filename); return PLUGIN_OK; } /** @fn banner_connect(int sock, struct addrinfo *ai, unsigned int port) * Protocol Independent wrapper for connect(2) * @param sock Socket descriptor * @param ai Address Info as returned from getaddrinfo(3) * @param port Port number to attempt connect on * @return see connect(2) */ int banner_connect(int sock, struct addrinfo *ai, unsigned int port) { struct sockaddr_in *sa; struct sockaddr_in6 *sa6; if(sock <=0 || ai == NULL) return -1; switch(ai->ai_family) { case PF_INET: sa = (struct sockaddr_in *) ai->ai_addr; sa->sin_port = ntohs(port); break; case PF_INET6: sa6 = (struct sockaddr_in6 *) ai->ai_addr; sa6->sin6_port = ntohs(port); break; default: return -1; } return connect(sock, ai->ai_addr, ai->ai_addrlen); } void sighand(int foo) { return; } /** @fn char *banner_grab(int sock, int *retlen) * Grab a banner from specified port * @param sock Socket to read from * @return Banner, retlen will be length of banner string */ static char *banner_grab(int sock, int *retlen) { char buf[MAX_BANNER_LEN]; int retval, times = 0; sighandler_t oldfunc; if(!retlen) return NULL; if(!sock) { *retlen = 0; return NULL; } if(send(sock, "foo!\r\n\r\n\0", 8, 0) < 8) if(sonar_ctx->opts.iVerbose > 2) sonar_ctx->err_ptrs->err_ret("Could not send test data\n"); memset(buf, 0, MAX_BANNER_LEN); oldfunc = signal(SIGALRM, (sighandler_t)sighand); wait: alarm(1); if((retval = recv(sock, buf, MAX_BANNER_LEN, MSG_PEEK)) <= 0) { alarm(0); /* nothing came in */ if(errno == EINTR) /* interrupted */ { times++; if(send(sock, "foo!\r\n\r\n\0", 8, 0) < 8) if(sonar_ctx->opts.iVerbose > 2) sonar_ctx->err_ptrs->err_ret("Could not send test data\n"); if(times < 2) goto wait; } *retlen = 0; return NULL; } alarm(0); signal(SIGALRM, oldfunc); /* return the banner */ buf[retval--] = 0x00; /* chop the \n */ if(buf[retval] == '\r') buf[--retval] = 0x00; *retlen = --retval; return strndup(buf, retval); } static char *str_truncate(char *buf, unsigned int len) { if(!buf) return NULL; if(strlen(buf) <= len) return buf; realloc(buf, len-4); buf[len-4] = '\0'; strcat(buf, "..."); return buf; } /** @fn banner_sweep(target_t *targets) * Plugin Sweep Function * Runs a TCP connect() scan against targets * @param targets Pointer to linked list of targets * @return PLUGIN_ERROR on error, PLUGIN_OK on ok */ static int banner_sweep(target_t * targets) { char broadcast = 0, fake = 0, *banner; unsigned int counter = 0; unsigned int open = 0, closed = 0, scanned = 0; int retval, i, bannerlen; struct servent *service; if(my_socket == -1) return PLUGIN_EOF; if(!plugin_ctx.ready) { sonar_ctx->err_ptrs->err_msg("plugin not ready\n"); return PLUGIN_ERROR; } while(targets != NULL && counter < sonar_ctx->num_targets) { if(targets->broadcast && !broadcast) { broadcast = 1; if(setsockopt(my_socket, SOL_SOCKET, SO_BROADCAST, (int *) &broadcast, sizeof(int)) < 0) { sonar_ctx->err_ptrs->err_ret("could not set broadcast mode, try being root\n"); sonar_ctx->err_ptrs->err_ret("skipping this target... :(\n"); continue; } } setservent(0); for(i = 0; i < 65536; i++) { /* stupid hax0r tr1ckz */ if(targets->ports[i] == PORT_SCAN) { targets->ports[i] = PORT_SCANNING; service = getservbyport(htons(i), NULL); if(!service) { service = (struct servent *) malloc(sizeof(struct servent)); if(!service) { sonar_ctx->err_ptrs->err_quit("Could not allocate memory\n"); return PLUGIN_ERROR; } service->s_name = strndup("unknown\0", 8); fake++; } /* scan this one port */ scanned++; retval = banner_connect(my_socket, targets->addrinfo, i); if(retval == 0) { targets->ports[i] = PORT_OPENED; open++; banner = banner_grab(my_socket, &bannerlen); if(opts.fd) { if(banner) fprintf(opts.fd, "%s[%d]: \t Open: %s\n-- \'%s\'\n", targets->entry, i, service->s_name, banner); else fprintf(opts.fd, "%s[%d]: \t Open: %s\n-- no banner\n", targets->entry, i, service->s_name); } if(sonar_ctx->opts.iVerbose > 0) { if(banner) sonar_ctx->message(" %s[%d]: \t Open: %s - %s\n", targets->entry, i, service->s_name, str_truncate(banner, 20)); else sonar_ctx->message(" %s[%d]: \t Open: %s - no banner\n", targets->entry, i, service->s_name); } } else { closed++; targets->ports[i] = PORT_CLOSED; if(sonar_ctx->opts.iVerbose > 1) sonar_ctx->message(" %s[%d]: \t closed: %s\n", targets->entry, i, service->s_name); } if(fake) { free(service->s_name); free(service); fake--; } close(my_socket); get_socket(); } counter++; } } //sonar_ctx->message("XXX: stats when done\n"); return PLUGIN_OK; } /** @fn banner_status(void) * Plugin Status hook function * Prints out status information right before the sweep begins */ static void banner_status(void) { if(plugin_ctx.ready) { sonar_ctx->output("Banner grabbing: %d targets\n", sonar_ctx->num_targets); } } /** @fn banner_usage(void) * Plugin Usage hook function * Prints out plugin usage information. */ static void banner_usage(void) { assert(sonar_ctx->output != NULL); sonar_ctx->output("\n Banner Grab plugin\n"); sonar_ctx-> output (" Usage: -sB,[output_file]\n"); sonar_ctx->output("\t output_file: Since sonar's plugin API version 6\n"); sonar_ctx->output("\t does not support banners, name a \n"); sonar_ctx->output("\t file to write banners to\n"); sonar_ctx-> output (" Example: sonar -sB,banners target.example.com\n"); /* Do not exit, so other plugins can ouput their usage too! exit(-1); */ } /** @fn banner_last_error() * Return last error code * @return Last error code */ static int banner_last_error(void) { return my_errno; } Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.am 19 May 2004 08:19:15 -0000 1.17 --- Makefile.am 21 May 2004 07:56:21 -0000 1.18 *************** *** 5,9 **** DEBUG_CFLAGS= @DEBUG_CFLAGS@ -DHAVE_CONFIG_H -DPLUGINDIR="\\\"$(libdir)\\\"" ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = --- 5,9 ---- DEBUG_CFLAGS= @DEBUG_CFLAGS@ -DHAVE_CONFIG_H -DPLUGINDIR="\\\"$(libdir)\\\"" ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_banner.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = *************** *** 18,21 **** --- 18,25 ---- libsonar_net_tcp_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_net_banner_la_SOURCES = network_banner.c network_banner.h + libsonar_net_banner_la_LIBADD = + libsonar_net_banner_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h libsonar_inp_random_la_LIBADD = |
From: red0x <re...@us...> - 2004-05-20 07:00:55
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4690 Modified Files: configure configure.in Log Message: Changes for a critical bugfix release. Index: configure =================================================================== RCS file: /cvsroot/autosec/sonar/configure,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** configure 8 Apr 2004 21:05:53 -0000 1.36 --- configure 20 May 2004 07:00:42 -0000 1.37 *************** *** 1,5 **** #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.58 for sonar 1.2.2. # # Report bugs to <http://autosec.sourceforge.net/helpDesk>. --- 1,5 ---- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. ! # Generated by GNU Autoconf 2.58 for sonar 1.2.2-r1. # # Report bugs to <http://autosec.sourceforge.net/helpDesk>. *************** *** 429,434 **** PACKAGE_NAME='sonar' PACKAGE_TARNAME='sonar' ! PACKAGE_VERSION='1.2.2' ! PACKAGE_STRING='sonar 1.2.2' PACKAGE_BUGREPORT='http://autosec.sourceforge.net/helpDesk' --- 429,434 ---- PACKAGE_NAME='sonar' PACKAGE_TARNAME='sonar' ! PACKAGE_VERSION='1.2.2-r1' ! PACKAGE_STRING='sonar 1.2.2-r1' PACKAGE_BUGREPORT='http://autosec.sourceforge.net/helpDesk' *************** *** 942,946 **** # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures sonar 1.2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... --- 942,946 ---- # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF ! \`configure' configures sonar 1.2.2-r1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... *************** *** 1009,1013 **** if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of sonar 1.2.2:";; esac cat <<\_ACEOF --- 1009,1013 ---- if test -n "$ac_init_help"; then case $ac_init_help in ! short | recursive ) echo "Configuration of sonar 1.2.2-r1:";; esac cat <<\_ACEOF *************** *** 1136,1140 **** if $ac_init_version; then cat <<\_ACEOF ! sonar configure 1.2.2 generated by GNU Autoconf 2.58 --- 1136,1140 ---- if $ac_init_version; then cat <<\_ACEOF ! sonar configure 1.2.2-r1 generated by GNU Autoconf 2.58 *************** *** 1150,1154 **** running configure, to aid debugging if configure makes a mistake. ! It was created by sonar $as_me 1.2.2, which was generated by GNU Autoconf 2.58. Invocation command line was --- 1150,1154 ---- running configure, to aid debugging if configure makes a mistake. ! It was created by sonar $as_me 1.2.2-r1, which was generated by GNU Autoconf 2.58. Invocation command line was *************** *** 1863,1867 **** # Define the identity of the package. PACKAGE=sonar ! VERSION=1.2.2 --- 1863,1867 ---- # Define the identity of the package. PACKAGE=sonar ! VERSION=1.2.2-r1 *************** *** 12368,12372 **** cat >&5 <<_CSEOF ! This file was extended by sonar $as_me 1.2.2, which was generated by GNU Autoconf 2.58. Invocation command line was --- 12368,12372 ---- cat >&5 <<_CSEOF ! This file was extended by sonar $as_me 1.2.2-r1, which was generated by GNU Autoconf 2.58. Invocation command line was *************** *** 12431,12435 **** cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! sonar config.status 1.2.2 configured by $0, generated by GNU Autoconf 2.58, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" --- 12431,12435 ---- cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ ! sonar config.status 1.2.2-r1 configured by $0, generated by GNU Autoconf 2.58, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Index: configure.in =================================================================== RCS file: /cvsroot/autosec/sonar/configure.in,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** configure.in 8 Apr 2004 21:05:54 -0000 1.33 --- configure.in 20 May 2004 07:00:44 -0000 1.34 *************** *** 1,5 **** # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) ! AC_INIT([sonar], [1.2.2], [http://autosec.sourceforge.net/helpDesk]) AC_CONFIG_SRCDIR([src/sonar.c]) --- 1,5 ---- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) ! AC_INIT([sonar], [1.2.2-r1], [http://autosec.sourceforge.net/helpDesk]) AC_CONFIG_SRCDIR([src/sonar.c]) |
From: red0x <re...@us...> - 2004-05-20 07:00:54
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4690/plugins Modified Files: network_connect.c Log Message: Changes for a critical bugfix release. Index: network_connect.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_connect.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** network_connect.c 19 May 2004 08:19:15 -0000 1.1 --- network_connect.c 20 May 2004 07:00:45 -0000 1.2 *************** *** 268,272 **** } } ! sonar_ctx->message("XXX: stats when done\n"); return PLUGIN_OK; } --- 268,272 ---- } } ! //sonar_ctx->message("XXX: stats when done\n"); return PLUGIN_OK; } |
From: red0x <re...@us...> - 2004-05-19 08:19:26
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10830/plugins Modified Files: Makefile.am Makefile.in Added Files: network_connect.c network_connect.h Log Message: Added a TCP connect() scan plugin. Its about time Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.in,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Makefile.in 6 May 2004 20:11:09 -0000 1.33 --- Makefile.in 19 May 2004 08:19:15 -0000 1.34 *************** *** 99,103 **** CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = --- 99,103 ---- CPPFLAGS = -I$(top_srcdir)/src ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = *************** *** 108,111 **** --- 108,115 ---- libsonar_net_ack_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_net_tcp_la_SOURCES = network_connect.c network_connect.h + libsonar_net_tcp_la_LIBADD = + libsonar_net_tcp_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h libsonar_inp_random_la_LIBADD = *************** *** 134,137 **** --- 138,144 ---- am_libsonar_net_icmp_la_OBJECTS = network_icmp.lo libsonar_net_icmp_la_OBJECTS = $(am_libsonar_net_icmp_la_OBJECTS) + libsonar_net_tcp_la_DEPENDENCIES = + am_libsonar_net_tcp_la_OBJECTS = network_connect.lo + libsonar_net_tcp_la_OBJECTS = $(am_libsonar_net_tcp_la_OBJECTS) libsonar_out_log_la_DEPENDENCIES = am_libsonar_out_log_la_OBJECTS = log_file.lo *************** *** 149,152 **** --- 156,160 ---- @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/inp_rand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo ./$(DEPDIR)/log_xml.Plo \ + @AMDEP_TRUE@ ./$(DEPDIR)/network_connect.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ *************** *** 160,166 **** DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ ! $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) all: all-am --- 168,175 ---- DIST_SOURCES = $(libsonar_inp_random_la_SOURCES) \ $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ ! $(libsonar_net_tcp_la_SOURCES) $(libsonar_out_log_la_SOURCES) \ ! $(libsonar_out_xml_la_SOURCES) DIST_COMMON = Makefile.am Makefile.in ! SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_net_tcp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) all: all-am *************** *** 207,210 **** --- 216,221 ---- libsonar_net_icmp.la: $(libsonar_net_icmp_la_OBJECTS) $(libsonar_net_icmp_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsonar_net_icmp_la_LDFLAGS) $(libsonar_net_icmp_la_OBJECTS) $(libsonar_net_icmp_la_LIBADD) $(LIBS) + libsonar_net_tcp.la: $(libsonar_net_tcp_la_OBJECTS) $(libsonar_net_tcp_la_DEPENDENCIES) + $(LINK) -rpath $(libdir) $(libsonar_net_tcp_la_LDFLAGS) $(libsonar_net_tcp_la_OBJECTS) $(libsonar_net_tcp_la_LIBADD) $(LIBS) libsonar_out_log.la: $(libsonar_out_log_la_OBJECTS) $(libsonar_out_log_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsonar_out_log_la_LDFLAGS) $(libsonar_out_log_la_OBJECTS) $(libsonar_out_log_la_LIBADD) $(LIBS) *************** *** 221,224 **** --- 232,236 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_xml.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_connect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network_icmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc793.Plo@am__quote@ --- NEW FILE: network_connect.c --- /*************************************************************************** network_connect.c - TCP Connect network plugin ------------------- begin : Tue May 18 2004 copyright : (C) 2004 by red0x email : re...@us... rcsid : $Id: network_connect.c,v 1.1 2004/05/19 08:19:15 red0x Exp $ ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /** @file network_connect.c * File contains TCP Connect plugin functions */ #include "network_connect.h" #include <assert.h> static const char rcsid[] = "\100$ autosec/sonar: $Id: network_connect.c,v 1.1 2004/05/19 08:19:15 red0x Exp $"; /// my last error static uint16_t my_errno; /// my socket static int my_socket; /// Plugin's plugin_t structure, built by plugin_init static plugin_t plugin_ctx; /// Sonar's sonar_t structure, built by sonar, passed to this plugin static sonar_t *sonar_ctx; static int connect_destroy(void); static int connect_open(void *cmdline, int len); static int connect_close(void); static int connect_sweep(target_t * targets); static void connect_status(void); static void connect_usage(void); static int connect_last_error(void); /** @fn plugin_init(void *in_data) * Plugin Init function, part of the Plugin API * @param in_data Pointer to a sonar_t structure that will be * passed from sonar when your plugin is loaded. * @return A pointer to a filled plugin_t structure or NULL on error. */ void * plugin_init(void *in_data) { assert(in_data != NULL); sonar_ctx = (sonar_t *) in_data; if(sonar_ctx->api < 6) { sonar_ctx->err_ptrs->err_msg("Plugin API must be 6 or higher, please update\n"); return NULL; } my_errno = PLUGIN_LOADED; my_socket = -1; plugin_ctx.version = 6; /* set API version */ plugin_ctx.type = NETWORK_PLUGIN; plugin_ctx.err = (int16_t *) & my_errno; plugin_ctx.ready = false; plugin_ctx.plugin_char = 'T'; plugin_ctx.shortname = "connect scan\0"; plugin_ctx.longname = "TCP connect() scan\0"; plugin_ctx.plugin_init = &plugin_init; plugin_ctx.plugin_destroy = &connect_destroy; plugin_ctx.plugin_open = &connect_open; plugin_ctx.plugin_close = &connect_close; plugin_ctx.plugin_next = NULL; plugin_ctx.plugin_sweep = &connect_sweep; plugin_ctx.plugin_output = NULL; plugin_ctx.plugin_results = NULL; plugin_ctx.plugin_usage = &connect_usage; plugin_ctx.plugin_status = &connect_status; plugin_ctx.plugin_last_error = &connect_last_error; return &plugin_ctx; } /** @fn connect_destroy(void) * Plugin Unload function * @return PLUGIN_UNLOADED */ static int connect_destroy(void) { if(my_socket > 0) close(my_socket); my_errno = PLUGIN_UNLOADED; return PLUGIN_UNLOADED; } static void get_socket(void) { my_socket = socket(PF_INET, SOCK_STREAM, 0); if(my_socket == -1) { sonar_ctx->err_ptrs->err_ret("could not get a socket\n"); exit(-1); } } /** @fn connect_open(void *cmdline, int len) * Plugin Start function * @param cmdline Arguments passed on the command line * @param len length of arguments passed * @return PLUGIN_OK */ static int connect_open(void *cmdline, int len) { /* XXX: Take some options, like TTL, etc. */ if(cmdline && len > 0) sonar_ctx->err_ptrs->err_msg("Connect scan takes no arguments yet\0"); if(sonar_ctx->opts.iPostDelay == -1) sonar_ctx->opts.iPostDelay = 0; get_socket(); plugin_ctx.ready = true; return PLUGIN_OK; } /** @fn connect_close(void) * Plugin destroy function * Call this before connect_destroy * @return PLUGIN_OK */ static int connect_close(void) { close(my_socket); my_socket = -1; plugin_ctx.ready = false; return PLUGIN_OK; } /** @fn connect_connect(int sock, struct addrinfo *ai, unsigned int port) * Protocol Independent wrapper for connect(2) * @param sock Socket descriptor * @param ai Address Info as returned from getaddrinfo(3) * @param port Port number to attempt connect on * @return see connect(2) */ int connect_connect(int sock, struct addrinfo *ai, unsigned int port) { struct sockaddr_in *sa; struct sockaddr_in6 *sa6; if(sock <=0 || ai == NULL) return -1; switch(ai->ai_family) { case PF_INET: sa = (struct sockaddr_in *) ai->ai_addr; sa->sin_port = ntohs(port); break; case PF_INET6: sa6 = (struct sockaddr_in6 *) ai->ai_addr; sa6->sin6_port = ntohs(port); break; default: return -1; } return connect(sock, ai->ai_addr, ai->ai_addrlen); } /** @fn connect_sweep(target_t *targets) * Plugin Sweep Function * Runs a TCP connect() scan against targets * @param targets Pointer to linked list of targets * @return PLUGIN_ERROR on error, PLUGIN_OK on ok */ static int connect_sweep(target_t * targets) { char broadcast = 0, fake = 0; unsigned int counter = 0; unsigned int open = 0, closed = 0, scanned = 0; int retval, i; struct servent *service; if(my_socket == -1) return PLUGIN_EOF; if(!plugin_ctx.ready) { sonar_ctx->err_ptrs->err_msg("plugin not ready\n"); return PLUGIN_ERROR; } while(targets != NULL && counter < sonar_ctx->num_targets) { if(targets->broadcast && !broadcast) { broadcast = 1; if(setsockopt(my_socket, SOL_SOCKET, SO_BROADCAST, (int *) &broadcast, sizeof(int)) < 0) { sonar_ctx->err_ptrs->err_ret("could not set broadcast mode, try being root\n"); sonar_ctx->err_ptrs->err_ret("skipping this target... :(\n"); continue; } } setservent(0); for(i = 0; i < 65536; i++) { /* stupid hax0r tr1ckz */ if(targets->ports[i] == PORT_SCAN) { targets->ports[i] = PORT_SCANNING; service = getservbyport(htons(i), NULL); if(!service) { service = (struct servent *) malloc(sizeof(struct servent)); if(!service) { sonar_ctx->err_ptrs->err_quit("Could not allocate memory\n"); return PLUGIN_ERROR; } service->s_name = strndup("unknown\0", 8); fake++; } /* scan this one port */ scanned++; retval = connect_connect(my_socket, targets->addrinfo, i); if(retval == 0) { targets->ports[i] = PORT_OPENED; open++; if(sonar_ctx->opts.iVerbose > 0) sonar_ctx->message(" %s[%d]: \t Open: %s\n", targets->entry, i, service->s_name); } else { closed++; targets->ports[i] = PORT_CLOSED; if(sonar_ctx->opts.iVerbose > 1) sonar_ctx->message(" %s[%d]: \t closed: %s\n", targets->entry, i, service->s_name); } if(fake) { free(service->s_name); free(service); fake--; } close(my_socket); get_socket(); } counter++; } } sonar_ctx->message("XXX: stats when done\n"); return PLUGIN_OK; } /** @fn connect_status(void) * Plugin Status hook function * Prints out status information right before the sweep begins */ static void connect_status(void) { if(plugin_ctx.ready) { sonar_ctx->output("TCP connect() scan: %d targets\n", sonar_ctx->num_targets); } } /** @fn connect_usage(void) * Plugin Usage hook function * Prints out plugin usage information. */ static void connect_usage(void) { assert(sonar_ctx->output != NULL); sonar_ctx->output("\n TCP connect() Scan plugin\n"); sonar_ctx-> output (" Usage: -sT\n"); sonar_ctx-> output (" Example: sonar -sT target.example.com\n"); /* Do not exit, so other plugins can ouput their usage too! exit(-1); */ } /** @fn connect_last_error() * Return last error code * @return Last error code */ static int connect_last_error(void) { return my_errno; } --- NEW FILE: network_connect.h --- /*************************************************************************** network_connect.h - TCP Connect network plugin ------------------- begin : Tue May 18 2004 copyright : (C) 2004 by red0x email : re...@us... rcsid : $Id: network_connect.h,v 1.1 2004/05/19 08:19:15 red0x Exp $ ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /** @file network_connect.h * File contains TCP Connect plugin functions */ #ifndef _NETWORK_CONN_H_ #define _NETWORK_CONN_H_ #include "plugin.h" #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> void *plugin_init(void *in_data); #endif /* !_NETWORK_CONN_H_ */ Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile.am 6 May 2004 20:11:09 -0000 1.16 --- Makefile.am 19 May 2004 08:19:15 -0000 1.17 *************** *** 5,9 **** DEBUG_CFLAGS= @DEBUG_CFLAGS@ -DHAVE_CONFIG_H -DPLUGINDIR="\\\"$(libdir)\\\"" ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = --- 5,9 ---- DEBUG_CFLAGS= @DEBUG_CFLAGS@ -DHAVE_CONFIG_H -DPLUGINDIR="\\\"$(libdir)\\\"" ! lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_tcp.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h libsonar_net_icmp_la_LIBADD = *************** *** 14,17 **** --- 14,21 ---- libsonar_net_ack_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_net_tcp_la_SOURCES = network_connect.c network_connect.h + libsonar_net_tcp_la_LIBADD = + libsonar_net_tcp_la_LDFLAGS = -module -no-undefined -avoid-version + libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h libsonar_inp_random_la_LIBADD = |
From: red0x <re...@us...> - 2004-05-19 08:18:58
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10708/plugins Modified Files: network_icmp.c Log Message: Little fixes in old code Index: network_icmp.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.c,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** network_icmp.c 6 May 2004 20:11:09 -0000 1.47 --- network_icmp.c 19 May 2004 08:18:48 -0000 1.48 *************** *** 105,109 **** seq_no = (int) (256.0 * rand() / (RAND_MAX + 0.0)); payload_file = NULL; ! pthis.version = 6; /* set API version 5 */ // setup my plugin stuff --- 105,109 ---- seq_no = (int) (256.0 * rand() / (RAND_MAX + 0.0)); payload_file = NULL; ! pthis.version = 6; /* set API version 6 */ // setup my plugin stuff *************** *** 122,126 **** pthis.plugin_next = NULL; pthis.plugin_sweep = &icmp_sweep; - pthis.plugin_sweep = &icmp_sweep; pthis.plugin_output = NULL; pthis.plugin_results = NULL; --- 122,125 ---- |
From: red0x <re...@us...> - 2004-05-19 08:17:52
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10503/src Modified Files: util.c util.h sonar.c Log Message: Bug fix. It appears we didn't set the error pointers up yet... grr Index: util.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/util.h,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** util.h 13 Apr 2004 03:42:08 -0000 1.25 --- util.h 19 May 2004 08:17:25 -0000 1.26 *************** *** 74,77 **** --- 74,78 ---- target_t *randomize(target_t * in); int sanity_check(int value, int min, int dir); + void fill_err_ptrs(struct error_ptrs *err); #ifndef HAVE_STRNDUP Index: util.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/util.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** util.c 13 Apr 2004 03:42:08 -0000 1.29 --- util.c 19 May 2004 08:17:25 -0000 1.30 *************** *** 474,477 **** --- 474,486 ---- } + void fill_err_ptrs(struct error_ptrs *err) + { + err->err_ret = &err_ret; + err->err_sys = &err_sys; + err->err_dump = &err_dump; + err->err_msg = &err_msg; + err->err_quit = &err_quit; + } + #ifndef HAVE_STRNDUP #define HAVE_STRNDUP Index: sonar.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.c,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** sonar.c 13 Apr 2004 03:42:08 -0000 1.44 --- sonar.c 19 May 2004 08:17:25 -0000 1.45 *************** *** 106,109 **** --- 106,114 ---- mthat->num_targets = 0; mthat->num_ports = 0; + mthat->err_ptrs = (struct err_ptrs *) malloc(sizeof(struct error_ptrs)); + if(mthat->err_ptrs) + fill_err_ptrs(mthat->err_ptrs); + else + err_sys("Could not malloc!\n"); } |
From: red0x <re...@us...> - 2004-05-06 20:51:29
|
Update of /cvsroot/autosec/sonar/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22592/doc Modified Files: sonar.1.in Log Message: Last minute man page update for 1.2.2 release (today) Index: sonar.1.in =================================================================== RCS file: /cvsroot/autosec/sonar/doc/sonar.1.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sonar.1.in 11 Apr 2004 20:50:01 -0000 1.4 --- sonar.1.in 6 May 2004 20:51:12 -0000 1.5 *************** *** 79,96 **** Use the specified output plugin. Still outputs to stdout. .TP - .B \-p, \-\-plug_opt=option - Pass the plugins an option string. This is still a little finicky. In - order to pass options to the plugins themselves, you must prefix all the - plugins' options with \-p. Also, you cannot seperate the option string at - all. For example: if the plugin's usage says to pass \-pf - .U filename - to set an output filename, you must do it like this: - .I \-pf[filename] - or - .I \-p f[filename]. - So, - .I \-p f [filename] - will not work! Plans are to fix this. - .TP .B \-\-TTL=hops Set the TTL on all scans that it could apply to. --- 79,82 ---- *************** *** 165,169 **** This will ping target.example.com once every 60 seconds. .TP ! .B sonar \-c \-1 \-\-scan_delay=60 \-f \-\-output_plugin=log_file \-p fprobe.log \-sI target.example.com .Sp This more complex example is just like the previous one, except it uses --- 151,155 ---- This will ping target.example.com once every 60 seconds. .TP ! .B sonar \-c \-1 \-\-scan_delay=60 \-f \-oL,probe.log \-sI target.example.com .Sp This more complex example is just like the previous one, except it uses *************** *** 172,180 **** output plugin was told to use the file .I 'probe.log' ! to store all its output. (NOTE: It stores to probe.log, ! .B not ! fprobe.log) .TP ! .B sonar \-c \-1 \-\-scan_delay=60 \-pe"echo online!" \-sI target.example.com .Sp This example makes use of the automated command option. If --- 158,164 ---- output plugin was told to use the file .I 'probe.log' ! to store all its output. .TP ! .B sonar \-c \-1 \-\-scan_delay=60 \-sI,prog="echo online!" target.example.com .Sp This example makes use of the automated command option. If *************** *** 185,189 **** or the like. .TP ! .B sonar \-c \-1 \-\-scan_delay=300 \-p ppayload.dat \-sI target.example.com .Sp Send the contents of payload.dat to target.example.com every 5 minutes. --- 169,173 ---- or the like. .TP ! .B sonar \-c \-1 \-\-scan_delay=300 \-sI,payload=payload.dat \-sI target.example.com .Sp Send the contents of payload.dat to target.example.com every 5 minutes. |
From: red0x <re...@us...> - 2004-05-06 20:34:10
|
Today, May 6th 2004, I released sonar 1.2.2! Sonar 1.2.2 contains alot of major useability updates, as well as some placeholder code for new and exciting features in 1.2.3. I have taken on a few developers, and I am always looking for more. If you are interested in developing for sonar, or any other autosec tools, let me know and we'll get you on board. Look for sonar 1.2.2 here on sourceforge, or on gentoo's portage. -- red0x <re...@us...> |
From: red0x <re...@us...> - 2004-05-06 20:12:49
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14513 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/autosec/sonar/ChangeLog,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ChangeLog 11 Apr 2004 07:42:08 -0000 1.43 --- ChangeLog 6 May 2004 20:12:40 -0000 1.44 *************** *** 1,2 **** --- 1,1312 ---- + 2004-05-05 red0x <red0x@xpider> + + * src/mutex.h, src/plugin.h, src/types.h, libltdl/configure, plugins/network_icmp.h, doc/Makefile.in, Makefile.in, doc/Makefile.am: + Major documentation update, more to come. + + * plugins/rfc793.h, plugins/rfc793.c: + Removed the bloody thread (which was causing so many problems) from the ack scan + + * .indent.pro: Don't muck about with my comments, indent... [...1283 lines suppressed...] + * src/queue.h: Import version 0.4 + + * src/queue.h: New file. + + * src/Makefile.in, src/queue.cpp: Import version 0.4 + + * src/Makefile.in, src/queue.cpp: New file. + + * AUTHORS, CONTRIB, COPYING, ChangeLog, INSTALL, TODO, configure, configure.in, install-sh: + Import version 0.4 + + * AUTHORS, CONTRIB, COPYING, ChangeLog, INSTALL, TODO, configure, configure.in, install-sh: + New file. + + * .cvsignore, README, config.h.in: Import version 0.4 + + * .cvsignore, README, config.h.in: New file. + 2004-04-11 pharkas <pharkas@xpider> |
From: red0x <re...@us...> - 2004-05-06 20:12:32
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14472/src Modified Files: plugin.h sonar.h Log Message: Documentation update Index: sonar.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** sonar.h 24 Apr 2004 06:51:28 -0000 1.34 --- sonar.h 6 May 2004 20:12:22 -0000 1.35 *************** *** 58,63 **** * Sonar is used for network reconnaisance. Since release 1.0, * it has been plugin driven, with most of the control coming ! * from the plugins. By default, version 1.0 comes with the ! * default ICMP sweep plugin. This plugin can handle multiple * host names, so porting any scripts from sonar pre 1.0 to 1.0 * should not be too much of a problem. \n\n --- 58,64 ---- * Sonar is used for network reconnaisance. Since release 1.0, * it has been plugin driven, with most of the control coming ! * from the plugins. By default, version 1.2.2 comes with the ! * default ICMP sweep plugin, as well as the ACK plugin. ! * This plugin can handle multiple * host names, so porting any scripts from sonar pre 1.0 to 1.0 * should not be too much of a problem. \n\n *************** *** 120,137 **** * * \section examples Syntax Examples ! * \c sonar \c --TTL=250 \c -sI \c www.google.com \n * Sends pings to www.google.com with a TTL of 250 \n\n * \c sonar \c --scan_delay=5 \c -sI \c www.yahoo.com \n * Pings yahoo.com with a 5 second delay \n\n ! * \c sonar \c -p \c p/etc/passwd \c --packet_size=300 \c -sI \c genbukan.no-ip.com \n ! * Sends the first 300 bytes of your passwd file to genbukan security * (why would you want to do that?) \n\n ! * \c sonar \c -f \c -oL \c -pf \c scan.log \c -c \c 5 \c --scan_delay=300 \c --TTL=220 \c -pe"echo \c google's \c up" \c -sI \c www.google.com \n * Puts sonar into the background (daemon mode), output to scan.log, send \n ! * 5 pings at most, once every 5 minutes, set the TTL to 220, and send \n ! * the pings to www.google.com. If the host responds, it prints "google's up" \n ! * on the command line. \n\n * \c sonar \n ! * Gets the usage of sonar and all your plugins \n\n * \c sonar \c -sA \c www.google.com \n * Does an ACK probe of google.com on all ports listed in /etc/services! \n --- 121,140 ---- * * \section examples Syntax Examples ! * \c sonar \c -sI,ttl=250 \c www.google.com \n * Sends pings to www.google.com with a TTL of 250 \n\n * \c sonar \c --scan_delay=5 \c -sI \c www.yahoo.com \n * Pings yahoo.com with a 5 second delay \n\n ! * \c sonar \c -sI,payload=/etc/passwd,size=300 \c genbukan.no-ip.com \n ! * Sends the first 300 bytes of your passwd file to genbukan security \n * (why would you want to do that?) \n\n ! * \c sonar \c -f \c-oL,scan.log \c -c \c 5 \c --scan_delay=300 ! * \c -sA,ttl=220,prog="echo google's up" \c www.google.com:80 \n * Puts sonar into the background (daemon mode), output to scan.log, send \n ! * 5 ACK probes at most, once every 5 minutes, set the TTL to 220, and send\n ! * the pings to www.google.com, port 80. If the host responds, it \n ! * prints "google's up" on the command line. \n\n * \c sonar \n ! * \c sonar \c -l \n ! * Gets the usage of sonar and lists all your plugins \n\n * \c sonar \c -sA \c www.google.com \n * Does an ACK probe of google.com on all ports listed in /etc/services! \n Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** plugin.h 5 May 2004 08:01:30 -0000 1.47 --- plugin.h 6 May 2004 20:12:22 -0000 1.48 *************** *** 17,21 **** /** \file plugin.h * File contains plugin API \n ! * Plugin API 1.5 \n * To make a plugin, refer to this file's plugin_t structure * and to the example plugins --- 17,21 ---- /** \file plugin.h * File contains plugin API \n ! * Plugin API 1.6 \n * To make a plugin, refer to this file's plugin_t structure * and to the example plugins *************** *** 405,409 **** Once it opens your plugin, it will call dlsym(3) to load your plugin's \ref plugin_init function. It is imperative that your plugin has a function called ! \ref plugin_init (See \link bare.h bare.h \endlink). Sonar then calls this function, passing it a pointer to a complete \ref sonar_s structure (note: sonar_s and sonar_t are interchangeable). Sonar expects that your plugin_init function return --- 405,409 ---- Once it opens your plugin, it will call dlsym(3) to load your plugin's \ref plugin_init function. It is imperative that your plugin has a function called ! \ref plugin_init (See \link inp_rand.h inp_rand.h \endlink). Sonar then calls this function, passing it a pointer to a complete \ref sonar_s structure (note: sonar_s and sonar_t are interchangeable). Sonar expects that your plugin_init function return *************** *** 416,429 **** Sonar has a few main arguments, but, with all the plugins, it could have an infinite amount of arguments to handle. To counter the confusion of passing every ! plugin every argument, I made all the plugin arguments have a prefix. That ! prefix is \c -p. In other words, anything after -p is passed to \b all of the ! plugins. For example: processing \c -pd60 will cause sonar to call each plugins' ! plugin_args function (see plugin_s) with \c d as the opt and \c 60 as the optarg. If your plugin has not handled that argument, sonar expects a return value of \ref PLUGIN_ERROR . If your plugin did handle the argument (or ignores it), sonar expects a return value of \ref PLUGIN_OK . \n\n ! If your plugin is a network plugin, a similar dilemma arises. How can we have more ! than one network plugin, and only run one scan at a time, rather than running them ! all at once. I decided to go with an nmap type solution. Each network plugin should be designed with a character that will uniquely identify it to sonar. For example, the \link network_icmp.c network_icmp \endlink plugin's character is \c 'I'. --- 416,430 ---- Sonar has a few main arguments, but, with all the plugins, it could have an infinite amount of arguments to handle. To counter the confusion of passing every ! plugin every argument, I made all the plugin arguments follow plugin ! selection. In other words, anything after -sA, is passed to the ack scan \b ! only. This is a change from the old way of passing '-p' options. Each option ! needs to be comma separated. -sA,opt1,opt2,opt3 and so on. ! If your plugin has not handled that argument, sonar expects a return value of \ref PLUGIN_ERROR . If your plugin did handle the argument (or ignores it), sonar expects a return value of \ref PLUGIN_OK . \n\n ! all at once. ! With many plugins, there is an identity crisis: which plugin gets what ! arguments? I decided to go with an nmap type solution. Each plugin should be designed with a character that will uniquely identify it to sonar. For example, the \link network_icmp.c network_icmp \endlink plugin's character is \c 'I'. *************** *** 456,464 **** \section notes Notes ! Be careful when developing plugins, since ! there is currently no way to avoid overlap of plugin arguments. If two ! plugins handle the same argument, there is a conflict and things could ! go south. This situation is currently \b NOT detected \b NOR corrected. \n\n ! After all arguments are parsed, a list of hosts should remain on the command line to be parsed. If not, currently, sonar checks for input plugins ready --- 457,464 ---- \section notes Notes ! As of 1.2.2, sonar has a way to separate the plugin arguments. The old way ! of passing options, ie: the '-p' list, is no longer supported. For example, ! to pass a TTL option to the icmp scan, you would type \c -sI,ttl=220. ! After all arguments are parsed, a list of hosts should remain on the command line to be parsed. If not, currently, sonar checks for input plugins ready *************** *** 472,483 **** your network plugin is done sweeping. \n\n ! Plugins handle their arguments by providing a plugin_args function. ! Sonar will call this function with the character following the -p and ! the number or string following that, so you can easily use a getopt style switch statement to parse the arguments from there. If your plugin does not handle that particular argument, do not exit, but ! return \ref PLUGIN_ERROR. This will tell sonar that you did not handle it, ! and give other plugins a chance to handle it. If you did handle it, ! return \ref PLUGIN_OK.. \n\n The plugin's sweep function, if its a network function, should handle --- 472,484 ---- your network plugin is done sweeping. \n\n ! Plugins handle their arguments in the plugin_open function. The previous ! unused arguments to plugin_open are now the plugin's options, and the length ! thereof. ! Sonar will call this function with the 'command line' following your plugin's ! selection character, so you can easily use a getopt style switch statement to parse the arguments from there. If your plugin does not handle that particular argument, do not exit, but ! return \ref PLUGIN_ERROR. This will tell sonar that you did not handle it; ! otherwise, to ignore it or if you handled it, return \ref PLUGIN_OK. \n\n The plugin's sweep function, if its a network function, should handle *************** *** 490,498 **** \subsection argsnotes Notes on Passing Arguments ! Sonar passes all options prefixed with -p to plugins. Make sure you do \b NOT ! put a 'space' between the -p and the argument. For example, \c -pdtest will work, while ! \c -pd \c test \b WILL \b NOT \b WORK! Make sure the ! plugin option and argument are \b NOT separated by a space, the -p and ! the rest of the option may be separated however. \n \n\n --- 491,496 ---- \subsection argsnotes Notes on Passing Arguments ! The previous method of passing arguments, '-p' is no longer used. See the ! above \ref notes section.\n \n\n |
From: red0x <re...@us...> - 2004-05-06 20:11:19
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14063/plugins Modified Files: Makefile.am Makefile.in log_file.h log_xml.h network_icmp.c rfc793.c Log Message: Removed error.c and error.h dependencies from Makefiles and plugins Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Makefile.am 5 Dec 2003 22:37:09 -0000 1.15 --- Makefile.am 6 May 2004 20:11:09 -0000 1.16 *************** *** 7,23 **** lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h ! libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ libsonar_net_ack_la_SOURCES = rfc793.c rfc793.h ! libsonar_net_ack_la_LIBADD = @LTLIBOBJS@ libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h ! libsonar_inp_random_la_LIBADD = @LTLIBOBJS@ libsonar_out_log_la_SOURCES = log_file.c log_file.h ! libsonar_out_log_la_LIBADD = @LTLIBOBJS@ libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h ! libsonar_out_xml_la_LIBADD = @LTLIBOBJS@ clean-generic: --- 7,31 ---- lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h ! libsonar_net_icmp_la_LIBADD = ! libsonar_net_icmp_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_net_ack_la_SOURCES = rfc793.c rfc793.h ! libsonar_net_ack_la_LIBADD = ! libsonar_net_ack_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h ! libsonar_inp_random_la_LIBADD = ! libsonar_inp_random_la_LDFLAGS = -module -no-undefined -avoid-version ! libsonar_out_log_la_SOURCES = log_file.c log_file.h ! libsonar_out_log_la_LIBADD = ! libsonar_out_log_la_LDFLAGS = -module -no-undefined -avoid-version ! libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h ! libsonar_out_xml_la_LIBADD = ! libsonar_out_xml_la_LDFLAGS = -module -no-undefined -avoid-version ! clean-generic: Index: log_file.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** log_file.h 13 Apr 2004 03:42:07 -0000 1.6 --- log_file.h 6 May 2004 20:11:09 -0000 1.7 *************** *** 34,38 **** #include <arpa/inet.h> #include <netdb.h> - #include "error.h" --- 34,37 ---- Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/Makefile.in,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Makefile.in 5 Dec 2003 22:37:09 -0000 1.32 --- Makefile.in 6 May 2004 20:11:09 -0000 1.33 *************** *** 101,117 **** lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h ! libsonar_net_icmp_la_LIBADD = @LTLIBOBJS@ libsonar_net_ack_la_SOURCES = rfc793.c rfc793.h ! libsonar_net_ack_la_LIBADD = @LTLIBOBJS@ libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h ! libsonar_inp_random_la_LIBADD = @LTLIBOBJS@ libsonar_out_log_la_SOURCES = log_file.c log_file.h ! libsonar_out_log_la_LIBADD = @LTLIBOBJS@ libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h ! libsonar_out_xml_la_LIBADD = @LTLIBOBJS@ subdir = plugins mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs --- 101,122 ---- lib_LTLIBRARIES = libsonar_net_icmp.la libsonar_net_ack.la libsonar_inp_random.la libsonar_out_log.la libsonar_out_xml.la libsonar_net_icmp_la_SOURCES = network_icmp.c network_icmp.h ! libsonar_net_icmp_la_LIBADD = ! libsonar_net_icmp_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_net_ack_la_SOURCES = rfc793.c rfc793.h ! libsonar_net_ack_la_LIBADD = ! libsonar_net_ack_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_inp_random_la_SOURCES = inp_rand.c inp_rand.h ! libsonar_inp_random_la_LIBADD = ! libsonar_inp_random_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_out_log_la_SOURCES = log_file.c log_file.h ! libsonar_out_log_la_LIBADD = ! libsonar_out_log_la_LDFLAGS = -module -no-undefined -avoid-version libsonar_out_xml_la_SOURCES = log_xml.c log_xml.h ! libsonar_out_xml_la_LIBADD = ! libsonar_out_xml_la_LDFLAGS = -module -no-undefined -avoid-version subdir = plugins mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs *************** *** 120,141 **** LTLIBRARIES = $(lib_LTLIBRARIES) ! libsonar_inp_random_la_LDFLAGS = ! libsonar_inp_random_la_DEPENDENCIES = @LTLIBOBJS@ am_libsonar_inp_random_la_OBJECTS = inp_rand.lo libsonar_inp_random_la_OBJECTS = $(am_libsonar_inp_random_la_OBJECTS) ! libsonar_net_ack_la_LDFLAGS = ! libsonar_net_ack_la_DEPENDENCIES = @LTLIBOBJS@ am_libsonar_net_ack_la_OBJECTS = rfc793.lo libsonar_net_ack_la_OBJECTS = $(am_libsonar_net_ack_la_OBJECTS) ! libsonar_net_icmp_la_LDFLAGS = ! libsonar_net_icmp_la_DEPENDENCIES = @LTLIBOBJS@ am_libsonar_net_icmp_la_OBJECTS = network_icmp.lo libsonar_net_icmp_la_OBJECTS = $(am_libsonar_net_icmp_la_OBJECTS) ! libsonar_out_log_la_LDFLAGS = ! libsonar_out_log_la_DEPENDENCIES = @LTLIBOBJS@ am_libsonar_out_log_la_OBJECTS = log_file.lo libsonar_out_log_la_OBJECTS = $(am_libsonar_out_log_la_OBJECTS) ! libsonar_out_xml_la_LDFLAGS = ! libsonar_out_xml_la_DEPENDENCIES = @LTLIBOBJS@ am_libsonar_out_xml_la_OBJECTS = log_xml.lo libsonar_out_xml_la_OBJECTS = $(am_libsonar_out_xml_la_OBJECTS) --- 125,141 ---- LTLIBRARIES = $(lib_LTLIBRARIES) ! libsonar_inp_random_la_DEPENDENCIES = am_libsonar_inp_random_la_OBJECTS = inp_rand.lo libsonar_inp_random_la_OBJECTS = $(am_libsonar_inp_random_la_OBJECTS) ! libsonar_net_ack_la_DEPENDENCIES = am_libsonar_net_ack_la_OBJECTS = rfc793.lo libsonar_net_ack_la_OBJECTS = $(am_libsonar_net_ack_la_OBJECTS) ! libsonar_net_icmp_la_DEPENDENCIES = am_libsonar_net_icmp_la_OBJECTS = network_icmp.lo libsonar_net_icmp_la_OBJECTS = $(am_libsonar_net_icmp_la_OBJECTS) ! libsonar_out_log_la_DEPENDENCIES = am_libsonar_out_log_la_OBJECTS = log_file.lo libsonar_out_log_la_OBJECTS = $(am_libsonar_out_log_la_OBJECTS) ! libsonar_out_xml_la_DEPENDENCIES = am_libsonar_out_xml_la_OBJECTS = log_xml.lo libsonar_out_xml_la_OBJECTS = $(am_libsonar_out_xml_la_OBJECTS) *************** *** 147,151 **** depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles ! @AMDEP_TRUE@DEP_FILES = $(DEPDIR)/error.Plo ./$(DEPDIR)/inp_rand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo ./$(DEPDIR)/log_xml.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo --- 147,151 ---- depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles ! @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/inp_rand.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/log_file.Plo ./$(DEPDIR)/log_xml.Plo \ @AMDEP_TRUE@ ./$(DEPDIR)/network_icmp.Plo ./$(DEPDIR)/rfc793.Plo *************** *** 161,165 **** $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) ! DIST_COMMON = Makefile.am Makefile.in error.c error.h SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) --- 161,165 ---- $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) \ $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) ! DIST_COMMON = Makefile.am Makefile.in SOURCES = $(libsonar_inp_random_la_SOURCES) $(libsonar_net_ack_la_SOURCES) $(libsonar_net_icmp_la_SOURCES) $(libsonar_out_log_la_SOURCES) $(libsonar_out_xml_la_SOURCES) *************** *** 218,222 **** -rm -f *.tab.c - @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp_rand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_file.Plo@am__quote@ --- 218,221 ---- *************** *** 226,230 **** distclean-depend: ! -rm -rf $(DEPDIR) ./$(DEPDIR) .c.o: --- 225,229 ---- distclean-depend: ! -rm -rf ./$(DEPDIR) .c.o: Index: network_icmp.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.c,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** network_icmp.c 24 Apr 2004 06:22:47 -0000 1.46 --- network_icmp.c 6 May 2004 20:11:09 -0000 1.47 *************** *** 26,30 **** #include <errno.h> #include "network_icmp.h" - #include "error.h" #include "mem.h" #ifdef HAVE_CONFIG_H --- 26,29 ---- Index: rfc793.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** rfc793.c 5 May 2004 08:00:30 -0000 1.52 --- rfc793.c 6 May 2004 20:11:09 -0000 1.53 *************** *** 23,27 **** #include <pthread.h> #include "rfc793.h" - #include "error.h" #include "mem.h" #ifdef HAVE_CONFIG_H --- 23,26 ---- Index: log_xml.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_xml.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** log_xml.h 13 Apr 2004 03:42:07 -0000 1.2 --- log_xml.h 6 May 2004 20:11:09 -0000 1.3 *************** *** 34,38 **** #include <arpa/inet.h> #include <netdb.h> - #include "error.h" // make them static and make sure their linkage is "C" --- 34,37 ---- |
From: red0x <re...@us...> - 2004-05-06 19:10:56
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1412 Removed Files: error.c error.h Log Message: Removed error.c and error.h --- error.c DELETED --- --- error.h DELETED --- |
From: red0x <re...@us...> - 2004-05-05 08:02:12
|
Update of /cvsroot/autosec/sonar/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10223/doc Modified Files: Makefile.am Makefile.in Log Message: Major documentation update, more to come. Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/doc/Makefile.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.in 8 Apr 2004 22:56:44 -0000 1.18 --- Makefile.in 5 May 2004 08:01:28 -0000 1.19 *************** *** 318,321 **** --- 318,322 ---- all-am: html sonar_plugin_man.pdf + docs: all # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/doc/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 8 Apr 2004 22:56:44 -0000 1.7 --- Makefile.am 5 May 2004 08:01:27 -0000 1.8 *************** *** 51,52 **** --- 51,53 ---- all-am: html sonar_plugin_man.pdf + docs: all |
From: red0x <re...@us...> - 2004-05-05 08:02:11
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10223 Modified Files: Makefile.in Log Message: Major documentation update, more to come. Index: Makefile.in =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.in,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile.in 8 Apr 2004 22:38:41 -0000 1.31 --- Makefile.in 5 May 2004 08:01:27 -0000 1.32 *************** *** 513,517 **** docs: ! @cd $(docdir) && $(MAKE) $@ debug: --- 513,517 ---- docs: ! @cd $(docdir) && $(MAKE) all debug: |
From: red0x <re...@us...> - 2004-05-05 08:01:41
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10223/plugins Modified Files: network_icmp.h Log Message: Major documentation update, more to come. Index: network_icmp.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** network_icmp.h 13 Apr 2004 03:42:07 -0000 1.34 --- network_icmp.h 5 May 2004 08:01:29 -0000 1.35 *************** *** 76,101 **** ! /** ! * @struct recv_t ! * Argument passed to the recveiving thread */ struct recv_t { ! // / socket to listen on (must already be open) int socket; ! // / number of hosts we pinged unsigned int hosts; ! // / set the number of responses unsigned int responses; ! // / start time unsigned int start; ! // / max wait time (timeout function) unsigned int max; }; typedef struct icmp_options_s { uint8_t ttl; uint8_t debug; uint32_t size; } icmp_options_t; --- 76,109 ---- ! /*! \struct recv_t ! \brief Argument passed to the recveiving thread in the icmp plugin ! ! This is for the threaded receiving functionality of the ! icmp scan plugin. */ struct recv_t { ! //! socket to listen on (must already be open) int socket; ! //! number of hosts we pinged unsigned int hosts; ! //! set the number of responses unsigned int responses; ! //! start time unsigned int start; ! //! max wait time (timeout function) unsigned int max; }; + /*! \struct icmp_options_s + \brief Options local to the ICMP scan plugin + */ typedef struct icmp_options_s { + //! Time to live for outgoing packets uint8_t ttl; + //! debug mode (undocumented) uint8_t debug; + //! packet size uint32_t size; } icmp_options_t; |
From: red0x <re...@us...> - 2004-05-05 08:01:39
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10223/src Modified Files: mutex.h plugin.h types.h Log Message: Major documentation update, more to come. Index: mutex.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/mutex.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mutex.h 13 Apr 2004 03:42:08 -0000 1.2 --- mutex.h 5 May 2004 08:01:30 -0000 1.3 *************** *** 24,31 **** --- 24,39 ---- #include <pthread.h> + /*! \struct sonar_mutex_t + \brief Debuggable mutex + + This is a pthread mutex with some extra debugging information. + */ typedef struct { + //! pthread mutex pthread_mutex_t mutex; + //! Mutex identifier char id[80]; + //! Who has this mutex locked char *locked_by; } sonar_mutex_t; Index: types.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/types.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** types.h 13 Apr 2004 03:42:08 -0000 1.21 --- types.h 5 May 2004 08:01:30 -0000 1.22 *************** *** 73,92 **** #endif // TIME_WITH_SYS_TIME - /** - * @struct sa - * Socket Address - * This needs to be removed - */ - struct sa - { - /** Socket Family */ - unsigned short family, - /** Destination Port */ - dport; - /** IP Address */ - unsigned int addr; - /** Padding (zeros) */ - unsigned char zero[8]; - }; typedef unsigned short bool; --- 73,76 ---- Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** plugin.h 24 Apr 2004 06:51:28 -0000 1.46 --- plugin.h 5 May 2004 08:01:30 -0000 1.47 *************** *** 110,127 **** typedef struct stats_s stats_t; struct stats_s { unsigned int packets_sent; unsigned int packets_recvd; unsigned short ttl; ! double rtt_min, rtt_max, rtt_avg; }; struct error_ptrs { void (*err_ret) (const char *fmt, ...); void (*err_sys) (const char *fmt, ...); void (*err_dump) (const char *fmt, ...); void (*err_msg) (const char *fmt, ...); void (*err_quit) (const char *fmt, ...); }; --- 110,150 ---- typedef struct stats_s stats_t; + /*! \struct stats_s + \brief Statistics structure + + This structure holds the statistics per target + */ struct stats_s { + //! Number of packets sent unsigned int packets_sent; + //! Number of packets received unsigned int packets_recvd; + //! last time to live received unsigned short ttl; ! //! least round trip time ! double rtt_min, ! //! max round trip time ! rtt_max, ! //! average round trip time ! rtt_avg; }; + /*! \struct error_ptrs + \brief Error Function Pointers + + This structure holds pointers to various error functions + */ struct error_ptrs { + //! Print a nonfatal error related to a system call void (*err_ret) (const char *fmt, ...); + //! Print a fatal error related to a system call and exit void (*err_sys) (const char *fmt, ...); + //! Print a fatal error related to a system call, dump core, and exit void (*err_dump) (const char *fmt, ...); + //! Print a nonfatal error unrelated to a system call. void (*err_msg) (const char *fmt, ...); + //! Print a fatal error unrelated to a system call and exit void (*err_quit) (const char *fmt, ...); }; *************** *** 129,305 **** typedef struct target_s target_t; struct target_s { ! /// next target in list target_t *next; ! /// user specified entry char *entry; ! /// list of ports to scan int ports[MAX_PORTS]; ! /// address info, including family, protocol, and socket type struct addrinfo *addrinfo; ! /// netmask unsigned int netmask; ! /// extra hosts involved in this (ie, w/netmask) unsigned int extra_hosts; ! /// broadcast address unsigned short broadcast; ! /// number of ports in this host uint32_t num_ports; ! /// statistics stats_t stats; }; ! /** \struct pluginContext ! * Contains useful plugin data */ typedef struct sonar_options_s { ! // / Delay after running this type of scan (advanced option) int iPostDelay; ! // / Delay after each host int iHostDelay; ! // / Timeout per host int iTimeout; ! // / do we have broadcast addresses in the targets? int bBroadcast; ! // / Verbosity level (0 to 5) int iVerbose; ! // / Fork into daemon mode? (0/1) int bFork; ! // / Command line char *sCommandLine; ! // / Number of scanning cycles to run unsigned int iCount; ! // / Random order of hosts? int bRandom; } sonar_options_t; ! /** \struct plugin_s ! * Definition for the plugin interface ! * This is return to sonar from the plugin_init function */ typedef struct plugin_s { ! // / unique ID assigned at run time uint32_t pluginID; ! // / plugin api interface version, lower versions _may_ be supported uint8_t version; ! // / plugin type (INPUT_PLUGIN | OUTPUT_PLUGIN for an I/O plugin) uint8_t type; ! // / last error from this plugin int16_t *err; ! // / ready to use flag, not modified by sonar uint8_t ready:4, ! // / The plugin was selected selected:4; ! // / Plugin character (ie, -sI, -sA, -sL, -oL) char plugin_char; ! // / Short name (ie, "icmp scan", "log file output") char *shortname; ! // / Long name (ie, "ICMP Scanning Plugin: requires root...") char *longname; ! // / Initialize this plugin void *(*plugin_init) (void *in_data); ! // / Destroy this plugin int (*plugin_destroy) (void); ! // / Open the input/output/network source int (*plugin_open) (void *c_data, int i_data); ! // / Close the input/output/network source int (*plugin_close) (void); ! // / Get next host, returned in hostname, only for input plugins ! // / Set next host, for network plugins int (*plugin_next) (char *hostname); ! // / Do the sweep (network plugins) int (*plugin_sweep) (target_t * targets); ! // / Output plugin's general message output function int (*plugin_output) (char *msg, va_list * ap); ! // / output plugins result output function int (*plugin_results) (target_t * result, unsigned int num); ! // / prints, via sonar_t->output(), line(s) to add to sonar_usage() void (*plugin_usage) (void); ! // / prints, via sonar_t->output(), line(s) to add to the status report void (*plugin_status) (void); ! // / Return the last error int (*plugin_last_error) (void); } plugin_t; ! /** \struct sonar_s ! * Definition for the plugin interface ! * This is passed to the plugin, via plugin_init, from sonar with useful ! * function pointers and information, such as what version ! * of sonar is loading the plugins, and pointers to sonar_msg(char *,...), etc. ! */ typedef struct sonar_s { ! // / Major version number uint8_t ver_major, ! // / Minor version number ver_minor, ! // / Revision number revision, ! // / Plugin API version 1.X (so for 1.4, set this to 4) api; ! // / Pointer to a memory copier from sonar (XXX: remove) void (*memput) (char **dest, const char *src, const int len); ! // / Pointer to the Messsage output (ie, with a timestamp) function from ! // sonar void (*message) (char *msg, ...); ! // / let the resolving function live in sonar, so each network plugin ! // wont have to write its own ! // / unless it wants to struct addrinfo *(*resolve) (const char *host, const char *serv, int family, int socktype); ! // / Pointer to sonar's output to console function (no timestamp) int (*output) (char *msg, ...); ! // / Pointer to usage function, for error reports void (*usage) (const char *); ! // / Pointer to a function to get root priveleges int (*getprivs) (void); ! // / Pointer to a function to drop root priveleges int (*dropprivs) (uid_t); ! // / find a target, for updating target_t *(*find_target) (struct sonar_s * this, struct addrinfo * ai); ! // / Name of file we are (for permissions checking) char *my_name; ! // struct for error function pointers struct error_ptrs *err_ptrs; ! // / list of attack vectors target_t *vectors; ! // / number of targets unsigned int num_targets; ! // / number of ports unsigned int num_ports; ! // / Useful global options sonar_options_t opts; } sonar_t; ! /** \struct plugin_list_s ! * Wrapper for plugin_t to be used as an array ! */ typedef struct plugin_list_s { ! // / Pointer to a plugin_t structure plugin_t *plug; ! // / Handle to library opened with \c lt_dlopen(3) void *handle; } plugin_list_t; --- 152,346 ---- typedef struct target_s target_t; + /*! \struct target_s + \brief Target specification + + This structure is filled in with various information about the targets + This structure will be used in a linked list. Targets are filled in + by calling sonar_add_target with the user's target specification + */ struct target_s { ! //! Link to the next target in list target_t *next; ! //! Contains only the hostname (no ports or netmasks) char *entry; ! //! List of ports to scan (see PORT_SCAN et al. in plugin.h) int ports[MAX_PORTS]; ! //! Address info structue, including family, protocol, and socket type (see getaddrinfo(3)) struct addrinfo *addrinfo; ! //! Netmask (0-32) unsigned int netmask; ! //! Number of extra hosts involved in this target (ie, w/netmask) unsigned int extra_hosts; ! //! Set if this target is a broadcast address unsigned short broadcast; ! //! Number of ports in this host uint32_t num_ports; ! //! Statistics structure stats_t stats; }; ! /*! \struct sonar_options_s ! \brief Contains useful plugin data ! ! This structure contains all the various global options for plugin(s) */ typedef struct sonar_options_s { ! //! Delay after running this type of scan (advanced option) int iPostDelay; ! //! Delay after each host int iHostDelay; ! //! Timeout per host int iTimeout; ! //! do we have broadcast addresses in the targets? int bBroadcast; ! //! Verbosity level (0 to 5) int iVerbose; ! //! Fork into daemon mode? (0/1) int bFork; ! //! Command line char *sCommandLine; ! //! Number of scanning cycles to run unsigned int iCount; ! //! Random order of hosts? int bRandom; } sonar_options_t; ! /*! \struct plugin_s ! \brief Definition for the plugin interface ! ! Your plugin(s) should return a filled in structure from the plugin_init function. ! Sonar will expect all the applicable function pointers to be valid. */ typedef struct plugin_s { ! //! unique ID assigned at run time by sonar uint32_t pluginID; ! //! plugin api interface version requested, lower versions _may_ be supported uint8_t version; ! //! plugin type (INPUT_PLUGIN | OUTPUT_PLUGIN for an I/O plugin) uint8_t type; ! //! last error from this plugin int16_t *err; ! //! ready to use flag, not modified by sonar uint8_t ready:4, ! //! The plugin was selected selected:4; ! //! Plugin character (ie, -sI, -sA, -sL, -oL) char plugin_char; ! //! Short name (ie, "icmp scan", "log file output") char *shortname; ! //! Long name (ie, "ICMP Scanning Plugin: requires root...") char *longname; ! /*! \fn plugin_init (void *in_data) ! \brief Initialize this plugin ! ! Return a pointer to a filled in plugin_s structure ! */ void *(*plugin_init) (void *in_data); ! //! Destroy this plugin int (*plugin_destroy) (void); ! /*! \fn plugin_open (void *c_data, int i_data) ! \brief Open the input/output/network source ! ! For input plugins, please return the size of the buffer you use. ! Everything else should return PLUGIN_OK on success and PLUGIN_ERROR ! on error. ! */ int (*plugin_open) (void *c_data, int i_data); ! //! Close the input/output/network source int (*plugin_close) (void); ! //! Get next host, returned in hostname, only for input plugins int (*plugin_next) (char *hostname); ! //! Do the sweep (network plugins) int (*plugin_sweep) (target_t * targets); ! //! Output plugin's general message output function int (*plugin_output) (char *msg, va_list * ap); ! //! output plugins result output function int (*plugin_results) (target_t * result, unsigned int num); ! //! prints, via sonar_t->output(), line(s) to add to sonar_usage() void (*plugin_usage) (void); ! //! prints, via sonar_t->output(), line(s) to add to the status report void (*plugin_status) (void); ! //! Return the last error int (*plugin_last_error) (void); } plugin_t; ! /*! \struct sonar_s ! \brief Definition for the plugin interface ! ! This is passed to the plugin, via plugin_init, from sonar with useful ! function pointers and information, such as what version ! of sonar is loading the plugins, and pointers to sonar_msg(char *,...), etc. ! */ typedef struct sonar_s { ! //! Major version number uint8_t ver_major, ! //! Minor version number ver_minor, ! //! Revision number revision, ! //! Plugin API version 1.X (so for 1.4, set this to 4) api; ! //! Pointer to a memory copier from sonar (XXX: remove) void (*memput) (char **dest, const char *src, const int len); ! //! Pointer to the Messsage output (ie, with a timestamp) function void (*message) (char *msg, ...); ! //! Resolve a hostname, usually called with the last 3 arguments NULL, and 0 struct addrinfo *(*resolve) (const char *host, const char *serv, int family, int socktype); ! //! Pointer to sonar's output to console function (no timestamp) int (*output) (char *msg, ...); ! //! Pointer to usage function, for error reports void (*usage) (const char *); ! //! Pointer to a function to get root priveleges int (*getprivs) (void); ! //! Pointer to a function to drop root priveleges int (*dropprivs) (uid_t); ! //! find a target, for updating target_t *(*find_target) (struct sonar_s * this, struct addrinfo * ai); ! //! Name of file we are (for permissions checking) char *my_name; ! //! struct for error function pointers struct error_ptrs *err_ptrs; ! //! list of attack vectors target_t *vectors; ! //! number of targets unsigned int num_targets; ! //! number of ports unsigned int num_ports; ! //! Useful global options sonar_options_t opts; } sonar_t; ! /*! \struct plugin_list_s ! \brief Wrapper for plugin_t to be used as an array ! */ typedef struct plugin_list_s { ! //! Pointer to a plugin_t structure plugin_t *plug; ! //! Handle to library opened with \c lt_dlopen(3) void *handle; } plugin_list_t; |
From: red0x <re...@us...> - 2004-05-05 08:01:39
|
Update of /cvsroot/autosec/sonar/libltdl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10223/libltdl Modified Files: configure Log Message: Major documentation update, more to come. Index: configure =================================================================== RCS file: /cvsroot/autosec/sonar/libltdl/configure,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure 6 Dec 2003 22:17:02 -0000 1.2 --- configure 5 May 2004 08:01:29 -0000 1.3 *************** *** 1,28 **** #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. ! # Generated automatically using autoconf version 2.13 ! # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. - # Defaults: [...13028 lines suppressed...] ! # Unfortunately, on DOS this fails, as config.log is still kept open ! # by configure, so config.status won't be able to write to it; its ! # output is simply discarded. So we exec the FD to /dev/null, ! # effectively closing config.log, so it can be properly (re)opened and ! # appended to by config.status. When coming back to configure, we ! # need to make the FD available again. ! if test "$no_create" != yes; then ! ac_cs_success=: ! ac_config_status_args= ! test "$silent" = yes && ! ac_config_status_args="$ac_config_status_args --quiet" ! exec 5>/dev/null ! $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false ! exec 5>>config.log ! # Use ||, not &&, to avoid exiting from the if with $? = 1, which ! # would make configure fail if this is the last instruction. ! $ac_cs_success || { (exit 1); exit 1; } ! fi |
From: red0x <re...@us...> - 2004-05-05 08:00:42
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10046/plugins Modified Files: rfc793.c rfc793.h Log Message: Removed the bloody thread (which was causing so many problems) from the ack scan Index: rfc793.h =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** rfc793.h 13 Apr 2004 03:42:07 -0000 1.30 --- rfc793.h 5 May 2004 08:00:32 -0000 1.31 *************** *** 92,157 **** #define TCP_SIZE sizeof(struct tcphdr) ! ! /** ! * @struct _fakehead ! * pseudo TCP header for calculating the chksum ! */ struct _fakehead { uint32_t saddr; uint32_t daddr; uint8_t zero; uint8_t protocol; uint16_t tot_len; }; ! /** ! * @struct net_tuple ! * leet net tuple */ struct net_tuple { uint32_t src; unsigned short int sport; uint32_t dst; unsigned short int dport; }; ! struct tcp_timestamp ! { ! uint8_t kind; /* TCPOPT_TIMESTAMP */ ! uint8_t len; /* 10 */ ! uint32_t tsval; /* my timestamp */ ! uint32_t tsecho; /* server's timestamp */ ! }; ! ! struct recv_t ! { ! // / socket to listen on (must already be open) ! int socket, errs; ! // / number of hosts and ports we pinged ! uint32_t hosts; ! uint32_t ports; ! // / set the number of responses ! uint32_t responses; ! // / start time ! clock_t start; ! // / max wait time (timeout function) ! clock_t max; ! }; ! struct rfc_options { unsigned char ttl; ! int debug, bcast, srcPrt; char *prog; }; - // put your prototypes here - // make them static and make sure their linkage is "C" void *plugin_init(void *in_data); - //static target_t *randomize(target_t * in); - - #endif // _RFC793_H_ --- 92,159 ---- #define TCP_SIZE sizeof(struct tcphdr) ! // return codes from recv_thread ! #define RFC_FILTERED 11 ! #define RFC_UNFILT 12 ! #define RFC_UNREACH -11 ! #define RFC_NORESP -12 ! /*! \struct _fakehead ! \brief pseudo TCP header for calculating the chksum ! ! Create this header when calculating the TCP checksum ! */ struct _fakehead { + //! Source address (network byte order) uint32_t saddr; + //! Destination address (network byte order) uint32_t daddr; + //! always zero uint8_t zero; + //! protocol number uint8_t protocol; + //! total length of packet uint16_t tot_len; }; ! /*! \struct net_tuple ! \brief leet net tuple ! ! Source and destination addresses (with port numbers) as a net-tuple. ! All values are network byte order */ struct net_tuple { + //! Source address uint32_t src; + //! Source port unsigned short int sport; + //! Destination address uint32_t dst; + //! Destination port unsigned short int dport; }; ! /*! \struct rfc_options ! \brief Options local to the rfc793 (ACK scan) plugin ! ! This a structure that is local to rfc793.* and the ! ack scan plugin. It contains the ack scan plugin's ! local options ! */ struct rfc_options { + //! Time to live for outgoing packets unsigned char ttl; ! //! debug mode (undocumented) ! int debug, ! //! Broadcast mode ! bcast, ! //! Source port ! srcPrt; ! //! Program command line to run if host is online char *prog; }; void *plugin_init(void *in_data); #endif // _RFC793_H_ Index: rfc793.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.c,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** rfc793.c 24 Apr 2004 06:51:28 -0000 1.51 --- rfc793.c 5 May 2004 08:00:30 -0000 1.52 *************** *** 368,373 **** { unsigned int counter = 0, i; ! int timeout; ! unsigned int old_hosts = 0, ports = 0; assert(targets != NULL); --- 368,375 ---- { unsigned int counter = 0, i; ! int timeout, n, j; ! unsigned int num_responses = 0, num_targets = 0, num_hosts = 0, num_ports = 0; ! unsigned int filt = 0, unfilt = 0, unreach = 0, k = 0; ! int result = 0; assert(targets != NULL); *************** *** 386,389 **** --- 388,393 ---- while(targets != NULL && counter < mthis->num_targets) { + num_hosts++; + j = 1; for(i = 0; i < 65536; i++) { *************** *** 391,394 **** --- 395,400 ---- if(targets->ports[i] == PORT_SCAN) { + num_targets++; + num_ports++; targets->ports[i] = PORT_SCANNING; /* scan this one port */ *************** *** 398,409 **** return PLUGIN_ERROR; } ! /* try to receive, but if we get interrupted, its a timeout */ ! recv_thread(targets, my_socket, err_socket, timeout); ! if(errno == EINTR) ! { ! /* we timed out */ ! /* XXX: print an error */ ! ; ! } } } --- 404,443 ---- return PLUGIN_ERROR; } ! k = 0; ! while(k++ <= targets->extra_hosts) ! { ! /* try to receive, but if we get interrupted, its a timeout */ ! n = recv_thread(targets, my_socket, err_socket, timeout); ! switch(n) ! { ! case RFC_NORESP: ! break; ! case RFC_FILTERED: ! filt++;num_responses++; ! break; ! case RFC_UNFILT: ! unfilt++;num_responses++; ! break; ! case RFC_UNREACH: ! if(j == 1) ! { ! unreach++; ! j = 0; ! } ! num_responses++; ! break; ! case PLUGIN_ERROR: ! if(mthis->opts.iVerbose > 1) ! mthis->err_ptrs->err_msg("Error in recv_thread\n"); ! break; ! } ! ! if(errno == EINTR) ! { ! /* we timed out */ ! if(mthis->opts.iVerbose > 1) ! mthis->err_ptrs->err_msg("ACK Scan: Network Timeout"); ! } ! } } } *************** *** 413,419 **** usleep(mthis->opts.iHostDelay * 1000); counter++; ! old_hosts = 0; ! ports = 0; ! targets = targets->next; } --- 447,451 ---- usleep(mthis->opts.iHostDelay * 1000); counter++; ! targets = targets->next; } *************** *** 424,427 **** --- 456,480 ---- usleep(mthis->opts.iPostDelay * 1000); } + + if(mthis->opts.iVerbose > 2) + { + result = num_targets - num_responses; + if(result > 0) + mthis->output("no response(s) from %d hosts\n", result); + if(result < 0 && num_ports == 1) + mthis->output("subnet broadcast detected: extra response(s) from " + "%d hosts\n", ~result + 1); + mthis->message("ACK Scan complete:\n"); + mthis->message(" Scanned %d hosts/ %d ports, %d hosts online, %d " + "filtered, %d unfiltered, %d hosts unreachable\n", + num_hosts, + num_ports, + num_hosts - unreach, filt, unfilt, unreach); + } + if(mthis->opts.iVerbose <= 1 && unfilt && mthis->opts.iVerbose > 0) + mthis-> + output + ("\tThe remaining %d ports that were in state \'unfiltered\' were\n\tnot printed, if you want to see them, use '-v2'\n", + unfilt); return PLUGIN_OK; } *************** *** 448,452 **** // was my_ports meant for something? if not it's not doing anything // useful ! // int my_ports[65547]; uint32_t addr, one = 1; --- 501,505 ---- // was my_ports meant for something? if not it's not doing anything // useful ! int my_ports[65547]; uint32_t addr, one = 1; *************** *** 462,467 **** gethostname(name, 255); ai = mthis->resolve(name, NULL, PF_INET, 0); ! // XXX: delete? ! // memcpy(my_ports, target->ports, 65537 * sizeof(int)); for(j = 0; j <= target->extra_hosts; j++) { --- 515,519 ---- gethostname(name, 255); ai = mthis->resolve(name, NULL, PF_INET, 0); ! memcpy(my_ports, target->ports, 65537 * sizeof(int)); for(j = 0; j <= target->extra_hosts; j++) { *************** *** 521,525 **** } ! nt.dport = -1; for(i = 0; i < 65536; i++) { --- 573,577 ---- } ! //nt.dport = -1; for(i = 0; i < 65536; i++) { *************** *** 552,558 **** target->stats.packets_sent++; free(packet); ! // XXX: delete? ! /* fresh copy of port list */ ! // memcpy(target->ports, my_ports, 65537 * sizeof(int)); } --- 604,608 ---- target->stats.packets_sent++; free(packet); ! memcpy(target->ports, my_ports, 65537 * sizeof(int)); } *************** *** 568,572 **** struct tcphdr *tcp = NULL; unsigned short iphdrlen; - unsigned long unreach = 0, filt = 0, unfilt = 0; struct timeval tv; int bread, ret; --- 618,621 ---- *************** *** 576,583 **** struct sockaddr_in from; static struct addrinfo *ai = NULL; - unsigned long num_res = 0; /* number of results */ int psuedo = false; target_t *my_host; - int responses = 0; assert(my_socket != -1 && my_socket != 0); --- 625,630 ---- *************** *** 585,595 **** assert(mthis->resolve != NULL); while(1) { /* dont do anything up here, or we'll eat CPU */ - tv.tv_usec = 0; - tv.tv_sec = timeout; my_host = NULL; ! FD_ZERO(&rfds); FD_SET(my_socket, &rfds); --- 632,643 ---- assert(mthis->resolve != NULL); + while(1) { /* dont do anything up here, or we'll eat CPU */ my_host = NULL; ! tv.tv_usec = 0; ! tv.tv_sec = timeout; ! FD_ZERO(&rfds); FD_SET(my_socket, &rfds); *************** *** 605,611 **** } if(ret == 0) /* timeout */ ! { ! return PLUGIN_NORESP; ! } if(psuedo == true) { --- 653,657 ---- } if(ret == 0) /* timeout */ ! return RFC_NORESP; if(psuedo == true) { *************** *** 670,673 **** --- 716,720 ---- if((my_host = mthis->find_target(mthis, ai)) == NULL) { + /* not from one of our targets, so ignore it */ continue; } *************** *** 702,706 **** //mthis->foobar(char*string_to_expand, tcp->th_sport, my_host); - num_res++; if(mthis->opts.iVerbose > 1) mthis-> --- 749,752 ---- *************** *** 727,737 **** } ! responses++; ! unfilt++; ! break; ! //continue; } ! ! continue; } --- 773,779 ---- } ! return RFC_UNFILT; } ! /* non-rst packet, keep looking */ continue; } *************** *** 768,774 **** if(icmphdr->icmp_type != ICMP_DEST_UNREACH) { - if(mthis->opts.iVerbose > 1) - mthis->message("bad ICMP response from host, abnormal " - "behavior\n"); continue; // return PLUGIN_OK; // Parse non-unreachable ICMP returns --- 810,813 ---- *************** *** 802,809 **** if((my_host = mthis->find_target(mthis, ai)) == NULL) { continue; } - responses++; switch (icmphdr->icmp_code) { --- 841,848 ---- if((my_host = mthis->find_target(mthis, ai)) == NULL) { + /* not one of our targets, keep looking */ continue; } switch (icmphdr->icmp_code) { *************** *** 830,834 **** my_host->stats.packets_recvd++; - num_res++; if(mthis->opts.iVerbose > 0) mthis->message("%s[%s]:%d\tonline & filtered: range: " --- 869,872 ---- *************** *** 839,844 **** triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); ! filt++; ! break; case ICMP_UNREACH_HOST: assert(ai != NULL); --- 877,881 ---- triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); ! return RFC_FILTERED; case ICMP_UNREACH_HOST: assert(ai != NULL); *************** *** 849,854 **** triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); ! unreach++; ! break; default: assert(ai != NULL); --- 886,890 ---- triptime, iphdr->ip_ttl, ntohs(iphdr->ip_len)); ! return RFC_UNREACH; default: assert(ai != NULL); *************** *** 858,890 **** inet_ntoa(from.sin_addr), unreach_codes(icmphdr->icmp_code)); ! unreach++; ! break; } ! break; ! //continue; } } ! ! if(mthis->opts.iVerbose > 2) ! { ! /* result = rec->hosts - rec->responses; ! if(result > 0) ! mthis->output("no response(s) from %d hosts\n", result); ! if(result < 0 && rec->ports == 1) ! mthis->output("subnet broadcast detected: extra response(s) from " ! "%d hosts\n", ~result + 1); ! mthis->message("ACK Scan complete:\n"); ! mthis->message(" Scanned %d hosts/ %d ports, %d hosts online, %d " ! "filtered, %d unfiltered, %d hosts unreachable\n", ! rec->hosts, ! rec->ports, ! rec->responses - unreach, filt, unfilt, unreach);*/ ! } ! if(mthis->opts.iVerbose <= 1 && unfilt && mthis->opts.iVerbose > 0) ! mthis-> ! output ! ("\tThe remaining %d ports that were in state \'unfiltered\' were\n\tnot printed, if you want to see them, use '-v2'\n", ! unfilt); ! return 1; } --- 894,904 ---- inet_ntoa(from.sin_addr), unreach_codes(icmphdr->icmp_code)); ! return RFC_UNREACH; } ! return RFC_FILTERED; } } ! ! return RFC_NORESP; } |
From: red0x <re...@us...> - 2004-05-05 07:57:14
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9329 Modified Files: .indent.pro Log Message: Don't muck about with my comments, indent... Index: .indent.pro =================================================================== RCS file: /cvsroot/autosec/sonar/.indent.pro,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .indent.pro 8 Apr 2004 21:49:54 -0000 1.4 --- .indent.pro 5 May 2004 07:57:06 -0000 1.5 *************** *** 1 **** ! -i4 -sc -bli0 -bl -cbi0 -ss -fca -npcs -nsai -nsaf -nsaw -nut --- 1 ---- ! -i4 -sc -bli0 -bl -cbi0 -ss -fca -npcs -nsai -nsaf -nsaw -nut -nfca |
From: red0x <re...@us...> - 2004-04-24 06:51:38
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8564/plugins Modified Files: rfc793.c Log Message: Dethreaded the ACK scan (makes more sense that way). Also, updated some documentation. Index: rfc793.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.c,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** rfc793.c 24 Apr 2004 06:22:47 -0000 1.50 --- rfc793.c 24 Apr 2004 06:51:28 -0000 1.51 *************** *** 55,59 **** static void tvsub(struct timeval *out, struct timeval *in); static int rfc793_send(target_t * target); ! static void *recv_thread(void *arg); static void print_packet(struct tcphdr *tcp); --- 55,59 ---- static void tvsub(struct timeval *out, struct timeval *in); static int rfc793_send(target_t * target); ! static int recv_thread(target_t *target, int my_socket, int err_socket, unsigned int timeout); static void print_packet(struct tcphdr *tcp); *************** *** 64,68 **** static int send_ipv4(int sox, u_char * pkt, size_t len, struct net_tuple *nt); static const char *unreach_codes(int code); - static RETSIGTYPE sig_handler(int i); /** @fn plugin_init(void *in_data) --- 64,67 ---- *************** *** 217,221 **** { // load socket stuff here - // i_data will be the TTL to set it to uid_t uid; struct linger l; --- 216,219 ---- *************** *** 370,376 **** { unsigned int counter = 0, i; - pthread_t tid; - pthread_attr_t attr; - struct recv_t recd; int timeout; unsigned int old_hosts = 0, ports = 0; --- 368,371 ---- *************** *** 389,430 **** timeout = 5; // default timeout of 5 seconds - pthread_attr_init(&attr); - memset(&recd, 0, sizeof(struct recv_t)); - - recd.socket = my_socket; - recd.errs = err_socket; - /* if we are broadcasting, increase the responses to collect */ - /* and increase the timeout value */ - recd.hosts = mthis->num_targets; - - /* useful for later if(mthis->opts.bBroadcast > 0 && targets->extra_hosts - * == 0) recd.hosts += (unsigned int) mthis->opts.bBroadcast * 255; */ - - recd.start = clock(); - /* set the default timeout values */ - recd.max = timeout; - /* add time for a per host delay */ - if(mthis->opts.iHostDelay > 0) - recd.max += mthis->opts.iHostDelay; - - /* start the receiving thread */ - done = 0; - if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) - mthis->err_ptrs->err_sys("could not create thread"); - while(targets != NULL && counter < mthis->num_targets) { - /* we have a broadcast target, without an ip-range */ - if(targets->broadcast == 1 && targets->extra_hosts == 0) - /* add to the timeout value */ - recd.hosts += 255; - if(targets->num_ports > 0 && ports == 0) - { - // recd.start = clock(); - // recd.max = timeout;// * targets->num_ports; - - recd.ports = targets->num_ports; - ports++; - } for(i = 0; i < 65536; i++) { --- 384,389 ---- *************** *** 433,456 **** { targets->ports[i] = PORT_SCANNING; ! // recd.ports++; ! if(targets->extra_hosts > 0 && old_hosts == 0) ! { ! recd.hosts += targets->extra_hosts; ! old_hosts++; ! // targets->extra_hosts = 0; ! if(mthis->opts.iVerbose > 1) ! mthis->err_ptrs->err_msg("Increasing timeout, netmask detected\n"); ! } if(rfc793_send(targets) == PLUGIN_ERROR) { return PLUGIN_ERROR; } ! counter++; ! /* sleep after this host (allows more dest unreachables to ! * come back) */ ! if(counter < mthis->num_targets && mthis->opts.iHostDelay > 0) ! usleep(mthis->opts.iHostDelay * 1000); } } old_hosts = 0; ports = 0; --- 392,416 ---- { targets->ports[i] = PORT_SCANNING; ! /* scan this one port */ if(rfc793_send(targets) == PLUGIN_ERROR) { + /* XXX: report an error */ return PLUGIN_ERROR; } ! /* try to receive, but if we get interrupted, its a timeout */ ! recv_thread(targets, my_socket, err_socket, timeout); ! if(errno == EINTR) ! { ! /* we timed out */ ! /* XXX: print an error */ ! ; ! } } } + /* sleep after this host (allows more dest unreachables to + * come back) */ + if(counter < mthis->num_targets && mthis->opts.iHostDelay > 0) + usleep(mthis->opts.iHostDelay * 1000); + counter++; old_hosts = 0; ports = 0; *************** *** 458,464 **** targets = targets->next; } - done = 1; - /* wait for the thread to exit */ - pthread_join(tid, NULL); if(mthis->opts.iPostDelay) --- 418,421 ---- *************** *** 603,608 **** } ! static void * ! recv_thread(void *arg) { fd_set rfds; --- 560,565 ---- } ! static int ! recv_thread(target_t *target, int my_socket, int err_socket, unsigned int timeout) { fd_set rfds; *************** *** 611,621 **** struct tcphdr *tcp = NULL; unsigned short iphdrlen; - double triptime; unsigned long unreach = 0, filt = 0, unfilt = 0; struct timeval tv; int bread, ret; char buf[MAX_PACKET], *adr = NULL; ! struct recv_t *rec = (struct recv_t *) arg; ! int fromlen, my_socket = rec->socket, err_socket = rec->errs, result; struct sockaddr_in from; static struct addrinfo *ai = NULL; --- 568,577 ---- struct tcphdr *tcp = NULL; unsigned short iphdrlen; unsigned long unreach = 0, filt = 0, unfilt = 0; struct timeval tv; int bread, ret; + double triptime; char buf[MAX_PACKET], *adr = NULL; ! int fromlen; struct sockaddr_in from; static struct addrinfo *ai = NULL; *************** *** 623,646 **** int psuedo = false; target_t *my_host; assert(my_socket != -1 && my_socket != 0); assert(err_socket != -1 && err_socket != 0); assert(mthis->resolve != NULL); ! ! /* signals, baby */ ! signal(SIGTERM, sig_handler); ! signal(SIGINT, sig_handler); ! signal(SIGHUP, sig_handler); ! signal(SIGSEGV, sig_handler); ! ! rec->responses = 0; ! while(done == 0 || ! ((clock() <= ! (rec->max * CLOCKS_PER_SEC / 100 * rec->hosts * rec->ports) + ! rec->start) && rec->responses < rec->hosts * rec->ports)) { /* dont do anything up here, or we'll eat CPU */ tv.tv_usec = 0; ! tv.tv_sec = 0; my_host = NULL; --- 579,593 ---- int psuedo = false; target_t *my_host; + int responses = 0; assert(my_socket != -1 && my_socket != 0); assert(err_socket != -1 && err_socket != 0); assert(mthis->resolve != NULL); ! ! while(1) { /* dont do anything up here, or we'll eat CPU */ tv.tv_usec = 0; ! tv.tv_sec = timeout; my_host = NULL; *************** *** 653,662 **** { *(pthis.err) = errno; mthis->err_ptrs->err_ret("could not select socket\n"); ! return NULL; // PLUGIN_ERROR; } ! if(ret == 0) { ! continue; // return PLUGIN_NORESP; } if(psuedo == true) --- 600,610 ---- { *(pthis.err) = errno; + mthis->err_ptrs->err_ret("could not select socket\n"); ! return PLUGIN_ERROR; } ! if(ret == 0) /* timeout */ { ! return PLUGIN_NORESP; } if(psuedo == true) *************** *** 668,674 **** memset(&from, 0, sizeof(struct sockaddr_in)); - - tv.tv_sec = 0; - tv.tv_usec = 0; memset(buf, 0, MAX_PACKET); if(FD_ISSET(my_socket, &rfds)) --- 616,619 ---- *************** *** 782,788 **** } ! rec->responses++; unfilt++; ! continue; } --- 727,734 ---- } ! responses++; unfilt++; ! break; ! //continue; } *************** *** 800,804 **** // perror("recvfrom"); mthis->err_ptrs->err_ret("recvfrom error"); ! return NULL; // PLUGIN_ERROR; } --- 746,750 ---- // perror("recvfrom"); mthis->err_ptrs->err_ret("recvfrom error"); ! return PLUGIN_ERROR; } *************** *** 859,863 **** } ! rec->responses++; switch (icmphdr->icmp_code) { --- 805,809 ---- } ! responses++; switch (icmphdr->icmp_code) { *************** *** 915,920 **** break; } ! ! continue; } } --- 861,866 ---- break; } ! break; ! //continue; } } *************** *** 922,926 **** if(mthis->opts.iVerbose > 2) { ! result = rec->hosts - rec->responses; if(result > 0) mthis->output("no response(s) from %d hosts\n", result); --- 868,872 ---- if(mthis->opts.iVerbose > 2) { ! /* result = rec->hosts - rec->responses; if(result > 0) mthis->output("no response(s) from %d hosts\n", result); *************** *** 933,937 **** rec->hosts, rec->ports, ! rec->responses - unreach, filt, unfilt, unreach); } if(mthis->opts.iVerbose <= 1 && unfilt && mthis->opts.iVerbose > 0) --- 879,883 ---- rec->hosts, rec->ports, ! rec->responses - unreach, filt, unfilt, unreach);*/ } if(mthis->opts.iVerbose <= 1 && unfilt && mthis->opts.iVerbose > 0) *************** *** 940,944 **** ("\tThe remaining %d ports that were in state \'unfiltered\' were\n\tnot printed, if you want to see them, use '-v2'\n", unfilt); ! return NULL; } --- 886,890 ---- ("\tThe remaining %d ports that were in state \'unfiltered\' were\n\tnot printed, if you want to see them, use '-v2'\n", unfilt); ! return 1; } *************** *** 1119,1134 **** return "unknown"; } - - static RETSIGTYPE - sig_handler(int i) - { - switch (i) - { - case SIGSEGV: - mthis->err_ptrs->err_msg("oops! ACK scan seg faulted.\n"); - abort(); - break; - } - /* just close the thread and be done with it */ - pthread_exit(NULL); - } --- 1065,1066 ---- |
From: red0x <re...@us...> - 2004-04-24 06:51:36
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8564/src Modified Files: error.c plugin.c plugin.h sonar.h Log Message: Dethreaded the ACK scan (makes more sense that way). Also, updated some documentation. Index: plugin.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** plugin.c 13 Apr 2004 03:42:08 -0000 1.35 --- plugin.c 24 Apr 2004 06:51:28 -0000 1.36 *************** *** 18,22 **** /** @file plugin.c * File contains plugin API Implementation\n ! * Plugin API version 1.0 \n * To make a plugin, look in plugin.h for the plugin_t structure, * and make sure your plugins can provide all of the needed methods. --- 18,22 ---- /** @file plugin.c * File contains plugin API Implementation\n ! * Plugin API version 1.6 \n * To make a plugin, look in plugin.h for the plugin_t structure, * and make sure your plugins can provide all of the needed methods. *************** *** 60,63 **** --- 60,65 ---- /// list of input plugins plugin_list_t input_list[MAX_INP]; + // XXX: this ugly hack should be removed before 1.2.2 + /// buffer size corresponds to each input plugin uint32_t input_buf[MAX_INP]; /// list of output plugins Index: error.c =================================================================== RCS file: /cvsroot/autosec/sonar/src/error.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** error.c 13 Apr 2004 03:42:08 -0000 1.10 --- error.c 24 Apr 2004 06:51:28 -0000 1.11 *************** *** 52,58 **** /* @fn err_ret(const char *fmt, ...) ! * Nonfatal error related to a system call. ! * Print a message and return. ! * @param fmt printf style format */ void --- 52,58 ---- /* @fn err_ret(const char *fmt, ...) ! * Print a nonfatal error related to a system call. ! * This function prints a message to the console and returns. ! * @param fmt printf style format-string */ void *************** *** 72,76 **** * @param fmt printf style format */ - void err_sys(const char *fmt, ...) --- 72,75 ---- *************** *** 89,93 **** * @param fmt printf style format */ - void err_dump(const char *fmt, ...) --- 88,91 ---- Index: sonar.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/sonar.h,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** sonar.h 13 Apr 2004 03:42:08 -0000 1.33 --- sonar.h 24 Apr 2004 06:51:28 -0000 1.34 *************** *** 64,68 **** * Read INSTALL for generic instructions on compiling and installing. * This product is under the GNU GPL, which is available for reading ! * in COPYING. Contributors, feel free to send me patches. If you * include them in a release, you get your name and email (if you want) * in AUTHORS. \n\n --- 64,68 ---- * Read INSTALL for generic instructions on compiling and installing. * This product is under the GNU GPL, which is available for reading ! * in COPYING. Contributors, feel free to send me patches. If I * include them in a release, you get your name and email (if you want) * in AUTHORS. \n\n *************** *** 82,86 **** * * See the \link pluginapi Plugin API Manual \endlink. The plugin API is ! * currently version 5. * * --- 82,86 ---- * * See the \link pluginapi Plugin API Manual \endlink. The plugin API is ! * currently version 6. * * Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** plugin.h 24 Apr 2004 04:16:13 -0000 1.45 --- plugin.h 24 Apr 2004 06:51:28 -0000 1.46 *************** *** 131,151 **** struct target_s { ! // / next target in list target_t *next; ! // / user specified entry char *entry; ! // / list of ports to scan int ports[MAX_PORTS]; ! // / address info, including family, protocol, and socket type struct addrinfo *addrinfo; ! // / netmask unsigned int netmask; ! // / extra hosts involved in this (ie, w/netmask) unsigned int extra_hosts; ! // / broadcast address unsigned short broadcast; ! // / number of ports in this host uint32_t num_ports; ! // / statistics stats_t stats; }; --- 131,151 ---- struct target_s { ! /// next target in list target_t *next; ! /// user specified entry char *entry; ! /// list of ports to scan int ports[MAX_PORTS]; ! /// address info, including family, protocol, and socket type struct addrinfo *addrinfo; ! /// netmask unsigned int netmask; ! /// extra hosts involved in this (ie, w/netmask) unsigned int extra_hosts; ! /// broadcast address unsigned short broadcast; ! /// number of ports in this host uint32_t num_ports; ! /// statistics stats_t stats; }; |
From: Noah <cap...@us...> - 2004-04-24 06:22:57
|
Update of /cvsroot/autosec/sonar/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4627 Modified Files: log_file.c log_xml.c network_icmp.c rfc793.c Log Message: modified all error reporting function calls to go through the function pointers in sonar_t Index: network_icmp.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/network_icmp.c,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** network_icmp.c 13 Apr 2004 03:42:07 -0000 1.45 --- network_icmp.c 24 Apr 2004 06:22:47 -0000 1.46 *************** *** 98,102 **** mthis = (sonar_t *) in_data; if(mthis->api < 6) ! err_msg("Plugin API must be 6 or higher, update sonar"); srand(getpid() ^ (uid_t) time(NULL)); --- 98,102 ---- mthis = (sonar_t *) in_data; if(mthis->api < 6) ! mthis->err_ptrs->err_msg("Plugin API must be 6 or higher, update sonar"); srand(getpid() ^ (uid_t) time(NULL)); *************** *** 242,246 **** else if(strncmp(sArgs, "help", (mlen < 4) ? mlen : 4) == 0) { ! err_quit("Currently supported types are:\n" "\t echo - echo request\n" "\t du - dest unreachable\n" --- 242,246 ---- else if(strncmp(sArgs, "help", (mlen < 4) ? mlen : 4) == 0) { ! mthis->err_ptrs->err_quit("Currently supported types are:\n" "\t echo - echo request\n" "\t du - dest unreachable\n" *************** *** 253,257 **** else { ! err_quit("type not supported\n" "Currently supported types are:\n" "\t echo - echo request\n" --- 253,257 ---- else { ! mthis->err_ptrs->err_quit("type not supported\n" "Currently supported types are:\n" "\t echo - echo request\n" *************** *** 267,271 **** && my_type != ICMP_UNREACH && my_type != ICMP_REDIRECT) { ! err_quit("type not supported"); } if(string) --- 267,271 ---- && my_type != ICMP_UNREACH && my_type != ICMP_REDIRECT) { ! mthis->err_ptrs->err_quit("type not supported"); } if(string) *************** *** 364,368 **** if(my_socket == -1) { ! err_ret("could not get raw socket\n"); exit(-1); } --- 364,368 ---- if(my_socket == -1) { ! mthis->err_ptrs->err_ret("could not get raw socket\n"); exit(-1); } *************** *** 373,377 **** sizeof(my_options.ttl)) < 0) { ! err_ret("could not set TTL"); } --- 373,377 ---- sizeof(my_options.ttl)) < 0) { ! mthis->err_ptrs->err_ret("could not set TTL"); } *************** *** 381,385 **** (struct linger *) &l, sizeof(struct linger)) < 0) { ! err_ret("could not set timeout"); // perror("setsockopt"); } --- 381,385 ---- (struct linger *) &l, sizeof(struct linger)) < 0) { ! mthis->err_ptrs->err_ret("could not set timeout"); // perror("setsockopt"); } *************** *** 391,395 **** (int *) &(l.l_onoff), sizeof(int)) < 0) { ! err_ret("could not set debug mode"); } } --- 391,395 ---- (int *) &(l.l_onoff), sizeof(int)) < 0) { ! mthis->err_ptrs->err_ret("could not set debug mode"); } } *************** *** 400,404 **** (int *) &l.l_onoff, sizeof(int)) < 0) { ! err_ret("could not set broadcast mode"); } } --- 400,404 ---- (int *) &l.l_onoff, sizeof(int)) < 0) { ! mthis->err_ptrs->err_ret("could not set broadcast mode"); } } *************** *** 449,453 **** if(!ready || !pthis.ready) { ! err_msg("plugin not ready\n"); return PLUGIN_ERROR; } --- 449,453 ---- if(!ready || !pthis.ready) { ! mthis->err_ptrs->err_msg("plugin not ready\n"); return PLUGIN_ERROR; } *************** *** 475,479 **** done = 0; if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) ! err_sys("could not create thread"); while(targets != NULL && counter < mthis->num_targets) --- 475,479 ---- done = 0; if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) ! mthis->err_ptrs->err_sys("could not create thread"); while(targets != NULL && counter < mthis->num_targets) *************** *** 493,497 **** #endif if(mthis->opts.iVerbose > 1) ! err_msg("Increasing timeout, netmask detected\n"); } if(icmp_ping(targets) == PLUGIN_ERROR) --- 493,497 ---- #endif if(mthis->opts.iVerbose > 1) ! mthis->err_ptrs->err_msg("Increasing timeout, netmask detected\n"); } if(icmp_ping(targets) == PLUGIN_ERROR) *************** *** 644,648 **** (int *) &one, sizeof(int)) < 0) { ! err_ret("could not set broadcast mode"); } one = 0; --- 644,648 ---- (int *) &one, sizeof(int)) < 0) { ! mthis->err_ptrs->err_ret("could not set broadcast mode"); } one = 0; *************** *** 651,655 **** break; default: ! err_quit("address family not supported yet\n"); } /* how much of the packet is data? */ --- 651,655 ---- break; default: ! mthis->err_ptrs->err_quit("address family not supported yet\n"); } /* how much of the packet is data? */ *************** *** 726,730 **** { *(pthis.err) = PLUGIN_NOFILE; ! err_ret("could not open payload file"); free(buf); return PLUGIN_ERROR; --- 726,730 ---- { *(pthis.err) = PLUGIN_NOFILE; ! mthis->err_ptrs->err_ret("could not open payload file"); free(buf); return PLUGIN_ERROR; *************** *** 753,757 **** if(bwrote == -1) { ! err_ret("sendto failed"); // perror("sendto"); return PLUGIN_ERROR; --- 753,757 ---- if(bwrote == -1) { ! mthis->err_ptrs->err_ret("sendto failed"); // perror("sendto"); return PLUGIN_ERROR; *************** *** 759,763 **** if(bwrote < (int) total_size) { ! err_msg("wrote %d bytes\n", bwrote); } target->stats.packets_sent++; --- 759,763 ---- if(bwrote < (int) total_size) { ! mthis->err_ptrs->err_msg("wrote %d bytes\n", bwrote); } target->stats.packets_sent++; *************** *** 815,819 **** { *(pthis.err) = errno; ! err_ret("could not select socket\n"); return NULL; // PLUGIN_ERROR; } --- 815,819 ---- { *(pthis.err) = errno; ! mthis->err_ptrs->err_ret("could not select socket\n"); return NULL; // PLUGIN_ERROR; } *************** *** 836,840 **** if(bread == -1) { ! err_ret("recvfrom"); // perror("recvfrom"); continue; --- 836,840 ---- if(bread == -1) { ! mthis->err_ptrs->err_ret("recvfrom"); // perror("recvfrom"); continue; *************** *** 1147,1151 **** { case SIGSEGV: ! err_msg("oops! ACK scan seg faulted.\n"); abort(); break; --- 1147,1151 ---- { case SIGSEGV: ! mthis->err_ptrs->err_msg("oops! ACK scan seg faulted.\n"); abort(); break; Index: log_file.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_file.c,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** log_file.c 13 Apr 2004 03:42:07 -0000 1.27 --- log_file.c 24 Apr 2004 06:22:41 -0000 1.28 *************** *** 67,71 **** mthis = (sonar_t *) in_data; if(mthis->api < 6) ! err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = OUTPUT_PLUGIN; --- 67,71 ---- mthis = (sonar_t *) in_data; if(mthis->api < 6) ! mthis->err_ptrs->err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = OUTPUT_PLUGIN; *************** *** 172,176 **** { *(pthis.err) = PLUGIN_NOFILE; ! err_msg("Could not open file"); pthis.ready = false; return PLUGIN_NOFILE; --- 172,176 ---- { *(pthis.err) = PLUGIN_NOFILE; ! mthis->err_ptrs->err_msg("Could not open file"); pthis.ready = false; return PLUGIN_NOFILE; *************** *** 201,205 **** { *(pthis.err) = PLUGIN_NOPEN; ! err_msg("output plugin not ready"); return PLUGIN_NOPEN; } --- 201,205 ---- { *(pthis.err) = PLUGIN_NOPEN; ! mthis->err_ptrs->err_msg("output plugin not ready"); return PLUGIN_NOPEN; } *************** *** 207,211 **** { *(pthis.err) = PLUGIN_NOFILE; ! err_msg("output plugin not ready, retrying"); my_fp = fopen(my_file, "a"); /* reopen it instead of dying */ /* return PLUGIN_NOFILE; */ --- 207,211 ---- { *(pthis.err) = PLUGIN_NOFILE; ! mthis->err_ptrs->err_msg("output plugin not ready, retrying"); my_fp = fopen(my_file, "a"); /* reopen it instead of dying */ /* return PLUGIN_NOFILE; */ Index: rfc793.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/rfc793.c,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** rfc793.c 23 Apr 2004 02:35:55 -0000 1.49 --- rfc793.c 24 Apr 2004 06:22:47 -0000 1.50 *************** *** 83,87 **** mthis = (sonar_t *) in_data; if(mthis->api < 6) ! err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = NETWORK_PLUGIN; --- 83,87 ---- mthis = (sonar_t *) in_data; if(mthis->api < 6) ! mthis->err_ptrs->err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = NETWORK_PLUGIN; *************** *** 235,242 **** my_socket = socket(PF_INET, SOCK_RAW, IPPROTO_TCP); if(my_socket == -1) ! err_sys("could not create raw TCP socket"); err_socket = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP); if(err_socket == -1) ! err_sys("could not create raw ICMP socket"); if(op.ttl != 0) --- 235,242 ---- my_socket = socket(PF_INET, SOCK_RAW, IPPROTO_TCP); if(my_socket == -1) ! mthis->err_ptrs->err_sys("could not create raw TCP socket"); err_socket = socket(PF_INET, SOCK_RAW, IPPROTO_ICMP); if(err_socket == -1) ! mthis->err_ptrs->err_sys("could not create raw ICMP socket"); if(op.ttl != 0) *************** *** 246,250 **** { *(pthis.err) = PLUGIN_ERROR; ! err_ret("could not set TTL"); } } --- 246,250 ---- { *(pthis.err) = PLUGIN_ERROR; ! mthis->err_ptrs->err_ret("could not set TTL"); } } *************** *** 259,263 **** { *(pthis.err) = PLUGIN_ERROR; ! err_ret("could not set timeout"); // perror("setsockopt"); // mthis->usage("could not set linger time on TCP socket"); --- 259,263 ---- { *(pthis.err) = PLUGIN_ERROR; ! mthis->err_ptrs->err_ret("could not set timeout"); // perror("setsockopt"); // mthis->usage("could not set linger time on TCP socket"); *************** *** 267,271 **** { *(pthis.err) = PLUGIN_ERROR; ! err_ret("could not set icmp timeout"); // perror("setsockopt"); // mthis->usage("could not set linger time on ICMP socket"); --- 267,271 ---- { *(pthis.err) = PLUGIN_ERROR; ! mthis->err_ptrs->err_ret("could not set icmp timeout"); // perror("setsockopt"); // mthis->usage("could not set linger time on ICMP socket"); *************** *** 279,283 **** { *(pthis.err) = PLUGIN_ERROR; ! err_ret("could not set debug mode"); } --- 279,283 ---- { *(pthis.err) = PLUGIN_ERROR; ! mthis->err_ptrs->err_ret("could not set debug mode"); } *************** *** 291,295 **** { *(pthis.err) = PLUGIN_ERROR; ! err_ret("could not set broadcast mode"); // perror("setsockopt"); // exit(-1); --- 291,295 ---- { *(pthis.err) = PLUGIN_ERROR; ! mthis->err_ptrs->err_ret("could not set broadcast mode"); // perror("setsockopt"); // exit(-1); *************** *** 381,385 **** if(!pthis.ready || !ready) { ! err_msg("plugin not ready\n"); return PLUGIN_ERROR; } --- 381,385 ---- if(!pthis.ready || !ready) { ! mthis->err_ptrs->err_msg("plugin not ready\n"); return PLUGIN_ERROR; } *************** *** 411,415 **** done = 0; if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) ! err_sys("could not create thread"); while(targets != NULL && counter < mthis->num_targets) --- 411,415 ---- done = 0; if(pthread_create(&tid, &attr, recv_thread, &recd) != 0) ! mthis->err_ptrs->err_sys("could not create thread"); while(targets != NULL && counter < mthis->num_targets) *************** *** 440,444 **** // targets->extra_hosts = 0; if(mthis->opts.iVerbose > 1) ! err_msg("Increasing timeout, netmask detected\n"); } if(rfc793_send(targets) == PLUGIN_ERROR) --- 440,444 ---- // targets->extra_hosts = 0; if(mthis->opts.iVerbose > 1) ! mthis->err_ptrs->err_msg("Increasing timeout, netmask detected\n"); } if(rfc793_send(targets) == PLUGIN_ERROR) *************** *** 553,557 **** (int *) &one, sizeof(int)) < 0) { ! err_ret("could not set broadcast mode"); } one = 0; --- 553,557 ---- (int *) &one, sizeof(int)) < 0) { ! mthis->err_ptrs->err_ret("could not set broadcast mode"); } one = 0; *************** *** 561,565 **** break; default: ! err_quit("address family not supported yet\n"); } --- 561,565 ---- break; default: ! mthis->err_ptrs->err_quit("address family not supported yet\n"); } *************** *** 585,589 **** if(bwrote == -1) { ! err_ret("send_ipv4 failed"); // perror("send_ipv4"); return PLUGIN_ERROR; --- 585,589 ---- if(bwrote == -1) { ! mthis->err_ptrs->err_ret("send_ipv4 failed"); // perror("send_ipv4"); return PLUGIN_ERROR; *************** *** 591,595 **** if(bwrote < (int) total_size) { ! err_msg("wrote %d bytes\n", bwrote); } target->stats.packets_sent++; --- 591,595 ---- if(bwrote < (int) total_size) { ! mthis->err_ptrs->err_msg("wrote %d bytes\n", bwrote); } target->stats.packets_sent++; *************** *** 653,657 **** { *(pthis.err) = errno; ! err_ret("could not select socket\n"); return NULL; // PLUGIN_ERROR; } --- 653,657 ---- { *(pthis.err) = errno; ! mthis->err_ptrs->err_ret("could not select socket\n"); return NULL; // PLUGIN_ERROR; } *************** *** 681,685 **** { *(pthis.err) = errno; ! err_ret("recvfrom error"); continue; // return PLUGIN_ERROR; } --- 681,685 ---- { *(pthis.err) = errno; ! mthis->err_ptrs->err_ret("recvfrom error"); continue; // return PLUGIN_ERROR; } *************** *** 799,803 **** { // perror("recvfrom"); ! err_ret("recvfrom error"); return NULL; // PLUGIN_ERROR; } --- 799,803 ---- { // perror("recvfrom"); ! mthis->err_ptrs->err_ret("recvfrom error"); return NULL; // PLUGIN_ERROR; } *************** *** 1126,1130 **** { case SIGSEGV: ! err_msg("oops! ACK scan seg faulted.\n"); abort(); break; --- 1126,1130 ---- { case SIGSEGV: ! mthis->err_ptrs->err_msg("oops! ACK scan seg faulted.\n"); abort(); break; Index: log_xml.c =================================================================== RCS file: /cvsroot/autosec/sonar/plugins/log_xml.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** log_xml.c 13 Apr 2004 03:42:07 -0000 1.12 --- log_xml.c 24 Apr 2004 06:22:47 -0000 1.13 *************** *** 67,71 **** mthis = (sonar_t *) in_data; if(mthis->api < 6) ! err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = OUTPUT_PLUGIN; --- 67,71 ---- mthis = (sonar_t *) in_data; if(mthis->api < 6) ! mthis->err_ptrs->err_quit("Plugin API must be 6 or higher, update sonar"); pthis.type = OUTPUT_PLUGIN; *************** *** 172,176 **** { *(pthis.err) = PLUGIN_NOFILE; ! err_msg("Could not open file"); pthis.ready = false; return PLUGIN_NOFILE; --- 172,176 ---- { *(pthis.err) = PLUGIN_NOFILE; ! mthis->err_ptrs->err_msg("Could not open file"); pthis.ready = false; return PLUGIN_NOFILE; *************** *** 202,206 **** { *(pthis.err) = PLUGIN_NOPEN; ! err_msg("output plugin not ready"); return PLUGIN_NOPEN; } --- 202,206 ---- { *(pthis.err) = PLUGIN_NOPEN; ! mthis->err_ptrs->err_msg("output plugin not ready"); return PLUGIN_NOPEN; } *************** *** 208,212 **** { *(pthis.err) = PLUGIN_NOFILE; ! err_msg("output plugin not ready, retrying"); my_fp = fopen(my_file, "a"); /* reopen it instead of dying */ /* return PLUGIN_NOFILE; */ --- 208,212 ---- { *(pthis.err) = PLUGIN_NOFILE; ! mthis->err_ptrs->err_msg("output plugin not ready, retrying"); my_fp = fopen(my_file, "a"); /* reopen it instead of dying */ /* return PLUGIN_NOFILE; */ *************** *** 219,225 **** now = time(NULL); if(!(tm = localtime(&now))) ! err_sys("could not get localtime\n"); if(strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M %Z", tm) <= 0) ! err_sys("Could not format localtime\n"); fprintf(my_fp, "<?xml version=\"1.0\" ?>\n"); fprintf(my_fp, "<!-- %s %s initiated at %s as %s -->\n", PACKAGE, --- 219,225 ---- now = time(NULL); if(!(tm = localtime(&now))) ! mthis->err_ptrs->err_sys("could not get localtime\n"); if(strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M %Z", tm) <= 0) ! mthis->err_ptrs->err_sys("Could not format localtime\n"); fprintf(my_fp, "<?xml version=\"1.0\" ?>\n"); fprintf(my_fp, "<!-- %s %s initiated at %s as %s -->\n", PACKAGE, |
From: Noah <cap...@us...> - 2004-04-24 04:16:23
|
Update of /cvsroot/autosec/sonar/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20083 Modified Files: plugin.h Log Message: added error function pointer struct Index: plugin.h =================================================================== RCS file: /cvsroot/autosec/sonar/src/plugin.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** plugin.h 13 Apr 2004 03:42:08 -0000 1.44 --- plugin.h 24 Apr 2004 04:16:13 -0000 1.45 *************** *** 118,121 **** --- 118,130 ---- }; + struct error_ptrs + { + void (*err_ret) (const char *fmt, ...); + void (*err_sys) (const char *fmt, ...); + void (*err_dump) (const char *fmt, ...); + void (*err_msg) (const char *fmt, ...); + void (*err_quit) (const char *fmt, ...); + }; + typedef struct target_s target_t; *************** *** 271,274 **** --- 280,286 ---- char *my_name; + // struct for error function pointers + struct error_ptrs *err_ptrs; + // / list of attack vectors target_t *vectors; |
From: red0x <re...@us...> - 2004-04-24 03:19:19
|
Update of /cvsroot/autosec/sonar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11259 Modified Files: Makefile.am Log Message: Documentation target was broken Index: Makefile.am =================================================================== RCS file: /cvsroot/autosec/sonar/Makefile.am,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Makefile.am 8 Apr 2004 22:38:40 -0000 1.16 --- Makefile.am 24 Apr 2004 03:19:02 -0000 1.17 *************** *** 41,45 **** docs: ! @cd $(docdir) && $(MAKE) $@ debug: --- 41,45 ---- docs: ! @cd $(docdir) && $(MAKE) all debug: |