Thread: [Javanetsim-cvs] IceScan services, 1.1, 1.2 icedbs.h, 1.5, 1.6 portdef.h, 1.3, 1.4 icescan.cc, 1.35
Status: Beta
Brought to you by:
darkkey
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; } |