[Javanetsim-cvs] IceScan csubtarget.h, 1.45, 1.46 icediscover.h, 1.29, 1.30 portdef.h, 1.2, 1.3
Status: Beta
Brought to you by:
darkkey
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: |