Thread: [Javanetsim-cvs] IceScan icediscover.h, 1.9, 1.10 csubtarget.h, 1.18, 1.19
Status: Beta
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2006-12-14 14:15:14
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6510 Modified Files: icediscover.h csubtarget.h Log Message: no message Index: csubtarget.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** csubtarget.h 14 Dec 2006 13:42:07 -0000 1.18 --- csubtarget.h 14 Dec 2006 14:15:08 -0000 1.19 *************** *** 106,115 **** if(par->scan_type == NBT_SCAN) nbt_scan(); if(par->scan_type == PROT_SCAN) prot_scan(); ! if(par->scan_type == FIN_SCAN) fin_scan(); ! if(par->scan_type == NULL_SCAN) null_scan(); ! if(par->scan_type == XMAS_SCAN) xmas_scan(); ! if(par->scan_type == WINDOW_SCAN) window_scan(); ! if(par->scan_type == ACK_SCAN) ack_scan(); ! if(par->scan_type == SYN_SCAN) syn_scan(); } --- 106,115 ---- 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"); } *************** *** 142,146 **** } ! void raw_tcp_scan(){ std::map <int, scanning_port> scanning_ports; struct sockaddr_in saddress; --- 142,146 ---- } ! void raw_tcp_scan(icestring scan_type){ std::map <int, scanning_port> scanning_ports; struct sockaddr_in saddress; *************** *** 149,154 **** char local_hostname[80]; ! //add UID 0 check ! //^^^^^^^^^^^^ UGLY raw = true; --- 149,161 ---- char local_hostname[80]; ! if(par->verbose > 0) ! *out << "Starting TCP " << scan_type << " scan against " << hostname.c_str() << "...\n"; ! ! #ifndef __CYGWIN__ ! if(getuid()){ ! out->line("UID isn't 0, so can't create raw socket => no RAW tcp scan..."); ! return; ! } ! #endif raw = true; *************** *** 301,377 **** scanning_ports.clear(); ! } ! ! int fin_scan(){ ! // -SF ! if(par->verbose > 0) ! *out << "Starting TCP FIN scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); ! ! if(par->verbose>0) ! out->line("TCP FIN scan finished."); ! } ! ! int null_scan(){ ! // -SN ! if(par->verbose > 0) ! *out << "Starting TCP NULL scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); ! ! if(par->verbose>0) ! out->line("TCP NULL scan finished."); ! } ! ! int ack_scan(){ ! // -SN ! if(par->verbose > 0) ! *out << "Starting TCP ACK scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); ! ! if(par->verbose>0) ! out->line("TCP ACK scan finished."); ! } ! ! int xmas_scan(){ ! // -SX ! if(par->verbose > 0) ! *out << "Starting TCP XMAS scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); ! ! if(par->verbose>0) ! out->line("TCP XMAS scan finished."); ! } ! ! int window_scan(){ ! // -SW ! if(par->verbose > 0) ! *out << "Starting TCP Window scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); if(par->verbose>0) ! out->line("TCP Window scan finished."); } ! int syn_scan(){ ! // -SS ! if(par->verbose > 0) ! *out << "Starting TCP SYN scan against " << hostname.c_str() << "...\n"; ! ! raw_tcp_scan(); ! show_ports(); ! ! if(par->verbose>0) ! out->line("TCP SYN scan finished."); ! } int connect_scan(){ --- 308,319 ---- scanning_ports.clear(); ! ! show_ports(); if(par->verbose>0) ! *out << "TCP " << scan_type << "scan finished.\n"; } ! int connect_scan(){ Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** icediscover.h 14 Dec 2006 13:42:07 -0000 1.9 --- icediscover.h 14 Dec 2006 14:15:08 -0000 1.10 *************** *** 132,137 **** free(t_hostname); ! }else if(par->verbose>0) ! out->line("UID isn't 0, so can't create raw socket => no ICMP ping..."); return false; --- 132,136 ---- free(t_hostname); ! }else out->line("UID isn't 0, so can't create raw socket => no ICMP ping..."); return false; |