javanetsim-cvs Mailing List for javaNetSim (Page 13)
Status: Beta
Brought to you by:
darkkey
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(120) |
Dec
(62) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(1) |
Feb
(69) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(76) |
Oct
(28) |
Nov
(77) |
Dec
(186) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(36) |
Oct
(61) |
Nov
(23) |
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(17) |
Oct
(105) |
Nov
(5) |
Dec
(1) |
2009 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(9) |
Nov
|
Dec
|
From: Alexander B. <da...@us...> - 2006-12-21 13:11:50
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20283 Modified Files: .cvsignore Makefile iceversion.h nbt_wrapper.h Added Files: Makefile.am aclocal.m4 config.guess config.h.in config.status config.sub configure configure.ac defwin.h depcomp install-sh missing Log Message: Index: .cvsignore =================================================================== RCS file: /cvsroot/javanetsim/IceScan/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 17 Dec 2006 11:46:34 -0000 1.4 --- .cvsignore 21 Dec 2006 13:11:46 -0000 1.5 *************** *** 1,3 **** ! icescan icescan.o Makefile ! icescan.exe ! IceScan.exe \ No newline at end of file --- 1 ---- ! icescan icescan.o Makefile icescan.exe IceScan.exe Makefile.in \ No newline at end of file --- NEW FILE: config.status --- #! /bin/sh # Generated by configure. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=${CONFIG_SHELL-/bin/sh} ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which [...1259 lines suppressed...] sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done { (exit 0); exit 0; } --- NEW FILE: config.h.in --- /* config.h.in. Generated from configure.ac by autoheader. */ /* freebsd */ #undef FREEBSD /* Define to 1 if you have the <arpa/inet.h> header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME /* Define to 1 if you have the `gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `dnet' library (-ldnet). */ #undef HAVE_LIBDNET /* Define to 1 if you have the <libintl.h> header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `pcap' library (-lpcap). */ #undef HAVE_LIBPCAP /* Define to 1 if you have the `pcre' library (-lpcre). */ #undef HAVE_LIBPCRE /* Define to 1 if you have the `pcrecpp' library (-lpcrecpp). */ #undef HAVE_LIBPCRECPP /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the <netdb.h> header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the <netinet/in.h> header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the <strings.h> header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the <sys/file.h> header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the <sys/ioctl.h> header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the <sys/param.h> header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the <sys/select.h> header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the <sys/socket.h> header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the <sys/stat.h> header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the <sys/timeb.h> header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the <sys/time.h> header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* releasedate */ #undef ICESCAN_DATE /* name */ #undef ICESCAN_NAME /* version */ #undef ICESCAN_VERSION /* website */ #undef ICESCAN_WEBSITE /* linux */ #undef LINUX /* netbsd */ #undef NETBSD /* openbsd */ #undef OPENBSD /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* solaris */ #undef SOLARIS /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned' if <sys/types.h> does not define. */ #undef size_t --- NEW FILE: configure --- #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for icescan "0.0.6". # # Report bugs to <'ke...@ti...'>. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. [...7147 lines suppressed...] # config.status does its own redirection, appending to config.log. # 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 --- NEW FILE: missing --- #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pi...@ir...>, 1996. # 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, 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 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 --- NEW FILE: config.guess --- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file 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 # General Public License for more details. # # You should have received a copy of the GNU General Public License [...1480 lines suppressed...] /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Index: nbt_wrapper.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/nbt_wrapper.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** nbt_wrapper.h 17 Dec 2006 19:21:15 -0000 1.7 --- nbt_wrapper.h 21 Dec 2006 13:11:46 -0000 1.8 *************** *** 18,22 **** Version 1.9 Main SMB server routine ! Copyright (C) Andrew Tridgell 1992-199 This program is free software; you can redistribute it and/or modif --- 18,22 ---- Version 1.9 Main SMB server routine ! Copyright (C) Andrew Tridgell 1992-1999 This program is free software; you can redistribute it and/or modif --- NEW FILE: config.sub --- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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 [...1587 lines suppressed...] -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Index: Makefile =================================================================== RCS file: /cvsroot/javanetsim/IceScan/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile 16 Dec 2006 20:44:18 -0000 1.3 --- Makefile 21 Dec 2006 13:11:46 -0000 1.4 *************** *** 1,16 **** ! CXXFLAGS= ! LDFLAGS=-g -lpthread -lpcre -lpcrecpp -lpcap ! all: icescan ! clean: ! rm -f icescan.o icescan - .PHONY: clean all - icescan: icescan.o --- 1,578 ---- ! # Makefile.in generated by automake 1.9.6 from Makefile.am. ! # Makefile. Generated from Makefile.in by configure. ! # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, ! # 2003, 2004, 2005 Free Software Foundation, Inc. ! # This Makefile.in is free software; the Free Software Foundation ! # gives unlimited permission to copy and/or distribute it, ! # with or without modifications, as long as this notice is preserved. ! # This program is distributed in the hope that it will be useful, ! # but WITHOUT ANY WARRANTY, to the extent permitted by law; without ! # even the implied warranty of MERCHANTABILITY or FITNESS FOR A ! # PARTICULAR PURPOSE. + srcdir = . + top_srcdir = . + + pkgdatadir = $(datadir)/icescan + pkglibdir = $(libdir)/icescan + pkgincludedir = $(includedir)/icescan + top_builddir = . + am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd + INSTALL = /usr/bin/install -c + install_sh_DATA = $(install_sh) -c -m 644 + install_sh_PROGRAM = $(install_sh) -c + install_sh_SCRIPT = $(install_sh) -c + INSTALL_HEADER = $(INSTALL_DATA) + transform = $(program_transform_name) + NORMAL_INSTALL = : + PRE_INSTALL = : + POST_INSTALL = : + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = x86_64-unknown-linux-gnu + host_triplet = x86_64-unknown-linux-gnu + bin_PROGRAMS = icescan$(EXEEXT) + DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ + TODO config.guess config.sub depcomp install-sh missing + subdir = . + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac + am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) + am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno + mkinstalldirs = $(install_sh) -d + CONFIG_HEADER = config.h + CONFIG_CLEAN_FILES = + am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(icescandir)" + binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) + PROGRAMS = $(bin_PROGRAMS) + am_icescan_OBJECTS = icescan.$(OBJEXT) + icescan_OBJECTS = $(am_icescan_OBJECTS) + icescan_LDADD = $(LDADD) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I. + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles + CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) + CXXLD = $(CXX) + CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ + SOURCES = $(icescan_SOURCES) + DIST_SOURCES = $(icescan_SOURCES) + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; + am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; + icescanDATA_INSTALL = $(INSTALL_DATA) + DATA = $(icescan_DATA) + ETAGS = etags + CTAGS = ctags + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + distdir = $(PACKAGE)-$(VERSION) + top_distdir = $(distdir) + am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } + DIST_ARCHIVES = $(distdir).tar.gz + GZIP_ENV = --best + distuninstallcheck_listfiles = find . -type f -print + distcleancheck_listfiles = find . -type f -print + ACLOCAL = ${SHELL} /home/key/IceScan/missing --run aclocal-1.9 + AMDEP_FALSE = # + AMDEP_TRUE = + AMTAR = ${SHELL} /home/key/IceScan/missing --run tar + AUTOCONF = ${SHELL} /home/key/IceScan/missing --run autoconf + AUTOHEADER = ${SHELL} /home/key/IceScan/missing --run autoheader + AUTOMAKE = ${SHELL} /home/key/IceScan/missing --run automake-1.9 + AWK = gawk + CC = gcc + CCDEPMODE = depmode=gcc3 + CFLAGS = -g -O2 + CPP = gcc -E + CPPFLAGS = + CXX = g++ + CXXDEPMODE = depmode=gcc3 + CXXFLAGS = -g -O2 + CYGPATH_W = echo + DEFS = -DHAVE_CONFIG_H + DEPDIR = .deps + ECHO_C = + ECHO_N = -n + ECHO_T = + EGREP = grep -E + EXEEXT = + INSTALL_DATA = ${INSTALL} -m 644 + INSTALL_PROGRAM = ${INSTALL} + INSTALL_SCRIPT = ${INSTALL} + INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s + LDFLAGS = + LIBOBJS = + LIBS = -lpthread -lpcrecpp -lpcre -lpcap -ldnet + LTLIBOBJS = + MAKEINFO = ${SHELL} /home/key/IceScan/missing --run makeinfo + OBJEXT = o + PACKAGE = icescan + PACKAGE_BUGREPORT = ke...@ti... + PACKAGE_NAME = icescan + PACKAGE_STRING = icescan "0.0.6" + PACKAGE_TARNAME = icescan + PACKAGE_VERSION = "0.0.6" + PATH_SEPARATOR = : + SET_MAKE = + SHELL = /bin/sh + STRIP = + VERSION = "0.0.6" + ac_ct_CC = gcc + ac_ct_CXX = g++ + ac_ct_STRIP = + am__fastdepCC_FALSE = # + am__fastdepCC_TRUE = + am__fastdepCXX_FALSE = # + am__fastdepCXX_TRUE = + am__include = include + am__leading_dot = . + am__quote = + am__tar = ${AMTAR} chof - "$$tardir" + am__untar = ${AMTAR} xf - + bindir = ${exec_prefix}/bin + build = x86_64-unknown-linux-gnu + build_alias = + build_cpu = x86_64 + build_os = linux-gnu + build_vendor = unknown + datadir = ${prefix}/share + exec_prefix = ${prefix} + host = x86_64-unknown-linux-gnu + host_alias = + host_cpu = x86_64 + host_os = linux-gnu + host_vendor = unknown + includedir = ${prefix}/include + infodir = ${prefix}/info + install_sh = /home/key/IceScan/install-sh + libdir = ${exec_prefix}/lib + libexecdir = ${exec_prefix}/libexec + localstatedir = ${prefix}/var + mandir = ${prefix}/man + mkdir_p = mkdir -p -- + oldincludedir = /usr/include + prefix = /usr/local + program_transform_name = s,x,x, + sbindir = ${exec_prefix}/sbin + sharedstatedir = ${prefix}/com + sysconfdir = ${prefix}/etc + target_alias = + icescandir = $(datadir)/icescan + icescan_SOURCES = icescan.cc + icescan_DATA = services ieee-oui.txt README INSTALL COPYING AUTHORS ChangeLog INSTALL.configure + -DHAVE_CONFIG_H = -DICESCAN_DATADIR=$(icescandir) -DHAVE_CONFIG_H + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + + .SUFFIXES: + .SUFFIXES: .cc .o .obj + am--refresh: + @: + $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile + .PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + + $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + + $(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) + $(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + + config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + + stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h + $(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + + distclean-hdr: + -rm -f config.h stamp-h1 + install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + + uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + + clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + icescan$(EXEEXT): $(icescan_OBJECTS) $(icescan_DEPENDENCIES) + @rm -f icescan$(EXEEXT) + $(CXXLINK) $(icescan_LDFLAGS) $(icescan_OBJECTS) $(icescan_LDADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c + + include ./$(DEPDIR)/icescan.Po + + .cc.o: + if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + # source='$<' object='$@' libtool=no \ + # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + # $(CXXCOMPILE) -c -o $@ $< + + .cc.obj: + if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + # source='$<' object='$@' libtool=no \ + # DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + # $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + uninstall-info-am: + install-icescanDATA: $(icescan_DATA) + @$(NORMAL_INSTALL) + test -z "$(icescandir)" || $(mkdir_p) "$(DESTDIR)$(icescandir)" + @list='$(icescan_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(icescanDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(icescandir)/$$f'"; \ + $(icescanDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(icescandir)/$$f"; \ + done + + uninstall-icescanDATA: + @$(NORMAL_UNINSTALL) + @list='$(icescan_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(icescandir)/$$f'"; \ + rm -f "$(DESTDIR)$(icescandir)/$$f"; \ + done + + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + tags: TAGS + + TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + + GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + + distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + + distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) + dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + + dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + + dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + + dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + + dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + + dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + + # This target untars the dist file and tries a VPATH configuration. Then + # it guarantees that the distribution is self-contained by making another + # tarfile. + distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 + distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 + check-am: all-am + check: check-am + all-am: Makefile $(PROGRAMS) $(DATA) config.h + installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(icescandir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done + install: install-am + install-exec: install-exec-am + install-data: install-data-am + uninstall: uninstall-am + + install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + + installcheck: installcheck-am + install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + mostlyclean-generic: + + clean-generic: + + distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + clean: clean-am + + clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + + distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile + distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + + dvi: dvi-am + + dvi-am: + + html: html-am + + info: info-am + + info-am: + + install-data-am: install-icescanDATA + + install-exec-am: install-binPROGRAMS + + install-info: install-info-am + + install-man: + + installcheck-am: + + maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile + maintainer-clean-am: distclean-am maintainer-clean-generic + + mostlyclean: mostlyclean-am + + mostlyclean-am: mostlyclean-compile mostlyclean-generic + + pdf: pdf-am + pdf-am: + + ps: ps-am + + ps-am: + + uninstall-am: uninstall-binPROGRAMS uninstall-icescanDATA \ + uninstall-info-am + .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ + dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-compile distclean-generic distclean-hdr \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-exec \ + install-exec-am install-icescanDATA install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-icescanDATA \ + uninstall-info-am + # 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. + .NOEXPORT: Index: iceversion.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/iceversion.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** iceversion.h 14 Dec 2006 16:40:25 -0000 1.3 --- iceversion.h 21 Dec 2006 13:11:46 -0000 1.4 *************** *** 3,9 **** #define ICENAME "IceScan" ! #define ICEVERSION "0.0.5" ! #define ICEWEBSITE "http://javanetsim.cvs.sourceforge.net/javanetsim/IceScan/" // (...) ! #define ICEDATE "14 December 2006" #endif --- 3,9 ---- #define ICENAME "IceScan" ! #define ICEVERSION ICESCAN_VERSION ! #define ICEWEBSITE ICESCAN_WEBSITE ! #define ICEDATE ICESCAN_DATE #endif --- NEW FILE: configure.ac --- # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT(icescan, "0.0.6", 'ke...@ti...') AC_DEFINE(ICESCAN_VERSION, AC_PACKAGE_VERSION, [version]) AC_DEFINE(ICESCAN_NAME, AC_PACKAGE_NAME, [name]) AC_DEFINE(ICESCAN_DATE, "21 December 2006", [releasedate]) AC_DEFINE(ICESCAN_WEBSITE, "http://javanetsim.cvs.sourceforge.net/javanetsim/IceScan/", [website]) AM_INIT_AUTOMAKE([1.9 foreign]) AC_CONFIG_SRCDIR([iceparams.h]) AC_CONFIG_HEADER(config.h) # Check platform AC_CANONICAL_HOST AC_MSG_CHECKING([for platform]) linux=no case "$host" in *-netbsd* | *-knetbsd*-gnu) AC_DEFINE(NETBSD, 1, [netbsd]) ;; *-openbsd*) AC_DEFINE(OPENBSD, 1, [openbsd]) ;; *-solaris*) AC_DEFINE(SOLARIS, 1, [solaris]) ;; *-linux*) AC_DEFINE(LINUX, 1, [linux]) linux=yes ;; *-freebsd* | *-kfreebsd*-gnu | *-dragonfly*) AC_DEFINE(FREEBSD, 1, [freebsd]) ;; esac icescan_gcc_major_version=0 # Checks for gcc. AC_PROG_CXX AC_PROG_CC AC_MSG_CHECKING([whether the compiler is gcc 4 or greater]) if test x"$GXX" = xno; then AC_MSG_RESULT([no]) else # On some distros, there are snapshots available as gcc4 if test -z "$ac_cv_prog_CC" || test x"$CC" = xgcc4; then our_gcc="$CC" else our_gcc="$ac_cv_prog_CC" fi # new major versions must be added here case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in *4.) icescan_gcc_major_version=4 ;; *3.) icescan_gcc_major_version=3 ;; *2.) icescan_gcc_major_version=2 ;; *1.) icescan_gcc_major_version=1 ;; esac if test "$icescan_gcc_major_version" -ge 4; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi fi # Checks for libraries. AC_CHECK_LIB([dnet], [arp_open]) AC_CHECK_LIB([pcap], [main]) AC_CHECK_LIB([pcre], [main]) AC_CHECK_LIB([pcrecpp], [main]) AC_CHECK_LIB([pthread], [main]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h memory.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_C_CONST AC_TYPE_SIZE_T AC_HEADER_TIME # Checks for library functions. AC_PROG_GCC_TRADITIONAL AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([bzero ftime gethostbyaddr gethostbyname gethostname gettimeofday inet_ntoa memset select socket strstr]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT --- NEW FILE: defwin.h --- /* defwin.h. changes config.h for WIN32. */ #include "config-win.h" // No such hosts on WIN32 ;) #undef LINUX #undef OPENBSD #undef NETBSD #undef SOLARIS #undef FREEBSD // No BZERO on WIN32 #undef HAVE_BZERO --- NEW FILE: depcomp --- #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # 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, 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 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <ol...@dc...>. if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 --- NEW FILE: aclocal.m4 --- # generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from... [truncated message content] |
From: Alexander B. <da...@us...> - 2006-12-21 10:13:57
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9607/icesockets Modified Files: sock_arp.h sock_eth.h sock_name.h sock_pcap.h sock_types.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** sock_types.h 18 Dec 2006 08:40:01 -0000 1.24 --- sock_types.h 21 Dec 2006 10:13:53 -0000 1.25 *************** *** 6,9 **** --- 6,10 ---- #ifndef __CYGWIN__ #include <dnet.h> + #define __WITH_DNET__ 1 #endif Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sock_pcap.h 19 Dec 2006 21:09:04 -0000 1.8 --- sock_pcap.h 21 Dec 2006 10:13:53 -0000 1.9 *************** *** 18,21 **** --- 18,25 ---- } + pcap_t* start_pcap(int iface, bool block, char *filter_exp){ + return NULL; + } + void listdev_pcap(){ } *************** *** 258,261 **** --- 262,277 ---- } + pcap_t* open_pcap(int iface, bool block, char *filter_exp){ + pcap_t* p = init_pcap(iface); + + if(!p) return NULL; + + pcap_block(p, block); + + pcap_filter(p, filter_exp); + + return p; + } + void close_pcap(pcap_t *p){ pcap_close(p); Index: sock_name.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_name.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** sock_name.h 19 Dec 2006 21:09:04 -0000 1.13 --- sock_name.h 21 Dec 2006 10:13:53 -0000 1.14 *************** *** 118,122 **** icestring get_source_ip(const icestring &destip, icestring &sourceint){ ! #ifdef __CYGWIN__ char local_hostname[80]; if(gethostname(local_hostname, 80)) exit(-1); --- 118,122 ---- icestring get_source_ip(const icestring &destip, icestring &sourceint){ ! #ifndef DNET_H char local_hostname[80]; if(gethostname(local_hostname, 80)) exit(-1); Index: sock_eth.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_eth.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sock_eth.h 17 Dec 2006 18:49:55 -0000 1.5 --- sock_eth.h 21 Dec 2006 10:13:53 -0000 1.6 *************** *** 248,252 **** ip_t *i = i_ip_open(); ! i_ip_send(i, buf, len); i_ip_close(i); --- 248,252 ---- ip_t *i = i_ip_open(); ! i_ip_send(i, buf, len); i_ip_close(i); Index: sock_arp.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_arp.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sock_arp.h 17 Dec 2006 15:06:37 -0000 1.6 --- sock_arp.h 21 Dec 2006 10:13:53 -0000 1.7 *************** *** 6,10 **** */ ! #ifndef _icearp_H #define _icearp_H --- 6,10 ---- */ ! #ifndef _icearp_H #define _icearp_H *************** *** 14,22 **** icestring get_arp_from_cache(icestring &ip) { ! char arp[24]; ! #if __CYGWIN__ return ""; ! #elif WIN32 PMIB_IPNETTABLE pIPNetTable = NULL; PMIB_IPNETROW pIPNetRow = NULL; --- 14,49 ---- icestring get_arp_from_cache(icestring &ip) { ! char arp[24]; ! ! #ifdef __CYGWIN__ return ""; ! #elif __WITH_DNET__ ! struct arp_entry ae; ! ! addr_pton(ip.c_str(), &ae.arp_pa); ! ! arp_t *p = arp_open(); ! ! arp_get(p, &ae); ! ! arp_close(p); ! ! struct sockaddr sa; ! ! addr_ntos(&(ae.arp_ha), &sa); ! ! sprintf(arp, "%02x:%02x:%02x:%02x:%02x:%02x", ! sa.sa_data[0] & 0xFF, ! sa.sa_data[1] & 0xFF, ! sa.sa_data[2] & 0xFF, ! sa.sa_data[3] & 0xFF, ! sa.sa_data[4] & 0xFF, ! sa.sa_data[5] & 0xFF); ! ! icestring ret(arp); ! ! return ret; ! #elif WIN32 && !__WITH_DNET__ PMIB_IPNETTABLE pIPNetTable = NULL; PMIB_IPNETROW pIPNetRow = NULL; *************** *** 53,58 **** return ""; ! } ! #else struct sockaddr_in sin = { 0 }; struct arpreq myarp = { { 0 } }; --- 80,85 ---- return ""; ! } ! #elif __linux__ && !__WITH_DNET__ struct sockaddr_in sin = { 0 }; struct arpreq myarp = { { 0 } }; *************** *** 63,70 **** memcpy(&myarp.arp_pa, &sin, sizeof myarp.arp_pa); ! strcpy(myarp.arp_dev, "eth0"); ! // ^^^^^^^^^^^^^^^^^^^^^^^^ ! //UGLY, check ALL interfaces ! if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { perror("socket"); --- 90,95 ---- memcpy(&myarp.arp_pa, &sin, sizeof myarp.arp_pa); ! strcpy(myarp.arp_dev, "any"); //UGLY ! if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { perror("socket"); *************** *** 82,89 **** myarp.arp_ha.sa_data[4] & 0xFF, myarp.arp_ha.sa_data[5] & 0xFF); ! #endif ! icestring ret(arp); return ret; } --- 107,116 ---- myarp.arp_ha.sa_data[4] & 0xFF, myarp.arp_ha.sa_data[5] & 0xFF); ! icestring ret(arp); return ret; + #else + return ""; + #endif } |
From: Alexander B. <da...@us...> - 2006-12-21 10:13:56
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9607 Modified Files: csubtarget.h Removed Files: CHANGELOG Log Message: Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** csubtarget.h 19 Dec 2006 21:09:04 -0000 1.52 --- csubtarget.h 21 Dec 2006 10:13:53 -0000 1.53 *************** *** 675,683 **** int s, err; int res; ! int sopt; ! #ifdef WIN32 ! int soptlen = sizeof(int); #else ! int soptlen; #endif bool done = true; --- 675,683 ---- int s, err; int res; ! int sopt; ! #if (WIN32 || __CYGWIN__ || __linux__) ! int soptlen = sizeof(int); #else ! int soptlen; #endif bool done = true; --- CHANGELOG DELETED --- |
From: Alexander B. <da...@us...> - 2006-12-19 21:09:11
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19404 Modified Files: icedbs.h TODO csubtarget.h Log Message: no message Index: icedbs.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icedbs.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** icedbs.h 18 Dec 2006 08:40:01 -0000 1.7 --- icedbs.h 19 Dec 2006 21:09:04 -0000 1.8 *************** *** 22,25 **** --- 22,27 ---- std::cout << "Warning: Can't open service names database!" << std::endl; } else { + IceRegex re1("^(#.*|\\s*)$"); + IceRegex re("^([-a-z0-9*/._]+)\\s*\\W*([0-9]+)/(tcp|udp)"); while(!in.eof()){ char tmpbuf[256]; *************** *** 27,35 **** in.getline(tmpbuf,256); - IceRegex re1("^(#.*|\\s*)$"); - if(! re1.match(tmpbuf) ){ ! IceRegex re("^([-a-z0-9*/._]+)\\s*\\W*([0-9]+)/(tcp|udp)"); ! icestring sname = "", protocol = "", sport = ""; --- 29,34 ---- in.getline(tmpbuf,256); if(! re1.match(tmpbuf) ){ ! icestring sname = "", protocol = "", sport = ""; *************** *** 83,86 **** --- 82,87 ---- std::cout << "Warning: Can't open MAC vendors database!" << std::endl; } else { + IceRegex re1("^(#.*|\\s*)$"); + IceRegex re("^([A-F0-9]+)\\s*\\W*([-a-z0-9A-Z. +]+)"); while(!in.eof()){ char tmpbuf[256]; *************** *** 88,95 **** in.getline(tmpbuf,256); - IceRegex re1("^(#.*|\\s*)$"); - if(! re1.match(tmpbuf) ){ - IceRegex re("^([A-F0-9]+)\\s*\\W*([-a-z0-9A-Z. +]+)"); icestring prefix = "", company = ""; --- 89,93 ---- Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** csubtarget.h 19 Dec 2006 18:59:16 -0000 1.51 --- csubtarget.h 19 Dec 2006 21:09:04 -0000 1.52 *************** *** 60,63 **** --- 60,66 ---- struct scan_socket* scan_sockets; + icestring source_ip; + icestring source_iface; + // *****scan parameters***** *************** *** 80,83 **** --- 83,88 ---- discovered = false; init_scan_sockets(); + + source_ip = get_source_ip(hostname, source_iface); } *************** *** 351,355 **** int len; int MAGIC_PORT = csocket::getMagicPort(SOCK_DGRAM, 100); - char local_hostname[80]; if(par->verbose > 0) --- 356,359 ---- *************** *** 365,369 **** } ! pcap_t* p = init_pcap(par->source_iface); //check for NULL if(p == NULL){ --- 369,379 ---- } ! pcap_t* p; ! ! if(par->source_iface) ! p = init_pcap(par->source_iface); ! else ! p = init_pcap(getdev_pcap(source_iface)); ! if(p == NULL){ *************** *** 374,381 **** len = make_sockname(saddress, hostname.c_str(), 0, domain); ! ! if(gethostname(local_hostname, 80)) exit(-1); ! ! icestring source(local_hostname); init_scanning_ports(hostname, par, (int) SOCK_RAW, scanning_ports); --- 384,389 ---- len = make_sockname(saddress, hostname.c_str(), 0, domain); ! ! icestring source(source_ip); init_scanning_ports(hostname, par, (int) SOCK_RAW, scanning_ports); Index: TODO =================================================================== RCS file: /cvsroot/javanetsim/IceScan/TODO,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TODO 19 Dec 2006 18:59:16 -0000 1.15 --- TODO 19 Dec 2006 21:09:04 -0000 1.16 *************** *** 15,28 **** + Mainmon scan (-SM, FIN/ACK) ! * Fix udp scan timeouts ! * Fix Raw TCP scan timeouts ! * Rewrite raw_tcp_scan to mak support ping. + IP Protocol Scan (-SI) * do setting random window/seq(ack and seg) for raw scanning ! + --ttl option and ttl random generation ! + --badchksum option + ARP Scan + Fingerprint -- Misc -- ! + automatically select right interface to scan \ No newline at end of file --- 15,30 ---- + Mainmon scan (-SM, FIN/ACK) ! * Fix udp scan timeouts. ! * Fix Raw TCP scan timeouts. ! * Rewrite raw_tcp_scan to make it support ping. + IP Protocol Scan (-SI) * do setting random window/seq(ack and seg) for raw scanning ! + --ttl option and ttl random generation. ! + --badchksum option. ! + --source-port option. ! + --source-ip option. + ARP Scan + Fingerprint -- Misc -- ! * test auto-selecting interface (to listen) and source ip to scan \ No newline at end of file |
From: Alexander B. <da...@us...> - 2006-12-19 21:09:07
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv19404/icesockets Modified Files: sock_pcap.h sock_name.h Log Message: no message Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sock_pcap.h 19 Dec 2006 18:59:16 -0000 1.7 --- sock_pcap.h 19 Dec 2006 21:09:04 -0000 1.8 *************** *** 29,32 **** --- 29,36 ---- } + int getdev_pcap(icestring &dev){ + return 0; + } + int pcap_block(pcap_t *p, bool block){ } *************** *** 113,116 **** --- 117,146 ---- } + int getdev_pcap(icestring &dev){ + pcap_if_t *alldevs; + pcap_if_t *d; + int i=1; + char errbuf[PCAP_ERRBUF_SIZE]; + + if(pcap_findalldevs(&alldevs, errbuf) == -1) + { + printf("Error in pcap_findalldevs: %s\n", errbuf); + exit(1); + } + + for(d=alldevs; d; d=d->next, i++) + { + if(!strcmp(d->name, dev.c_str())) break; + } + + if(!d) (i = 0); + + pcap_freealldevs(alldevs); + + if(i==0) + printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); + + return i; + } char* readip_pcap(pcap_t* pd, unsigned int *len, struct timeval *rcvd_time){ Index: sock_name.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_name.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** sock_name.h 17 Dec 2006 21:03:17 -0000 1.12 --- sock_name.h 19 Dec 2006 21:09:04 -0000 1.13 *************** *** 12,15 **** --- 12,16 ---- #include "sock_types.h" + #include "sock_eth.h" #include "iceregex.h" *************** *** 116,118 **** --- 117,167 ---- } + icestring get_source_ip(const icestring &destip, icestring &sourceint){ + #ifdef __CYGWIN__ + char local_hostname[80]; + if(gethostname(local_hostname, 80)) exit(-1); + + sourceint.assign("null"); //unfortunately, no pcap in cygwin + + icestring ret(local_hostname); + + return ret; + #else + #ifdef __linux__ + if(!strcmp(destip.c_str(), "127.0.0.1")){ + sourceint.assign("lo"); + return "127.0.0.1"; + } + #elif + //Need to add some code here... + #endif + + struct ip_intf *ipi; + + ip_t *ip = i_ip_open(); + + if ((ipi = i_lookup_ip_intf(ip, inet_addr(destip.c_str()))) == NULL) { + errno = EHOSTUNREACH; + DBGOUTPUT("HOST UNREACH!!!"); + return ""; + } + + + struct sockaddr sa; + + addr_ntos(&(ipi->pa), &sa); + + struct sockaddr_in *sai = (sockaddr_in *) &sa; + + sourceint.assign(ipi->name); + icestring addr(inet_ntoa(sai->sin_addr)); + + #ifdef __linux__ //add more platforms here + if(! strcmp(addr.c_str(), destip.c_str())) sourceint.assign("lo"); + #endif + + return addr; + #endif + } + #endif |
From: Alexander B. <da...@us...> - 2006-12-19 18:59:19
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31614 Modified Files: CHANGELOG TODO udpscan.h csubtarget.h Log Message: no message Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** csubtarget.h 19 Dec 2006 09:04:49 -0000 1.50 --- csubtarget.h 19 Dec 2006 18:59:16 -0000 1.51 *************** *** 55,59 **** // *****scan parameters***** - bool raw; int domain; --- 55,58 ---- *************** *** 71,94 **** csubtarget(icestring hostname, icestring reverse_hostname, iceparams *par, iceoutput *out){ ! struct scanned_port sp; ! ! subtarget_ports.push_back(sp); ! ! this->hostname.assign(hostname); ! this->reversed_hostname.assign(reverse_hostname); this->par = par; this->out = out; discovered = false; ! init_scan_sockets(); } bool discover(){ ! struct timeb tp1, tp2; ! ! ftime(&tp1); discovered = host_discover(hostname.c_str(), par, out); ! ftime(&tp2); ! ! if(par->verbose) *out << "Discovery taken " << timeb_diff(tp1, tp2) << " seconds.\n"; return discovered; --- 70,93 ---- csubtarget(icestring hostname, icestring reverse_hostname, iceparams *par, iceoutput *out){ ! struct scanned_port sp; ! ! subtarget_ports.push_back(sp); ! ! this->hostname.assign(hostname); ! this->reversed_hostname.assign(reverse_hostname); this->par = par; this->out = out; discovered = false; ! init_scan_sockets(); } bool discover(){ ! struct timeb tp1, tp2; ! ! ftime(&tp1); discovered = host_discover(hostname.c_str(), par, out); ! ftime(&tp2); ! ! if(par->verbose) *out << "Discovery taken " << timeb_diff(tp1, tp2) << " seconds.\n"; return discovered; *************** *** 129,145 **** } ! int prot_scan(){ ! ! cprotocol_scan cps(par, out); ! // cps.test(hostname.c_str()); ! return 0; } int nbt_scan(){ // NetBIOS scan, -SB ! char output_buf[255]; ! ! if(par->verbose>0){ sprintf(output_buf, "Starting NetBIOS scan against %s...", hostname.c_str()); out->line(output_buf); --- 128,143 ---- } ! int prot_scan(){ ! // cprotocol_scan cps(par, out); ! // cps.test(hostname.c_str()); ! return 0; } int nbt_scan(){ // NetBIOS scan, -SB ! char output_buf[255]; ! ! if(par->verbose>0){ sprintf(output_buf, "Starting NetBIOS scan against %s...", hostname.c_str()); out->line(output_buf); *************** *** 148,152 **** cnbtwrapper wrap(par); ! wrap.test(hostname.c_str(), 137); if(par->verbose>0){ --- 146,150 ---- cnbtwrapper wrap(par); ! wrap.test(hostname.c_str(), 137); if(par->verbose>0){ *************** *** 159,163 **** } ! int udp_scan(){ //udp scan, -SU --- 157,161 ---- } ! int udp_scan(){ //udp scan, -SU *************** *** 175,179 **** udpscan(hostname, scanning_ports, par, out, this, true); - // udpscan2(local_hn, hostname, scanning_ports,hostname.c_str(), par, out); show_ports(); --- 173,176 ---- *************** *** 192,203 **** char output_buf[255]; - raw = false; domain = (int) SOCK_STREAM; ! ! ! //DBGOUTPUT("!!!"); ! std::map <int, scanning_port> scanning_ports; ! //DBGOUTPUT("!!!"); ! init_scanning_ports(hostname, par, (int) SOCK_STREAM, scanning_ports); if(par->verbose>0){ --- 189,196 ---- char output_buf[255]; domain = (int) SOCK_STREAM; ! ! std::map <int, scanning_port> scanning_ports; ! init_scanning_ports(hostname, par, (int) SOCK_STREAM, scanning_ports); if(par->verbose>0){ *************** *** 206,214 **** } int j = initiate_connect(scanning_ports); ! //DBGOUTPUT(j); while( ! do_select_round_connect(scanning_ports, subtarget_ports) ) iceusleep(1000); - // DBGOUTPUT("end do_select_round"); - show_ports(); --- 199,205 ---- } int j = initiate_connect(scanning_ports); ! while( ! do_select_round_connect(scanning_ports, subtarget_ports) ) iceusleep(1000); show_ports(); *************** *** 359,363 **** struct sockaddr_in saddress; int len; ! int MAGIC_PORT = 54678; //ugly, need to check char local_hostname[80]; --- 350,354 ---- struct sockaddr_in saddress; int len; ! int MAGIC_PORT = csocket::getMagicPort(SOCK_DGRAM, 100); char local_hostname[80]; *************** *** 381,388 **** } - raw = true; - domain = (int) SOCK_RAW; ! len = make_sockname(saddress, hostname.c_str(), 0, domain); if(gethostname(local_hostname, 80)) exit(-1); --- 372,377 ---- } ! len = make_sockname(saddress, hostname.c_str(), 0, domain); if(gethostname(local_hostname, 80)) exit(-1); *************** *** 393,398 **** crawsocket rawsend(AF_INET, (int) SOCK_RAW, IPPROTO_RAW); ! //crawsocket rawrecv(AF_INET, (int) SOCK_RAW, IPPROTO_TCP); ! //rawrecv.nonblock(true); int one = 1; --- 382,386 ---- crawsocket rawsend(AF_INET, (int) SOCK_RAW, IPPROTO_RAW); ! int one = 1; *************** *** 417,420 **** --- 405,410 ---- pcap_filter(p, filter_exp); + pcap_block(p, false); + int maxat; *************** *** 427,431 **** std::map <int, scanning_port>::iterator i = scanning_ports.begin(); - //DBGOUTPUT(attempts); maxat = 0; --- 417,420 ---- *************** *** 460,465 **** gettimeofday(&((*i).second.tv), 0); - //DBGOUTPUT("Sending:" << (*i).second.attempt); - (*i).second.attempt++; --- 449,452 ---- Index: TODO =================================================================== RCS file: /cvsroot/javanetsim/IceScan/TODO,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** TODO 16 Dec 2006 14:42:43 -0000 1.14 --- TODO 19 Dec 2006 18:59:16 -0000 1.15 *************** *** 6,15 **** + add multiple targets handling; ! * fix reading port range for ack/udp/syn pings; ! -- Discovering -- ! + UDP Ping (-PU [portlist]) [QweR] ! + TCP SYN Ping (-PS [portlist]) [Key] + ARP/RAW Discovery --- 6,13 ---- + add multiple targets handling; ! -- Discovering -- ! + TCP SYN/FIN Ping (-PS [portlist]) + ARP/RAW Discovery *************** *** 17,30 **** + Mainmon scan (-SM, FIN/ACK) ! + UDP Scan (-SU) [QweR] ! + IP Protocol Scan (-SI) [Key] (??) * do setting random window/seq(ack and seg) for raw scanning + --ttl option and ttl random generation + --badchksum option ! + ARP Scan + Fingerprint (??) -- Misc -- ! + select right interface to scan ! ! -- Bugs -- --- 15,28 ---- + Mainmon scan (-SM, FIN/ACK) ! * Fix udp scan timeouts ! * Fix Raw TCP scan timeouts ! * Rewrite raw_tcp_scan to mak support ping. ! + IP Protocol Scan (-SI) * do setting random window/seq(ack and seg) for raw scanning + --ttl option and ttl random generation + --badchksum option ! + ARP Scan + Fingerprint -- Misc -- ! + automatically select right interface to scan \ No newline at end of file Index: udpscan.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/udpscan.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** udpscan.h 19 Dec 2006 09:04:49 -0000 1.18 --- udpscan.h 19 Dec 2006 18:59:16 -0000 1.19 *************** *** 86,92 **** } ! //int pppp = sudp.getMagicPort(SOCK_DGRAM, 100); ! int pppp = sudp.getMagicPort(); ! sudp.bind(hostname, pppp, 0); sudp.nonblock(true); pcap_t* p = init_pcap(par->source_iface); //check for NULL --- 86,91 ---- } ! int MAGIC_PORT = csocket::getMagicPort(SOCK_DGRAM, 100); ! sudp.bind(hostname, MAGIC_PORT, 0); sudp.nonblock(true); pcap_t* p = init_pcap(par->source_iface); //check for NULL *************** *** 95,98 **** --- 94,105 ---- return false; } + + pcap_block(p, false); + + char filter_exp[256]; + + sprintf(filter_exp, "host %s icmp", destname.c_str()); + + pcap_filter(p, filter_exp); for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ Index: CHANGELOG =================================================================== RCS file: /cvsroot/javanetsim/IceScan/CHANGELOG,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CHANGELOG 30 Nov 2006 06:43:50 -0000 1.3 --- CHANGELOG 19 Dec 2006 18:59:16 -0000 1.4 *************** *** 3,8 **** (+ -- new feature, * -- bugfix) ! *** IceScan v. 0.0.3, 12 Dec 2006 *** + added printing time at startup. * fixed icmp echo discovery (icmplen). --- 3,16 ---- (+ -- new feature, * -- bugfix) ! *** IceScan v. 0.0.6, 19 Dec 2006 *** ! ! * fixed blocking pcap calls. ! ! *** IceScan v. 0.0.3, 18 Dec 2006 *** + + TCP Raw scan. + + ICMP Timestamp/Netmask discovery. + + UDP Discovery/Scan. + + Windows NT/2000/XP support. + added printing time at startup. * fixed icmp echo discovery (icmplen). |
From: Alexander B. <da...@us...> - 2006-12-19 18:59:19
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31614/icesockets Modified Files: sock_pcap.h Log Message: no message Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** sock_pcap.h 17 Dec 2006 21:22:36 -0000 1.6 --- sock_pcap.h 19 Dec 2006 18:59:16 -0000 1.7 *************** *** 9,12 **** --- 9,14 ---- #define _sock_pcap_H + #include "sock_types.h" + #ifdef __CYGWIN__ //There's no pcap in Cygwin :( typedef int pcap_t; *************** *** 22,35 **** return NULL; } bool pcap_filter(pcap_t *p, char *filter_exp){ return true; } void close_pcap(pcap_t *p){ } #else /* __CYGWIN__ */ - #include "sock_types.h" - pcap_t* init_pcap(int index = 0){ char *dev; --- 24,39 ---- return NULL; } + bool pcap_filter(pcap_t *p, char *filter_exp){ return true; } + int pcap_block(pcap_t *p, bool block){ + } + void close_pcap(pcap_t *p){ } #else /* __CYGWIN__ */ pcap_t* init_pcap(int index = 0){ char *dev; *************** *** 220,227 **** } void close_pcap(pcap_t *p){ pcap_close(p); } ! #endif /* __CYGWIN__ */ #endif /* _sock_pcap_H */ --- 224,235 ---- } + int pcap_block(pcap_t *p, bool block){ + return pcap_setnonblock(p, (int)(!block), NULL); + } + void close_pcap(pcap_t *p){ pcap_close(p); } ! #endif #endif /* _sock_pcap_H */ |
From: Alexander B. <da...@us...> - 2006-12-19 09:04:54
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16702 Modified Files: udpscan.h csubtarget.h Log Message: no message Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** csubtarget.h 19 Dec 2006 00:01:26 -0000 1.49 --- csubtarget.h 19 Dec 2006 09:04:49 -0000 1.50 *************** *** 514,519 **** response = readip_pcap(p, &len, NULL); port = 0; ! if(response){ ip = (struct iphdr *) response; if(ip->saddr == saddress.sin_addr.s_addr && ip->protocol == IPPROTO_TCP){ --- 514,520 ---- response = readip_pcap(p, &len, NULL); port = 0; ! //DBGOUTPUT("while"); if(response){ + //DBGOUTPUT("response"); ip = (struct iphdr *) response; if(ip->saddr == saddress.sin_addr.s_addr && ip->protocol == IPPROTO_TCP){ Index: udpscan.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/udpscan.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** udpscan.h 19 Dec 2006 00:01:26 -0000 1.17 --- udpscan.h 19 Dec 2006 09:04:49 -0000 1.18 *************** *** 72,79 **** int recvbytes; unsigned int len; int port; char* response; char hostname[80]; - bool next = true; int recvsize = UDP_SCAN_RECVSIZE; struct timeval tv1,tv2; --- 72,79 ---- int recvbytes; unsigned int len; + bool next = true; int port; char* response; char hostname[80]; int recvsize = UDP_SCAN_RECVSIZE; struct timeval tv1,tv2; *************** *** 91,115 **** sudp.nonblock(true); pcap_t* p = init_pcap(par->source_iface); //check for NULL ! if(p == NULL){ out->line("Can't open pcap: no raw tcp scan. Exitting."); return false; ! } ! char filter_exp[256]; ! sprintf(filter_exp, "icmp", destname.c_str()); ! pcap_filter(p, filter_exp); ! //sicmp.nonblock(true); ! ! int size = 60 * 1024; ! //sicmp.setsockopt(SOL_SOCKET, SO_RCVBUF, (sockbuf_type *) &size, sizeof(size)); ! for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ ! for(std::map <int, scanning_port>::iterator i = scanning_ports.begin(); i!= scanning_ports.end() && next; ++i){ if(! (*i).second.done ){ sudp.sendto(destname.c_str(), (*i).first, zmsg, UDP_SCAN_ZSIZE, 0); ! iceusleep(50000*repeats); } ! ! do{ ! recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); if(recvbytes > 0){ struct udphdr* udp = (struct udphdr*) recvmsg; --- 91,109 ---- sudp.nonblock(true); pcap_t* p = init_pcap(par->source_iface); //check for NULL ! if(p == NULL){ out->line("Can't open pcap: no raw tcp scan. Exitting."); return false; ! } ! for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ ! for(std::map <int, scanning_port>::iterator i = scanning_ports.begin(); i!= scanning_ports.end() && next; ++i){ if(! (*i).second.done ){ sudp.sendto(destname.c_str(), (*i).first, zmsg, UDP_SCAN_ZSIZE, 0); ! iceusleep(100000*repeats); } ! ! gettimeofday(&tv1, 0); ! do{ ! recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); if(recvbytes > 0){ struct udphdr* udp = (struct udphdr*) recvmsg; *************** *** 122,154 **** else{ result = true; ! next = false; ! } } } else{ ! gettimeofday(&tv1, 0); ! do{ ! response = readip_pcap(p, &len, NULL); ! if(response){ ! recvbytes = len; ! port = parse_icmp_udp_packet(response, len, saddress, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; ! } ! } ! } ! iceusleep(1); ! gettimeofday(&tv2, 0); ! }while(SUB_TIMEVALS(tv2,tv1) < 50000*repeats); } ! iceusleep(50000*repeats); ! }while(recvbytes > 0 && next); ! } } if(isscan){ --- 116,147 ---- else{ result = true; ! next = false; ! } } } else{ ! ! response = readip_pcap(p, &len, NULL); ! if(response){ ! recvbytes = len; ! port = parse_icmp_udp_packet(response, len, saddress, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; ! } ! } ! } ! iceusleep(1); ! } ! gettimeofday(&tv2, 0); ! }while(SUB_TIMEVALS(tv2,tv1) < 50000*repeats); ! ! } } if(isscan){ |
From: Alexander B. <da...@us...> - 2006-12-19 09:04:53
|
Update of /cvsroot/javanetsim/IceScan/nbproject In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16702/nbproject Modified Files: configurations.xml Log Message: no message Index: configurations.xml =================================================================== RCS file: /cvsroot/javanetsim/IceScan/nbproject/configurations.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** configurations.xml 17 Dec 2006 21:03:17 -0000 1.19 --- configurations.xml 19 Dec 2006 09:04:49 -0000 1.20 *************** *** 115,121 **** <itemTool>3</itemTool> </item> - <item path="udpscan.h"> - <itemTool>3</itemTool> - </item> <item path="portdef.h"> <itemTool>3</itemTool> --- 115,118 ---- *************** *** 127,131 **** <itemTool>3</itemTool> </item> ! <item path="csubtarget.h"> <itemTool>3</itemTool> </item> --- 124,131 ---- <itemTool>3</itemTool> </item> ! <item path="icesockets/csocket.h"> ! <itemTool>3</itemTool> ! </item> ! <item path="icesockets/sock_eth.h"> <itemTool>3</itemTool> </item> *************** *** 133,140 **** <itemTool>3</itemTool> </item> ! <item path="icesockets/csocket.h"> <itemTool>3</itemTool> </item> ! <item path="icesockets/sock_eth.h"> <itemTool>3</itemTool> </item> --- 133,140 ---- <itemTool>3</itemTool> </item> ! <item path="udpscan.h"> <itemTool>3</itemTool> </item> ! <item path="csubtarget.h"> <itemTool>3</itemTool> </item> |
From: QweR <qw...@us...> - 2006-12-19 00:01:30
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32201 Modified Files: csubtarget.h udpscan.h Log Message: Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** csubtarget.h 18 Dec 2006 08:40:01 -0000 1.48 --- csubtarget.h 19 Dec 2006 00:01:26 -0000 1.49 *************** *** 517,521 **** if(response){ ip = (struct iphdr *) response; ! if(ip->saddr = saddress.sin_addr.s_addr && ip->protocol == IPPROTO_TCP){ tcp = (struct tcphdr *) (response + 4 * ip->ihl); --- 517,521 ---- if(response){ ip = (struct iphdr *) response; ! if(ip->saddr == saddress.sin_addr.s_addr && ip->protocol == IPPROTO_TCP){ tcp = (struct tcphdr *) (response + 4 * ip->ihl); Index: udpscan.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/udpscan.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** udpscan.h 18 Dec 2006 08:40:01 -0000 1.16 --- udpscan.h 19 Dec 2006 00:01:26 -0000 1.17 *************** *** 16,20 **** ! int parse_icmp_udp_packet(char* recvmsg, int recvbytes, iceparams *par, iceoutput *out){ int port = 0; --- 16,20 ---- ! int parse_icmp_udp_packet(char* recvmsg, int recvbytes, struct sockaddr_in &saddress, iceparams *par, iceoutput *out){ int port = 0; *************** *** 24,43 **** int icmplen = recvbytes - hdrlen; ! if(icmppacket->icmp_type == ICMP_UNREACH && icmppacket->icmp_code == ICMP_UNREACH_PORT){ ! ! ip = (struct iphdr*) (&icmppacket->icmp_ip); ! hdrlen = ip->ihl << 2; ! if(ip->protocol == SOL_UDP && ((char*)ip+hdrlen+sizeof(udphdr))-recvmsg<=recvbytes){ ! struct udphdr* udp = (struct udphdr *) ((char*)ip + hdrlen); ! port = ntohs(udp->dest); ! if(par->verbose>2) *out << "Recieved icmp port " << port << " unreachable." << iceoutput::endl; ! return port; ! } ! else{ ! //DBGOUTPUT("incorrect length of packet"); } - } return 0; } --- 24,44 ---- int icmplen = recvbytes - hdrlen; ! if(ip->saddr == saddress.sin_addr.s_addr){ ! if(icmppacket->icmp_type == ICMP_UNREACH && icmppacket->icmp_code == ICMP_UNREACH_PORT){ ! ip = (struct iphdr*) (&icmppacket->icmp_ip); ! hdrlen = ip->ihl << 2; ! if(ip->protocol == SOL_UDP && ((char*)ip+hdrlen+sizeof(udphdr))-recvmsg<=recvbytes){ ! struct udphdr* udp = (struct udphdr *) ((char*)ip + hdrlen); ! port = ntohs(udp->dest); ! if(par->verbose>2) *out << "Recieved icmp port " << port << " unreachable." << iceoutput::endl; ! return port; ! } ! else{ ! //DBGOUTPUT("incorrect length of packet"); ! } ! } } return 0; } *************** *** 75,82 **** char hostname[80]; bool next = true; - int recvsize = UDP_SCAN_RECVSIZE; if(gethostname(hostname,79)) exit(-1); //int pppp = sudp.getMagicPort(SOCK_DGRAM, 100); --- 76,88 ---- char hostname[80]; bool next = true; int recvsize = UDP_SCAN_RECVSIZE; + struct timeval tv1,tv2; + struct sockaddr_in saddress; if(gethostname(hostname,79)) exit(-1); + if(make_sockname(saddress, destname.c_str(), 0, PF_INET)!=sizeof(saddress)){ + DBGOUTPUT("make_sockname!=sizeof"); + return false; + } //int pppp = sudp.getMagicPort(SOCK_DGRAM, 100); *************** *** 90,94 **** } char filter_exp[256]; ! sprintf(filter_exp, "host %s icmp", destname.c_str()); pcap_filter(p, filter_exp); //sicmp.nonblock(true); --- 96,100 ---- } char filter_exp[256]; ! sprintf(filter_exp, "icmp", destname.c_str()); pcap_filter(p, filter_exp); //sicmp.nonblock(true); *************** *** 99,145 **** for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ for(std::map <int, scanning_port>::iterator i = scanning_ports.begin(); i!= scanning_ports.end() && next; ++i){ ! if(! (*i).second.done ){ ! sudp.sendto(destname.c_str(), (*i).first, zmsg, UDP_SCAN_ZSIZE, 0); ! iceusleep(50000*repeats); ! } ! do{ ! recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); ! if(recvbytes > 0){ ! struct udphdr* udp = (struct udphdr*) recvmsg; ! port = ntohs(udp->source); ! if(port!=0 && !scanning_ports[port].done && scanning_ports.find(port) != scanning_ports.end()){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_OPEN, "udp"); ! } ! else{ ! result = true; ! next = false; } } ! } ! else{ ! for(int k=0; k<5; k++){ ! response = readip_pcap(p, &len, NULL); ! if(response){ ! recvbytes = len; ! port = parse_icmp_udp_packet(response, len, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; } } ! } ! iceusleep(10000*repeats); } ! } ! iceusleep(50000*repeats); ! }while(recvbytes > 0 && next); } } --- 105,153 ---- for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ for(std::map <int, scanning_port>::iterator i = scanning_ports.begin(); i!= scanning_ports.end() && next; ++i){ ! if(! (*i).second.done ){ ! sudp.sendto(destname.c_str(), (*i).first, zmsg, UDP_SCAN_ZSIZE, 0); ! iceusleep(50000*repeats); ! } ! do{ ! recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); ! if(recvbytes > 0){ ! struct udphdr* udp = (struct udphdr*) recvmsg; ! port = ntohs(udp->source); ! if(port!=0 && !scanning_ports[port].done && scanning_ports.find(port) != scanning_ports.end()){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_OPEN, "udp"); ! } ! else{ ! result = true; ! next = false; ! } } } ! else{ ! gettimeofday(&tv1, 0); ! do{ ! response = readip_pcap(p, &len, NULL); ! if(response){ ! recvbytes = len; ! port = parse_icmp_udp_packet(response, len, saddress, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; ! } } } ! iceusleep(1); ! gettimeofday(&tv2, 0); ! }while(SUB_TIMEVALS(tv2,tv1) < 50000*repeats); } ! iceusleep(50000*repeats); ! }while(recvbytes > 0 && next); } } |
From: Alexander B. <da...@us...> - 2006-12-18 08:57:08
|
Update of /cvsroot/javanetsim/IceScan/vccproject In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27208/vccproject Modified Files: IceScan.suo Log Message: Index: IceScan.suo =================================================================== RCS file: /cvsroot/javanetsim/IceScan/vccproject/IceScan.suo,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 Binary files /tmp/cvs57gurW and /tmp/cvsC4a9X3 differ |
From: Alexander B. <da...@us...> - 2006-12-18 08:57:05
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv27208 Modified Files: icediscover.h iceparams.h Log Message: Index: iceparams.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/iceparams.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** iceparams.h 18 Dec 2006 08:40:01 -0000 1.18 --- iceparams.h 18 Dec 2006 08:57:02 -0000 1.19 *************** *** 86,90 **** --- 86,97 ---- reverse_dns = true; + + #ifndef WIN32 ethernet = false; + #else + ethernet = true; + #endif + + ethernet = false; source_iface = 0; *************** *** 93,109 **** ack_ping_discovery = false; syn_ping_discovery = false; ! icmp_echo_ping_discovery = false; icmp_mask_ping_discovery = false; icmp_timestamp_ping_discovery = false; udp_ping_discovery = false; ! arp_discovery = false; scan_type = TCP_CONNECT_SCAN; sim_connects = 25; ! netbios_port = NBT_PORT + 10000; ! ! tcpflags = 0; ! forceuid = false; } --- 100,116 ---- ack_ping_discovery = false; syn_ping_discovery = false; ! icmp_echo_ping_discovery = false; icmp_mask_ping_discovery = false; icmp_timestamp_ping_discovery = false; udp_ping_discovery = false; ! arp_discovery = false; scan_type = TCP_CONNECT_SCAN; sim_connects = 25; ! netbios_port = NBT_PORT + 10000; ! ! tcpflags = 0; ! forceuid = false; } Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** icediscover.h 18 Dec 2006 07:51:56 -0000 1.31 --- icediscover.h 18 Dec 2006 08:57:02 -0000 1.32 *************** *** 39,44 **** rc = 0; rc = s.connect(hostname, j, 4); ! DBGOUTPUT(j); ! s.shutdown(); --- 39,43 ---- rc = 0; rc = s.connect(hostname, j, 4); ! s.shutdown(); |
From: QweR <qw...@us...> - 2006-12-18 08:40:08
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20286 Modified Files: csubtarget.h icedbs.h iceparams.h udpscan.h Log Message: Index: icedbs.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icedbs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** icedbs.h 17 Dec 2006 21:03:17 -0000 1.6 --- icedbs.h 18 Dec 2006 08:40:01 -0000 1.7 *************** *** 41,45 **** if(v.size()<4){ ! DBGOUTPUT(tmpbuf); continue; } --- 41,45 ---- if(v.size()<4){ ! //DBGOUTPUT(tmpbuf); continue; } Index: iceparams.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/iceparams.h,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** iceparams.h 17 Dec 2006 18:49:55 -0000 1.17 --- iceparams.h 18 Dec 2006 08:40:01 -0000 1.18 *************** *** 86,90 **** reverse_dns = true; ! ethernet = false; no_host_discovery = false; --- 86,91 ---- reverse_dns = true; ! ethernet = false; ! source_iface = 0; no_host_discovery = false; Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** csubtarget.h 17 Dec 2006 21:03:17 -0000 1.47 --- csubtarget.h 18 Dec 2006 08:40:01 -0000 1.48 *************** *** 830,835 **** out->line("PORT STATE SERVICE"); ! std::sort(subtarget_ports.begin(), subtarget_ports.end(), sort_sp); int j = 0; --- 830,836 ---- out->line("PORT STATE SERVICE"); ! #ifndef __CYGWIN__ std::sort(subtarget_ports.begin(), subtarget_ports.end(), sort_sp); + #endif int j = 0; Index: udpscan.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/udpscan.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** udpscan.h 17 Dec 2006 21:03:17 -0000 1.15 --- udpscan.h 18 Dec 2006 08:40:01 -0000 1.16 *************** *** 19,24 **** int port = 0; ! /*struct ip* ip = (struct ip*) recvmsg; ! int hdrlen = ip->ip_hl << 2; struct icmp* icmppacket = (struct icmp *) (recvmsg + hdrlen); int icmplen = recvbytes - hdrlen; --- 19,24 ---- int port = 0; ! struct iphdr* ip = (struct iphdr*) recvmsg; ! int hdrlen = ip->ihl << 2; struct icmp* icmppacket = (struct icmp *) (recvmsg + hdrlen); int icmplen = recvbytes - hdrlen; *************** *** 26,43 **** if(icmppacket->icmp_type == ICMP_UNREACH && icmppacket->icmp_code == ICMP_UNREACH_PORT){ ! ip = (struct ip*) (&icmppacket->icmp_ip); ! hdrlen = ip->ip_hl << 2; ! if(ip->ip_p == SOL_UDP && ((char*)ip+hdrlen+sizeof(udphdr))-recvmsg<=recvbytes){ struct udphdr* udp = (struct udphdr *) ((char*)ip + hdrlen); port = ntohs(udp->dest); ! if(par->verbose>2) *out << "Recieved icmp port " << port << "unreachable."; return port; } else{ ! DBGOUTPUT("incorrect length of packet"); } ! }*/ return 0; } --- 26,43 ---- if(icmppacket->icmp_type == ICMP_UNREACH && icmppacket->icmp_code == ICMP_UNREACH_PORT){ ! ip = (struct iphdr*) (&icmppacket->icmp_ip); ! hdrlen = ip->ihl << 2; ! if(ip->protocol == SOL_UDP && ((char*)ip+hdrlen+sizeof(udphdr))-recvmsg<=recvbytes){ struct udphdr* udp = (struct udphdr *) ((char*)ip + hdrlen); port = ntohs(udp->dest); ! if(par->verbose>2) *out << "Recieved icmp port " << port << " unreachable." << iceoutput::endl; return port; } else{ ! //DBGOUTPUT("incorrect length of packet"); } ! } return 0; } *************** *** 65,78 **** int repeats; csocket sudp(PF_INET, SOCK_DGRAM); ! crawsocket sicmp(AF_INET, SOCK_RAW, IPPROTO_ICMP); ! #ifdef WIN32 ! char *zmsg; ! #else ! char zmsg[UDP_SCAN_ZSIZE]; ! #endif char recvmsg[UDP_SCAN_RECVSIZE]; memset(zmsg, 0, UDP_SCAN_ZSIZE); int recvbytes; int port; char hostname[80]; bool next = true; --- 65,76 ---- int repeats; csocket sudp(PF_INET, SOCK_DGRAM); ! //crawsocket sicmp(AF_INET, SOCK_RAW, IPPROTO_ICMP); ! char *zmsg = new char[UDP_SCAN_ZSIZE+4]; char recvmsg[UDP_SCAN_RECVSIZE]; memset(zmsg, 0, UDP_SCAN_ZSIZE); int recvbytes; + unsigned int len; int port; + char* response; char hostname[80]; bool next = true; *************** *** 86,93 **** sudp.bind(hostname, pppp, 0); sudp.nonblock(true); ! sicmp.nonblock(true); int size = 60 * 1024; ! sicmp.setsockopt(SOL_SOCKET, SO_RCVBUF, (sockbuf_type *) &size, sizeof(size)); for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ --- 84,99 ---- sudp.bind(hostname, pppp, 0); sudp.nonblock(true); ! pcap_t* p = init_pcap(par->source_iface); //check for NULL ! if(p == NULL){ ! out->line("Can't open pcap: no raw tcp scan. Exitting."); ! return false; ! } ! char filter_exp[256]; ! sprintf(filter_exp, "host %s icmp", destname.c_str()); ! pcap_filter(p, filter_exp); ! //sicmp.nonblock(true); int size = 60 * 1024; ! //sicmp.setsockopt(SOL_SOCKET, SO_RCVBUF, (sockbuf_type *) &size, sizeof(size)); for(repeats = 1; repeats <= UDP_SCAN_REPEATS && next; repeats++){ *************** *** 101,137 **** recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); if(recvbytes > 0){ ! struct udphdr* udp = (struct udphdr*) recvmsg; ! port = ntohs(udp->source); ! if(port!=0 && !scanning_ports[port].done && scanning_ports.find(port) != scanning_ports.end()){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_OPEN, "udp"); ! } ! else{ ! result = true; ! next = false; ! } ! } } else{ ! // int att = 0; ! // while(att++ < 5 && recvbytes <= 0){ ! // recvbytes = sicmp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL); ! // iceusleep(100000); ! // } ! recvbytes = sicmp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL); ! if(recvbytes > 0){ ! port = parse_icmp_udp_packet(recvmsg, recvbytes, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; } - } - } } iceusleep(50000*repeats); --- 107,142 ---- recvbytes = sudp.recvfrom(recvmsg, UDP_SCAN_RECVSIZE, 0, NULL, NULL); if(recvbytes > 0){ ! struct udphdr* udp = (struct udphdr*) recvmsg; ! port = ntohs(udp->source); ! if(port!=0 && !scanning_ports[port].done && scanning_ports.find(port) != scanning_ports.end()){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_OPEN, "udp"); ! } ! else{ ! result = true; ! next = false; ! } ! } } else{ ! for(int k=0; k<5; k++){ ! response = readip_pcap(p, &len, NULL); ! if(response){ ! recvbytes = len; ! port = parse_icmp_udp_packet(response, len, par, out); ! if(port!=0 && !scanning_ports[port].done && !(scanning_ports.find(port) == scanning_ports.end())){ ! if(isscan){ ! scanning_ports[port].done = true; ! subtarget->set_port_status(port, PORT_CLOSED, "udp"); ! } ! else{ ! result = true; ! next = false; ! } ! } ! } ! iceusleep(10000*repeats); } } iceusleep(50000*repeats); *************** *** 149,155 **** } sudp.shutdown(); - sicmp.shutdown(); sudp.close(); ! sicmp.close(); } else{ --- 154,162 ---- } sudp.shutdown(); sudp.close(); ! //sicmp.shutdown(); ! //sicmp.close(); ! close_pcap(p); ! delete[] zmsg; } else{ |
From: QweR <qw...@us...> - 2006-12-18 08:40:07
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20286/icesockets Modified Files: sock_types.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** sock_types.h 17 Dec 2006 19:52:23 -0000 1.23 --- sock_types.h 18 Dec 2006 08:40:01 -0000 1.24 *************** *** 191,198 **** struct tcphdr { ! u_short th_sport; /* source port */ ! u_short th_dport; /* destination port */ ! tcp_seq th_seq; /* sequence number */ ! tcp_seq th_ack; /* acknowledgement number */ #if BYTE_ORDER == LITTLE_ENDIAN u_char th_x2:4, /* (unused) */ --- 191,198 ---- struct tcphdr { ! u_int16_t th_sport; /* source port */ ! u_int16_t th_dport; /* destination port */ ! u_int32_t th_seq; /* sequence number */ ! u_int32_t th_ack; /* acknowledgement number */ #if BYTE_ORDER == LITTLE_ENDIAN u_char th_x2:4, /* (unused) */ |
From: Alexander B. <da...@us...> - 2006-12-18 07:52:01
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1716 Modified Files: icescan.cc icediscover.h Log Message: no message Index: icescan.cc =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icescan.cc,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** icescan.cc 17 Dec 2006 21:03:17 -0000 1.36 --- icescan.cc 18 Dec 2006 07:51:56 -0000 1.37 *************** *** 9,27 **** void print_help(char *name){ ! printf("\nUSAGE: %s [options] [scan type] target\n" ! "\t target can be hostname or IP address.\n" ! "WHOLE PROGRAM:\n" ! "\t-v[v[v[v]]]]: verbose levels\n" ! "HOST DISCOVERY:\n" "\t default is PA and PE.\n" ! "\t-P0: skip host discovery\n" ! "\t-PA: ACK Ping host discovery\n" "\t-PR: ARP host discovery\n" ! "\t-PE/PT/PM: ICMP Echo/Timestamp/Mask host discovery\n" ! "\t-PU: UDP Ping discovery\n" ! "\t-r: no reverse-dns lookups\n" ! "SCAN TYPES:\n" "\t default id tcp connect()\n" ! "\t-ST/SA/SS/SW: tcp connect()/ACK/SYN/Window scan\n" "\t-SB: udp NetBIOS scan\n" "\t-SI: IP Protocol scan\n" --- 9,27 ---- void print_help(char *name){ ! printf("\nUSAGE: %s [options] [scan type] target\n" ! "\t target can be hostname or IP address.\n" ! "WHOLE PROGRAM:\n" ! "\t-v[v[v[v]]]]: verbose levels\n" ! "HOST DISCOVERY:\n" "\t default is PA and PE.\n" ! "\t-P0: skip host discovery\n" ! "\t-PA: ACK Ping host discovery\n" "\t-PR: ARP host discovery\n" ! "\t-PE/PT/PM: ICMP Echo/Timestamp/Mask host discovery\n" ! "\t-PU: UDP Ping discovery\n" ! "\t-n: disable reverse-dns lookups\n" ! "SCAN TYPES:\n" "\t default id tcp connect()\n" ! "\t-ST/SA/SS/SW: tcp connect()/ACK/SYN/Window scan\n" "\t-SB: udp NetBIOS scan\n" "\t-SI: IP Protocol scan\n" *************** *** 31,45 **** "\t--scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans)\n" "PORTS SPECIFICATION:\n" ! "\t-p <port range>: specify port range to scan (default 1-1024).\n" ! "\t You can use: 1-10; 1; 1-10,12-14; etc.\n" ! "INTERFACES AND SPOOFING:\n" ! "\t--list-interfaces: list all interfaces\n" ! "\t-i <iface-number>: use interface <iface-number> for pcap/source interface.\n" ! "\t--send-eth: use channel(2) level to send raw packets.\n" ! "\t--send-ip: use network(3) level to send raw packets.\n" ! "MISC:\n" ! "\t--uid0: assume that the current user is fully privileged.\n" ! "\t-V: print version and exit\n" ! "\t-?: this message\n\n", name); } --- 31,45 ---- "\t--scanflags <flags>: Customize TCP scan flags (SF/SX/SN scans)\n" "PORTS SPECIFICATION:\n" ! "\t-p <port range>: specify port range to scan (default 1-1024)\n" ! "\t You can use: 1-10; 1; 1-10,12-14; etc.\n" ! "INTERFACES AND SPOOFING:\n" ! "\t--list-interfaces: list all interfaces\n" ! "\t-i <iface-number>: use interface <iface-number> for pcap/source interface\n" ! "\t--send-eth: use channel(2) level to send raw packets\n" ! "\t--send-ip: use network(3) level to send raw packets\n" ! "MISC:\n" ! "\t--uid0: assume that the current user is fully privileged\n" ! "\t-V: print version and exit\n" ! "\t-?: this message\n\n", name); } *************** *** 165,169 **** break; ! case 'r': par->reverse_dns = false; break; --- 165,169 ---- break; ! case 'n': par->reverse_dns = false; break; *************** *** 174,183 **** break; ! case 'i': ! if(i+1 < argc){ //UGLY, need more check!!! ! par->source_iface = atoi(argv[i+1]); ! } ! i++; ! break; case 'S': --- 174,183 ---- break; ! case 'i': ! if(i+1 < argc){ //UGLY, need more check!!! ! par->source_iface = atoi(argv[i+1]); ! } ! i++; ! break; case 'S': Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** icediscover.h 17 Dec 2006 19:52:23 -0000 1.30 --- icediscover.h 18 Dec 2006 07:51:56 -0000 1.31 *************** *** 23,42 **** csocket s(AF_INET, (int) SOCK_STREAM); if(par->verbose>0) *out << "Starting ack host discovery (aka ACK ping)..." << iceoutput::endl; ! int rc = s.connect(hostname, ACK_PING_STANDART_PORT, 4); ! s.shutdown(); ! #ifdef WIN32 ! if(rc != SOCKET_ERROR && rc != ICESOCK_TIMEOUT){ ! #else ! if(!rc){ ! #endif ! if(par->verbose>0) *out << "Ack host discovery successfull!" << iceoutput::endl; ! return true; ! } return false; --- 23,56 ---- csocket s(AF_INET, (int) SOCK_STREAM); + int rc = 0; if(par->verbose>0) *out << "Starting ack host discovery (aka ACK ping)..." << iceoutput::endl; ! if(!par->pa_ports.size()){ ! struct port_range pr; ! pr.lower_port = ACK_PING_STANDART_PORT; ! pr.upper_port = pr.lower_port; ! par->pa_ports.push_back(pr); ! } ! ! for(int i = 0; i < par->pa_ports.size(); i++){ ! for(int j = par->pa_ports[i].lower_port; j<=par->pa_ports[i].upper_port; j++){ ! rc = 0; ! rc = s.connect(hostname, j, 4); ! DBGOUTPUT(j); ! s.shutdown(); ! #ifdef WIN32 ! if(rc != SOCKET_ERROR && rc != ICESOCK_TIMEOUT){ ! #else ! if(!rc){ ! #endif ! if(par->verbose>0) *out << "Ack host discovery successfull!" << iceoutput::endl; ! return true; ! } ! } ! } return false; *************** *** 180,184 **** std::map <int, scanning_port> scanning_ports; ! //add priv checking! if(par->pu_ports.size() > 0){ --- 194,198 ---- std::map <int, scanning_port> scanning_ports; ! //add privileges checking!!! if(par->pu_ports.size() > 0){ *************** *** 225,228 **** --- 239,243 ---- if(par->arp_discovery) if( arp_discovery(hostname, par, out) ) return true; + if(par->udp_ping_discovery) if( udp_discovery(hostname, par, out) ) return true; |
From: Alexander B. <da...@us...> - 2006-12-17 21:22:40
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv20146 Modified Files: sock_pcap.h Log Message: no message Index: sock_pcap.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_pcap.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** sock_pcap.h 17 Dec 2006 09:59:40 -0000 1.5 --- sock_pcap.h 17 Dec 2006 21:22:36 -0000 1.6 *************** *** 33,45 **** pcap_t* init_pcap(int index = 0){ - int i; char *dev; char errbuf[PCAP_ERRBUF_SIZE]; pcap_t* descr; ! if(index){ ! pcap_if_t *alldevs; ! pcap_if_t *d; ! int i=0; if(pcap_findalldevs(&alldevs, errbuf) == -1) --- 33,44 ---- pcap_t* init_pcap(int index = 0){ char *dev; char errbuf[PCAP_ERRBUF_SIZE]; pcap_t* descr; + pcap_if_t *alldevs; + pcap_if_t *d; + int i=0; ! if(index){ if(pcap_findalldevs(&alldevs, errbuf) == -1) *************** *** 54,58 **** if(i==0) { ! printf("\nNo interfaces found! Make sure WinPcap is installed.\n"); return NULL; } --- 53,58 ---- if(i==0) { ! printf("\nNo interfaces found! Make sure WinPcap/LibPcap is installed.\n"); ! pcap_freealldevs(alldevs); return NULL; } |
From: Alexander B. <da...@us...> - 2006-12-17 21:03:21
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12476 Modified Files: services icedbs.h portdef.h icescan.cc udpscan.h csubtarget.h Log Message: no message Index: icescan.cc =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icescan.cc,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** icescan.cc 17 Dec 2006 15:06:36 -0000 1.35 --- icescan.cc 17 Dec 2006 21:03:17 -0000 1.36 *************** *** 37,40 **** --- 37,41 ---- "\t-i <iface-number>: use interface <iface-number> for pcap/source interface.\n" "\t--send-eth: use channel(2) level to send raw packets.\n" + "\t--send-ip: use network(3) level to send raw packets.\n" "MISC:\n" "\t--uid0: assume that the current user is fully privileged.\n" *************** *** 137,140 **** --- 138,143 ---- }else if(!strcmp(argv[i], "--send-eth")){ par->ethernet = true; + }else if(!strcmp(argv[i], "--send-ip")){ + par->ethernet = false; }else{ std::cout << "Invalid option: -" << argv[i][1] << std::endl; Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** csubtarget.h 17 Dec 2006 19:52:23 -0000 1.46 --- csubtarget.h 17 Dec 2006 21:03:17 -0000 1.47 *************** *** 98,109 **** if(par->scan_type == TCP_CONNECT_SCAN) connect_scan(); if(par->scan_type == NBT_SCAN) nbt_scan(); ! if(par->scan_type == PROT_SCAN) prot_scan(); ! if(par->scan_type == FIN_SCAN) raw_tcp_scan("FIN"); ! if(par->scan_type == NULL_SCAN) raw_tcp_scan("NULL"); ! if(par->scan_type == XMAS_SCAN) raw_tcp_scan("XMAS"); ! if(par->scan_type == WINDOW_SCAN) raw_tcp_scan("window"); ! if(par->scan_type == ACK_SCAN) raw_tcp_scan("ACK"); ! if(par->scan_type == SYN_SCAN) raw_tcp_scan("SYN"); ! if(par->scan_type == UDP_SCAN) udp_scan(); } --- 98,109 ---- if(par->scan_type == TCP_CONNECT_SCAN) connect_scan(); if(par->scan_type == NBT_SCAN) nbt_scan(); ! if(par->scan_type == PROT_SCAN) prot_scan(); ! if(par->scan_type == FIN_SCAN) raw_tcp_scan("FIN"); ! if(par->scan_type == NULL_SCAN) raw_tcp_scan("NULL"); ! if(par->scan_type == XMAS_SCAN) raw_tcp_scan("XMAS"); ! if(par->scan_type == WINDOW_SCAN) raw_tcp_scan("window"); ! if(par->scan_type == ACK_SCAN) raw_tcp_scan("ACK"); ! if(par->scan_type == SYN_SCAN) raw_tcp_scan("SYN"); ! if(par->scan_type == UDP_SCAN) udp_scan(); } *************** *** 833,837 **** std::sort(subtarget_ports.begin(), subtarget_ports.end(), sort_sp); ! for(int j = 0; j < subtarget_ports.size(); j++){ Bzero(output_buf, 255); if(subtarget_ports[j].status == PORT_OPEN){ --- 833,839 ---- std::sort(subtarget_ports.begin(), subtarget_ports.end(), sort_sp); ! int j = 0; ! ! for(j = 0; j < subtarget_ports.size(); j++){ Bzero(output_buf, 255); if(subtarget_ports[j].status == PORT_OPEN){ Index: icedbs.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icedbs.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** icedbs.h 17 Dec 2006 09:59:39 -0000 1.5 --- icedbs.h 17 Dec 2006 21:03:17 -0000 1.6 *************** *** 30,34 **** if(! re1.match(tmpbuf) ){ ! IceRegex re("^([-a-z1-9]+)\\s*\\W*([0-9]+)/(tcp|udp)"); icestring sname = "", protocol = "", sport = ""; --- 30,34 ---- if(! re1.match(tmpbuf) ){ ! IceRegex re("^([-a-z0-9*/._]+)\\s*\\W*([0-9]+)/(tcp|udp)"); icestring sname = "", protocol = "", sport = ""; *************** *** 40,44 **** re.match(tmpbuf, v); ! if(v.size()<4) continue; sname = v[1]; protocol = v[3]; sport = v[2]; --- 40,47 ---- re.match(tmpbuf, v); ! if(v.size()<4){ ! DBGOUTPUT(tmpbuf); ! continue; ! } sname = v[1]; protocol = v[3]; sport = v[2]; *************** *** 48,52 **** if(protocol == "tcp") tcp_services[port] = sname; ! else udp_services[port] = sname; } --- 51,55 ---- if(protocol == "tcp") tcp_services[port] = sname; ! else if(protocol == "udp") udp_services[port] = sname; } Index: udpscan.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/udpscan.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** udpscan.h 17 Dec 2006 11:14:00 -0000 1.14 --- udpscan.h 17 Dec 2006 21:03:17 -0000 1.15 *************** *** 19,23 **** int port = 0; ! struct ip* ip = (struct ip*) recvmsg; int hdrlen = ip->ip_hl << 2; struct icmp* icmppacket = (struct icmp *) (recvmsg + hdrlen); --- 19,23 ---- int port = 0; ! /*struct ip* ip = (struct ip*) recvmsg; int hdrlen = ip->ip_hl << 2; struct icmp* icmppacket = (struct icmp *) (recvmsg + hdrlen); *************** *** 39,43 **** DBGOUTPUT("incorrect length of packet"); } ! } return 0; } --- 39,43 ---- DBGOUTPUT("incorrect length of packet"); } ! }*/ return 0; } Index: services =================================================================== RCS file: /cvsroot/javanetsim/IceScan/services,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** services 28 Nov 2006 17:57:54 -0000 1.1 --- services 17 Dec 2006 21:03:17 -0000 1.2 *************** *** 1126,1135 **** supfiledbg 1127/tcp # SUP debugging - # Datagram Delivery Protocol services - rtmp 1/ddp # Routing Table Maintenance Protocol - nbp 2/ddp # Name Binding Protocol - echo 4/ddp # AppleTalk Echo Protocol - zip 6/ddp # Zone Information Protocol - # Many services now accepted as 'standard' swat 901/tcp # Samba configuration tool --- 1126,1129 ---- *************** *** 1163,1169 **** vboxd 20012/tcp # voice box system vboxd 20012/udp - wnn4_Cn 22289/tcp wnn6_Cn # Wnn (Chinese input) - wnn4_Kr 22305/tcp wnn6_Kr # Wnn (Korean input) - wnn4_Tw 22321/tcp wnn6_Tw # Wnn (Taiwanse input) asp 27374/tcp # Address Search Protocol asp 27374/udp --- 1157,1160 ---- Index: portdef.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/portdef.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** portdef.h 17 Dec 2006 19:52:23 -0000 1.3 --- portdef.h 17 Dec 2006 21:03:17 -0000 1.4 *************** *** 8,14 **** int port_number; enum port_status status; }; ! bool sort_sp(scanned_port &p1, scanned_port &p2){ return p1.port_number < p2.port_number; } --- 8,18 ---- int port_number; enum port_status status; + + scanned_port(){ + status = PORT_UNKNOWN; + } }; ! bool sort_sp(const scanned_port &p1, const scanned_port &p2){ return p1.port_number < p2.port_number; } |
From: Alexander B. <da...@us...> - 2006-12-17 21:03:20
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12476/icesockets Modified Files: iceregex.h sock_name.h Log Message: no message Index: iceregex.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/iceregex.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** iceregex.h 16 Dec 2006 20:44:18 -0000 1.10 --- iceregex.h 17 Dec 2006 21:03:17 -0000 1.11 *************** *** 32,36 **** bool match(icestring const& s, std::vector<icestring> &v){ ! return false; } --- 32,36 ---- bool match(icestring const& s, std::vector<icestring> &v){ ! return false; } *************** *** 89,97 **** ~IceRegex(){ ! delete ovector_; } void init_regex(){ ! const char *error; int error_offset; --- 89,98 ---- ~IceRegex(){ ! pcre_free(pcre_); ! delete[] ovector_; } void init_regex(){ ! const char *error = NULL; int error_offset; *************** *** 117,121 **** --- 118,126 ---- &capture_count_); /* where to put the data */ + if(rc<0) exit(-1); + ovector_ = new int[3*(capture_count_+1)]; + + free((void *) error); } Index: sock_name.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_name.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** sock_name.h 17 Dec 2006 18:49:55 -0000 1.11 --- sock_name.h 17 Dec 2006 21:03:17 -0000 1.12 *************** *** 72,76 **** struct addrinfo hints, *res; char hname[1024]; - char *rname; int cnt = 0; --- 72,75 ---- *************** *** 88,93 **** while(res){ ! rname = inet_ntoa( *( &( ((sockaddr_in *)res->ai_addr)->sin_addr ) ) ); ! icestring is(rname); v.push_back(is); --- 87,91 ---- while(res){ ! icestring is(inet_ntoa( *( &( ((sockaddr_in *)res->ai_addr)->sin_addr ) ) )); v.push_back(is); *************** *** 96,99 **** --- 94,99 ---- } + freeaddrinfo(res); + return cnt; } |
From: Alexander B. <da...@us...> - 2006-12-17 21:03:20
|
Update of /cvsroot/javanetsim/IceScan/nbproject In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv12476/nbproject Modified Files: configurations.xml Log Message: no message Index: configurations.xml =================================================================== RCS file: /cvsroot/javanetsim/IceScan/nbproject/configurations.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** configurations.xml 17 Dec 2006 15:06:37 -0000 1.18 --- configurations.xml 17 Dec 2006 21:03:17 -0000 1.19 *************** *** 20,28 **** displayName="Important Files" projectFiles="false"> - <itemPath>.#Makefile.1.2</itemPath> <itemPath>.cvsignore</itemPath> <itemPath>CHANGELOG</itemPath> <itemPath>COPYING</itemPath> <itemPath>ieee-oui.txt</itemPath> <itemPath>services</itemPath> <itemPath>TODO</itemPath> --- 20,28 ---- displayName="Important Files" projectFiles="false"> <itemPath>.cvsignore</itemPath> <itemPath>CHANGELOG</itemPath> <itemPath>COPYING</itemPath> <itemPath>ieee-oui.txt</itemPath> + <itemPath>Makefile</itemPath> <itemPath>services</itemPath> <itemPath>TODO</itemPath> |
From: Alexander B. <da...@us...> - 2006-12-17 19:52:27
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16803/icesockets Modified Files: sock_types.h sock_win.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** sock_types.h 17 Dec 2006 19:21:15 -0000 1.22 --- sock_types.h 17 Dec 2006 19:52:23 -0000 1.23 *************** *** 11,14 **** --- 11,15 ---- #include <string> #include <iostream> //for std + #include <algorithm> #include <sys/types.h> Index: sock_win.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_win.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sock_win.h 17 Dec 2006 15:51:54 -0000 1.8 --- sock_win.h 17 Dec 2006 19:52:23 -0000 1.9 *************** *** 30,33 **** --- 30,34 ---- #include <process.h> #include <Iphlpapi.h> + #include <lmcons.h> WSADATA start_sockets(){ *************** *** 50,56 **** } int getuid(){ ! return 1; //UGLY, FIXIT! } #else --- 51,170 ---- } + BOOL IsCurrentUserLocalAdministrator(void); + int getuid(){ ! return (int)!(IsCurrentUserLocalAdministrator()); //UGLY, FIXIT! } + + //from MS Q118626: + BOOL IsCurrentUserLocalAdministrator(void) + { + BOOL fReturn = FALSE; + DWORD dwStatus; + DWORD dwAccessMask; + DWORD dwAccessDesired; + DWORD dwACLSize; + DWORD dwStructureSize = sizeof(PRIVILEGE_SET); + PACL pACL = NULL; + PSID psidAdmin = NULL; + + HANDLE hToken = NULL; + HANDLE hImpersonationToken = NULL; + + PRIVILEGE_SET ps; + GENERIC_MAPPING GenericMapping; + + PSECURITY_DESCRIPTOR psdAdmin = NULL; + SID_IDENTIFIER_AUTHORITY SystemSidAuthority = SECURITY_NT_AUTHORITY; + + const DWORD ACCESS_READ = 1; + const DWORD ACCESS_WRITE = 2; + + + __try + { + + if (!OpenThreadToken(GetCurrentThread(), TOKEN_DUPLICATE|TOKEN_QUERY, TRUE, &hToken)) + { + if (GetLastError() != ERROR_NO_TOKEN) + __leave; + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_DUPLICATE|TOKEN_QUERY, &hToken)) + __leave; + } + + if (!DuplicateToken (hToken, SecurityImpersonation, &hImpersonationToken)) + __leave; + + + if (!AllocateAndInitializeSid(&SystemSidAuthority, 2, + SECURITY_BUILTIN_DOMAIN_RID, + DOMAIN_ALIAS_RID_ADMINS, + 0, 0, 0, 0, 0, 0, &psidAdmin)) + __leave; + + psdAdmin = LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); + if (psdAdmin == NULL) + __leave; + + if (!InitializeSecurityDescriptor(psdAdmin, SECURITY_DESCRIPTOR_REVISION)) + __leave; + + dwACLSize = sizeof(ACL) + sizeof(ACCESS_ALLOWED_ACE) + + GetLengthSid(psidAdmin) - sizeof(DWORD); + + pACL = (PACL)LocalAlloc(LPTR, dwACLSize); + if (pACL == NULL) + __leave; + + if (!InitializeAcl(pACL, dwACLSize, ACL_REVISION2)) + __leave; + + dwAccessMask= ACCESS_READ | ACCESS_WRITE; + + if (!AddAccessAllowedAce(pACL, ACL_REVISION2, dwAccessMask, psidAdmin)) + __leave; + + if (!SetSecurityDescriptorDacl(psdAdmin, TRUE, pACL, FALSE)) + __leave; + + SetSecurityDescriptorGroup(psdAdmin, psidAdmin, FALSE); + SetSecurityDescriptorOwner(psdAdmin, psidAdmin, FALSE); + + if (!IsValidSecurityDescriptor(psdAdmin)) + __leave; + + dwAccessDesired = ACCESS_READ; + + /* + Initialize GenericMapping structure even though you + do not use generic rights. + */ + GenericMapping.GenericRead = ACCESS_READ; + GenericMapping.GenericWrite = ACCESS_WRITE; + GenericMapping.GenericExecute = 0; + GenericMapping.GenericAll = ACCESS_READ | ACCESS_WRITE; + + if (!AccessCheck(psdAdmin, hImpersonationToken, dwAccessDesired, + &GenericMapping, &ps, &dwStructureSize, &dwStatus, + &fReturn)) + { + fReturn = FALSE; + __leave; + } + } + __finally + { + // Clean up. + if (pACL) LocalFree(pACL); + if (psdAdmin) LocalFree(psdAdmin); + if (psidAdmin) FreeSid(psidAdmin); + if (hImpersonationToken) CloseHandle (hImpersonationToken); + if (hToken) CloseHandle (hToken); + } + + return fReturn; + } + #else |
From: Alexander B. <da...@us...> - 2006-12-17 19:52:27
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv16803 Modified Files: csubtarget.h icediscover.h portdef.h Log Message: Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** csubtarget.h 17 Dec 2006 19:21:14 -0000 1.45 --- csubtarget.h 17 Dec 2006 19:52:23 -0000 1.46 *************** *** 71,95 **** csubtarget(icestring hostname, icestring reverse_hostname, iceparams *par, iceoutput *out){ ! struct scanned_port sp; ! ! subtarget_ports.push_back(sp); ! ! this->hostname.assign(hostname); ! this->reversed_hostname.assign(reverse_hostname); this->par = par; this->out = out; discovered = false; ! init_scan_sockets(); } bool discover(){ ! struct timeb tp1, tp2; ! ! ftime(&tp1); discovered = host_discover(hostname.c_str(), par, out); ! ftime(&tp2); ! ! if(par->verbose) *out << "Discovery taken " << timeb_diff(tp1, tp2) << " seconds.\n"; ! return discovered; } --- 71,95 ---- csubtarget(icestring hostname, icestring reverse_hostname, iceparams *par, iceoutput *out){ ! struct scanned_port sp; ! ! subtarget_ports.push_back(sp); ! ! this->hostname.assign(hostname); ! this->reversed_hostname.assign(reverse_hostname); this->par = par; this->out = out; discovered = false; ! init_scan_sockets(); } bool discover(){ ! struct timeb tp1, tp2; ! ! ftime(&tp1); discovered = host_discover(hostname.c_str(), par, out); ! ftime(&tp2); ! ! if(par->verbose) *out << "Discovery taken " << timeb_diff(tp1, tp2) << " seconds.\n"; ! return discovered; } *************** *** 98,109 **** if(par->scan_type == TCP_CONNECT_SCAN) connect_scan(); if(par->scan_type == NBT_SCAN) nbt_scan(); ! if(par->scan_type == PROT_SCAN) prot_scan(); ! if(par->scan_type == FIN_SCAN) raw_tcp_scan("FIN"); ! if(par->scan_type == NULL_SCAN) raw_tcp_scan("NULL"); ! if(par->scan_type == XMAS_SCAN) raw_tcp_scan("XMAS"); ! if(par->scan_type == WINDOW_SCAN) raw_tcp_scan("window"); ! if(par->scan_type == ACK_SCAN) raw_tcp_scan("ACK"); ! if(par->scan_type == SYN_SCAN) raw_tcp_scan("SYN"); ! if(par->scan_type == UDP_SCAN) udp_scan(); } --- 98,109 ---- if(par->scan_type == TCP_CONNECT_SCAN) connect_scan(); if(par->scan_type == NBT_SCAN) nbt_scan(); ! if(par->scan_type == PROT_SCAN) prot_scan(); ! if(par->scan_type == FIN_SCAN) raw_tcp_scan("FIN"); ! if(par->scan_type == NULL_SCAN) raw_tcp_scan("NULL"); ! if(par->scan_type == XMAS_SCAN) raw_tcp_scan("XMAS"); ! if(par->scan_type == WINDOW_SCAN) raw_tcp_scan("window"); ! if(par->scan_type == ACK_SCAN) raw_tcp_scan("ACK"); ! if(par->scan_type == SYN_SCAN) raw_tcp_scan("SYN"); ! if(par->scan_type == UDP_SCAN) udp_scan(); } *************** *** 365,369 **** *out << "Starting TCP " << scan_type << " scan against " << hostname.c_str() << "...\n"; ! #if (__CYGWIN__ || WIN32) //UGLY!!! if(!par->forceuid){ #else --- 365,369 ---- *out << "Starting TCP " << scan_type << " scan against " << hostname.c_str() << "...\n"; ! #if (__CYGWIN__) if(!par->forceuid){ #else *************** *** 831,834 **** --- 831,836 ---- out->line("PORT STATE SERVICE"); + std::sort(subtarget_ports.begin(), subtarget_ports.end(), sort_sp); + for(int j = 0; j < subtarget_ports.size(); j++){ Bzero(output_buf, 255); Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** icediscover.h 17 Dec 2006 19:21:15 -0000 1.29 --- icediscover.h 17 Dec 2006 19:52:23 -0000 1.30 *************** *** 180,183 **** --- 180,185 ---- std::map <int, scanning_port> scanning_ports; + //add priv checking! + if(par->pu_ports.size() > 0){ for(int j = 0; j < par->pu_ports.size(); j++){ Index: portdef.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/portdef.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** portdef.h 16 Dec 2006 17:18:28 -0000 1.2 --- portdef.h 17 Dec 2006 19:52:23 -0000 1.3 *************** *** 10,13 **** --- 10,17 ---- }; + bool sort_sp(scanned_port &p1, scanned_port &p2){ + return p1.port_number < p2.port_number; + } + class scanning_port{ public: |
From: Alexander B. <da...@us...> - 2006-12-17 19:21:18
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6661 Modified Files: csubtarget.h icediscover.h nbt_wrapper.h Log Message: Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** csubtarget.h 17 Dec 2006 18:49:55 -0000 1.44 --- csubtarget.h 17 Dec 2006 19:21:14 -0000 1.45 *************** *** 11,17 **** #include "iceparams.h" ! #ifndef WIN32 ! #include "nbt_wrapper.h" ! #endif #include "iceprotocol.h" --- 11,17 ---- #include "iceparams.h" ! //#ifndef WIN32 ! #include "nbt_wrapper.h" ! //#endif #include "iceprotocol.h" *************** *** 146,156 **** } - #ifndef WIN32 cnbtwrapper wrap(par); wrap.test(hostname.c_str(), 137); - #endif ! if(par->verbose>0){ Bzero(output_buf, 255); sprintf(output_buf, "NetBIOS scan finished.", hostname.c_str()); --- 146,154 ---- } cnbtwrapper wrap(par); wrap.test(hostname.c_str(), 137); ! if(par->verbose>0){ Bzero(output_buf, 255); sprintf(output_buf, "NetBIOS scan finished.", hostname.c_str()); Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** icediscover.h 17 Dec 2006 11:14:00 -0000 1.28 --- icediscover.h 17 Dec 2006 19:21:15 -0000 1.29 *************** *** 105,110 **** //DBGOUTPUT("!!!!"); ! struct ip *ip = (struct ip *) buf; ! int hdrlen = ip->ip_hl << 2; struct icmp *icmp = (struct icmp *) (buf + hdrlen); --- 105,110 ---- //DBGOUTPUT("!!!!"); ! struct iphdr *ip = (struct iphdr *) buf; ! int hdrlen = ip->ihl << 2; struct icmp *icmp = (struct icmp *) (buf + hdrlen); *************** *** 113,117 **** bool result = false; ! if(icmp->icmp_id == getpid() && icmplen > 16){ if(icmp -> icmp_type == ICMP_ECHOREPLY && icmp_type == ECHO){ --- 113,117 ---- bool result = false; ! if(icmp->icmp_id == getpid() && icmplen > 16){ if(icmp -> icmp_type == ICMP_ECHOREPLY && icmp_type == ECHO){ Index: nbt_wrapper.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/nbt_wrapper.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** nbt_wrapper.h 16 Dec 2006 20:44:18 -0000 1.6 --- nbt_wrapper.h 17 Dec 2006 19:21:15 -0000 1.7 *************** *** 6,9 **** --- 6,11 ---- #ifndef WIN32 #include <sys/time.h> + #else + //#define typeof(a) __typeof #endif *************** *** 346,351 **** if((response_header = (nbname_response_header_t*) malloc(sizeof(nbname_response_header_t)))==NULL) return NULL; if((response_footer = (nbname_response_footer_t*) malloc(sizeof(nbname_response_footer_t)))==NULL) return NULL; ! bzero(response_header, sizeof(nbname_response_header_t)); ! bzero(response_footer, sizeof(nbname_response_footer_t)); if((hostinfo = (nb_host_info*)malloc(sizeof(struct nb_host_info)))==NULL) return NULL; --- 348,353 ---- if((response_header = (nbname_response_header_t*) malloc(sizeof(nbname_response_header_t)))==NULL) return NULL; if((response_footer = (nbname_response_footer_t*) malloc(sizeof(nbname_response_footer_t)))==NULL) return NULL; ! Bzero(response_header, sizeof(nbname_response_header_t)); ! Bzero(response_footer, sizeof(nbname_response_footer_t)); if((hostinfo = (nb_host_info*)malloc(sizeof(struct nb_host_info)))==NULL) return NULL; *************** *** 400,404 **** if( offset+sizeof(response_header->number_of_names) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_header->number_of_names = *(typeof(response_header->number_of_names)*)(buff+offset); offset+=sizeof(response_header->number_of_names); --- 402,406 ---- if( offset+sizeof(response_header->number_of_names) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_header->number_of_names = *(my_uint8_t *)(buff+offset); offset+=sizeof(response_header->number_of_names); *************** *** 418,426 **** if( offset+sizeof(response_footer->version_major) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_footer->version_major = *(typeof(response_footer->version_major)*)(buff+offset); offset+=sizeof(response_footer->version_major); if( offset+sizeof(response_footer->version_minor) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_footer->version_minor = *(typeof(response_footer->version_minor)*)(buff+offset); offset+=sizeof(response_footer->version_minor); --- 420,428 ---- if( offset+sizeof(response_footer->version_major) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_footer->version_major = *(my_uint8_t *)(buff+offset); offset+=sizeof(response_footer->version_major); if( offset+sizeof(response_footer->version_minor) >= buffsize) { hostinfo->is_broken = offset; return hostinfo; } ! response_footer->version_minor = *(my_uint8_t *)(buff+offset); offset+=sizeof(response_footer->version_minor); |
From: Alexander B. <da...@us...> - 2006-12-17 19:21:18
|
Update of /cvsroot/javanetsim/IceScan/vccproject In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6661/vccproject Modified Files: IceScan.suo Log Message: Index: IceScan.suo =================================================================== RCS file: /cvsroot/javanetsim/IceScan/vccproject/IceScan.suo,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Binary files /tmp/cvsEQpqRc and /tmp/cvswTgXrF differ |
From: Alexander B. <da...@us...> - 2006-12-17 19:21:18
|
Update of /cvsroot/javanetsim/IceScan/icesockets In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6661/icesockets Modified Files: sock_types.h Log Message: Index: sock_types.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icesockets/sock_types.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** sock_types.h 17 Dec 2006 18:49:55 -0000 1.21 --- sock_types.h 17 Dec 2006 19:21:15 -0000 1.22 *************** *** 177,186 **** u_int8_t ip_hv; /* header and version */ u_int8_t ip_tos; /* type of service */ ! u_short ip_len; /* total length */ ! u_short ip_id; /* identification */ ! u_short ip_off; /* fragment offset field */ u_int8_t ip_ttl; /* time to live */ u_int8_t ip_p; /* protocol */ ! u_short ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ }; --- 177,186 ---- u_int8_t ip_hv; /* header and version */ u_int8_t ip_tos; /* type of service */ ! u_int16_t ip_len; /* total length */ ! u_int16_t ip_id; /* identification */ ! u_int16_t ip_off; /* fragment offset field */ u_int8_t ip_ttl; /* time to live */ u_int8_t ip_p; /* protocol */ ! u_int16_t ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ }; |
From: Alexander B. <da...@us...> - 2006-12-17 18:50:00
|
Update of /cvsroot/javanetsim/IceScan/vccproject In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv26141/vccproject Modified Files: IceScan.suo Log Message: Index: IceScan.suo =================================================================== RCS file: /cvsroot/javanetsim/IceScan/vccproject/IceScan.suo,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 Binary files /tmp/cvsNj3TQF and /tmp/cvsA4USzq differ |