[Icescan-cvs] IceScan iceprotocol.h, 1.4, 1.5 TODO, 1.43, 1.44 protocols, 1.1, 1.2 iceparams.h, 1.3
Status: Alpha
Brought to you by:
darkkey
From: Alexander B. <da...@us...> - 2007-01-23 12:51:58
|
Update of /cvsroot/icescan/IceScan In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv16497 Modified Files: iceprotocol.h TODO protocols iceparams.h caengine.cc icescan.cc caengine.h Log Message: Some fixes in architecture of crawsocket/cethwrapper. Index: icescan.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/icescan.cc,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** icescan.cc 22 Jan 2007 18:06:49 -0000 1.34 --- icescan.cc 23 Jan 2007 12:51:51 -0000 1.35 *************** *** 72,75 **** --- 72,76 ---- "\t--ttl <value>: set IP time-to-live field\n" "\t--bounce-http-proxy <<hostname>:<port>>: connect() through HTTP proxy\n" + "\t--ip-options < R | T | U >: add specific IP option to outgoing packets\n" "\t--badchksum: send packets with a wrong TCP/UDP checksums" "OUTPUT\n" *************** *** 211,215 **** if(argc>=2){ ! for(int i = 1; i<argc; i++){ if(argv[i][0] == '-'){ if(strlen(argv[i]) >= 2){ --- 212,216 ---- if(argc>=2){ ! for(int i = 1; i<argc; i++){ if(argv[i][0] == '-'){ if(strlen(argv[i]) >= 2){ *************** *** 278,282 **** exit(0); }else if(!strcmp(argv[i], "--use-first-resolve")){ ! par->use_first_resolve = true; }else if(!strcmp(argv[i], "--input-dumpfile")){ if(i+1 < argc){ --- 279,292 ---- exit(0); }else if(!strcmp(argv[i], "--use-first-resolve")){ ! par->use_first_resolve = true; ! }else if(!strcmp(argv[i], "--ip-options")){ ! if(i+1 < argc){ ! if(argv[i+1][0] == 'R'){ ! par->ip_options = RR; ! i++; ! }else ! invalid_command(argv[0], "Invalid ip option specified.", ""); ! }else ! invalid_command(argv[0], "No ip options specified.", ""); }else if(!strcmp(argv[i], "--input-dumpfile")){ if(i+1 < argc){ *************** *** 585,598 **** case 'A': par->ack_ping_discovery = true; ! parse_ports(i, argc, argv, par->pa_ports, false); break; case 'F': par->fin_ping_discovery = true; ! parse_ports(i, argc, argv, par->pf_ports, false); break; case 'S': par->syn_ping_discovery = true; ! parse_ports(i, argc, argv, par->ps_ports, false); break; --- 595,608 ---- case 'A': par->ack_ping_discovery = true; ! parse_ports(i, argc, argv, par->pa_ports, false); break; case 'F': par->fin_ping_discovery = true; ! parse_ports(i, argc, argv, par->pf_ports, false); break; case 'S': par->syn_ping_discovery = true; ! parse_ports(i, argc, argv, par->ps_ports, false); break; *************** *** 658,666 **** } - //// If the protocol scan is not required and none of the others the default scan is TCP_CONNECT_SCAN - if (!par->ip_protocol_scan && par->scan_type == NO_SCAN) - par->scan_type = TCP_CONNECT_SCAN; - - return true; } --- 668,671 ---- Index: iceparams.h =================================================================== RCS file: /cvsroot/icescan/IceScan/iceparams.h,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** iceparams.h 22 Jan 2007 18:06:49 -0000 1.34 --- iceparams.h 23 Jan 2007 12:51:51 -0000 1.35 *************** *** 15,19 **** enum Output_types{ALL = -1, TEXT = 0, XML = 1, GREP = 2, TROFF = 3}; ! enum Scan_type {UNKNOWN_SCAN, NO_SCAN, TCP_CONNECT_SCAN = 10, NBT_SCAN, PROT_SCAN, FIN_SCAN = 13, NULL_SCAN, XMAS_SCAN, WINDOW_SCAN, ACK_SCAN, SYN_SCAN, UDP_SCAN, LIST_SCAN, PASSIVE_SCAN, MAIMON_SCAN}; // -S0 -ST -SB -SI -SF -SN -SX -SW -SA -SS -SU -SL -SP --- 15,19 ---- enum Output_types{ALL = -1, TEXT = 0, XML = 1, GREP = 2, TROFF = 3}; ! enum Scan_type {UNKNOWN_SCAN, NO_SCAN = -1, TCP_CONNECT_SCAN = 10, NBT_SCAN, PROT_SCAN, FIN_SCAN = 13, NULL_SCAN, XMAS_SCAN, WINDOW_SCAN, ACK_SCAN, SYN_SCAN, UDP_SCAN, LIST_SCAN, PASSIVE_SCAN, MAIMON_SCAN}; // -S0 -ST -SB -SI -SF -SN -SX -SW -SA -SS -SU -SL -SP *************** *** 98,101 **** --- 98,103 ---- enum Scan_type scan_type; + + enum Ip_options ip_options; int sim_connects; *************** *** 204,207 **** --- 206,211 ---- random_len = 0; + ip_options = NONE; + for (int i = 0; i < 4; i++) output_filenames[i] = ""; *************** *** 242,246 **** this->isnd = new ice_service_name_database (fstr.c_str()); ! fstr = find_icefile_path("protocols", databases_dir); ispd = new ice_protocol_name_database (fstr.c_str()); --- 246,250 ---- this->isnd = new ice_service_name_database (fstr.c_str()); ! fstr = find_icefile_path("protocols", databases_dir); ispd = new ice_protocol_name_database (fstr.c_str()); *************** *** 288,291 **** --- 292,297 ---- if(input_dumpfile != "" && scan_type == PASSIVE_SCAN) source_iface = 1; + + if(ip_options != NONE); init_default_ports(); Index: iceprotocol.h =================================================================== RCS file: /cvsroot/icescan/IceScan/iceprotocol.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** iceprotocol.h 22 Jan 2007 18:06:49 -0000 1.4 --- iceprotocol.h 23 Jan 2007 12:51:51 -0000 1.5 *************** *** 39,43 **** case IPPROTO_UDP: ! r_raw->send_udp_raw(hostname,csocket::getMagicPort()+rand_port_val,csocket::getMagicPort()+rand_port_val,par->ttl,0,0,0); break; --- 39,43 ---- case IPPROTO_UDP: ! r_raw->send_udp_raw(l_hostname, hostname,csocket::getMagicPort()+rand_port_val,csocket::getMagicPort()+rand_port_val,par->ttl,0,0,0); break; Index: caengine.h =================================================================== RCS file: /cvsroot/icescan/IceScan/caengine.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** caengine.h 22 Jan 2007 16:51:29 -0000 1.24 --- caengine.h 23 Jan 2007 12:51:51 -0000 1.25 *************** *** 56,60 **** crawsocket *r2; // 2d OSI level (TCP/UDP) csocket *cudp; // UDP socket - cethwrapper *ew; std::vector <cpcapreader *> pcaps; --- 56,59 ---- *************** *** 91,95 **** FD_ZERO(&fd_w); FD_ZERO(&fd_x); - ew = NULL; r3 = r2 = NULL; cudp = NULL; --- 90,93 ---- *************** *** 134,141 **** cudp = NULL; } - if(ew){ - delete ew; - ew = NULL; - } // DBGOUTPUT("Middle of destructor..."); --- 132,135 ---- Index: caengine.cc =================================================================== RCS file: /cvsroot/icescan/IceScan/caengine.cc,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** caengine.cc 22 Jan 2007 18:06:49 -0000 1.14 --- caengine.cc 23 Jan 2007 12:51:51 -0000 1.15 *************** *** 251,259 **** if(par.packet_trace) cde.r3->trace(true); - cde.ew = new cethwrapper(true); cde.r2 = new crawsocket(AF_INET, (int) SOCK_RAW, IPPROTO_RAW); if(par.packet_trace) cde.r2->trace(true); cde.r2->set_ethernet(par.ethernet); cde.r2->set_badchksum(par.badchksum); int one = 1; --- 251,259 ---- if(par.packet_trace) cde.r3->trace(true); cde.r2 = new crawsocket(AF_INET, (int) SOCK_RAW, IPPROTO_RAW); if(par.packet_trace) cde.r2->trace(true); cde.r2->set_ethernet(par.ethernet); cde.r2->set_badchksum(par.badchksum); + cde.r2->set_ip_option(par.ip_options); int one = 1; *************** *** 595,599 **** gettimeofday(&(c->attempts[A_ARP].send_tv), NULL); if(par.root()){ ! cde.ew->send_arp_msg("", ARP_OP_REQUEST, "", "", "", c->hostname); }else{ if(!c->attempts[A_ARP].at){ --- 595,599 ---- gettimeofday(&(c->attempts[A_ARP].send_tv), NULL); if(par.root()){ ! cde.r2->send_arp_msg("", ARP_OP_REQUEST, "", "", "", c->hostname); }else{ if(!c->attempts[A_ARP].at){ Index: TODO =================================================================== RCS file: /cvsroot/icescan/IceScan/TODO,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** TODO 22 Jan 2007 23:25:17 -0000 1.43 --- TODO 23 Jan 2007 12:51:51 -0000 1.44 *************** *** 34,38 **** I70 + PACKET TRACE should show TCP and IP options. I71 + PACKET TRACE options. (--trace-options) ! I7 + add target setting xxx.xxx.xxx.xx-xx specification feature. -- Discovering -- --- 34,40 ---- I70 + PACKET TRACE should show TCP and IP options. I71 + PACKET TRACE options. (--trace-options) ! I7 + add target setting xxx.xxx.xxx.xx-xx (xxx.xxx.xx-xx.xx-xx and etc) specification feature. ! I72 + --exclude <host1[,host2][,host3],...> (exclude hosts/nets) ! I73 + --excludefile <filename> (exclude list from file) -- Discovering -- *************** *** 47,51 **** -- Scanning -- - I14 * test IP Protocol Scan (-SI) I16 + UDP RAW Scan (spoofed ip/mac/random data/etc...) I18 + IPX scan (??) --- 49,52 ---- Index: protocols =================================================================== RCS file: /cvsroot/icescan/IceScan/protocols,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** protocols 22 Jan 2007 18:06:49 -0000 1.1 --- protocols 23 Jan 2007 12:51:51 -0000 1.2 *************** *** 1,4 **** - # /etc/protocols - # # Internet (IP) protocols definition file # --- 1,2 ---- |