[Javanetsim-cvs] IceScan nbt_wrapper.h, 1.3, 1.4 TODO, 1.9, 1.10 icediscover.h, 1.11, 1.12
Status: Beta
Brought to you by:
darkkey
|
From: Alexander B. <da...@us...> - 2006-12-15 16:25:01
|
Update of /cvsroot/javanetsim/IceScan In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv32713 Modified Files: nbt_wrapper.h TODO icediscover.h Log Message: no message Index: icediscover.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/icediscover.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** icediscover.h 15 Dec 2006 15:27:57 -0000 1.11 --- icediscover.h 15 Dec 2006 16:24:58 -0000 1.12 *************** *** 31,67 **** } - void send_icmp_echo(icestring &hostname_, const iceparams *par_, iceoutput *out_, crawsocket *r_){ - crawsocket *r = r_; - const char *hostname = hostname_.c_str(); - iceoutput *out = out_; - const iceparams *par = par_; - - char buftosend[1500]; - int nsent = 1; - - - bzero(buftosend, 1500); - - struct icmp *icmp = (struct icmp *) buftosend; - - icmp->icmp_type = ICMP_ECHO; - icmp->icmp_code = 0; - icmp->icmp_id = getpid(); - gettimeofday( ( struct timeval *) icmp->icmp_data, NULL); - icmp->icmp_seq = nsent++; - - int len = 8 + 56; // icmp header + icmp data - - icmp->icmp_cksum = crawsocket::in_chksum( (unsigned short * ) icmp, len); - - if(par->verbose>0) - out->line("Sending icmp ping host discovery request (echo_request)..."); - - r->sendto(hostname, buftosend, len, 0); - - icesleep(0, 100); - - } - bool icmp_echo_ping(const char *hostname, iceparams *par, iceoutput *out){ //pthread_t send_thread; --- 31,34 ---- *************** *** 91,100 **** r.nonblock(true); ! int at = 0; while(attempts++ < 100){ ! if(at++<ECHO_ATTEMPTS){ ! send_icmp_echo(hostname_, par, out, &r); ! usleep(100000); } --- 58,75 ---- r.nonblock(true); ! int at = 1; while(attempts++ < 100){ ! if(at++<=ECHO_ATTEMPTS){ ! if(par->verbose>0) ! out->line("Sending icmp ping host discovery request (echo_request)..."); ! ! char buf[sizeof(struct timeval) + 1]; ! ! gettimeofday( ( struct timeval *) buf, NULL); ! ! r.send_icmp_packet(hostname, ICMP_ECHO, 0, getpid(), at, 0, buf, sizeof(struct timeval)); ! ! usleep(200000); } Index: TODO =================================================================== RCS file: /cvsroot/javanetsim/IceScan/TODO,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TODO 14 Dec 2006 16:40:25 -0000 1.9 --- TODO 15 Dec 2006 16:24:58 -0000 1.10 *************** *** 7,10 **** --- 7,11 ---- + add multiple targets handling; * fix reading port range for ack/udp/syn pings; + + add uid option -- Discovering -- *************** *** 13,16 **** --- 14,19 ---- + TCP SYN Scan (-PS [portlist]) [Key] + ICMP Address Mask Ping (-PM) [QweR] + + ARP/UDP Discovery + + ARP Discovery -- Scanning -- *************** *** 24,26 **** --- 27,31 ---- -- Misc -- + + add 'send_icmp_packet' function to crawsocket. + -- Bugs -- Index: nbt_wrapper.h =================================================================== RCS file: /cvsroot/javanetsim/IceScan/nbt_wrapper.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nbt_wrapper.h 13 Dec 2006 13:22:00 -0000 1.3 --- nbt_wrapper.h 15 Dec 2006 16:24:58 -0000 1.4 *************** *** 7,11 **** /* This file contains a portions of code from Samba package, * ! /* which contains the following license: * / Unix SMB/Netbios implementation --- 7,11 ---- /* This file contains a portions of code from Samba package, * ! /* which contains the following license: * / Unix SMB/Netbios implementation |