[Javanetsim-cvs] IceScan csubtarget.h, 1.44, 1.45 icediscover.h, 1.28, 1.29 nbt_wrapper.h, 1.6, 1.7
Status: Beta
Brought to you by:
darkkey
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); |