Update of /cvsroot/javanetsim/IceScan
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv11204
Modified Files:
iceparams.h icescan.cc TODO csubtarget.h
Added Files:
iceprotocol.h
Log Message:
no message
Index: icescan.cc
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/icescan.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** icescan.cc 28 Nov 2006 18:59:18 -0000 1.2
--- icescan.cc 28 Nov 2006 21:01:33 -0000 1.3
***************
*** 17,20 ****
--- 17,22 ----
"SCAN TYPES:\n"
"\t-ST: tcp connect() scan\n"
+ "\t-SB: udp NetBIOS scan\n"
+ "\t-SI: IP Protocol scan\n"
"PORTS SPECIFICATION:\n"
"\t-p <port range>: specify port range to scan (default 1-1024).\n"
***************
*** 76,79 ****
--- 78,86 ----
break;
+ case 'I':
+ par->scan_type = PROT_SCAN;
+ break;
+
+
default:
std::cout << "Invalid scan type: -S" << argv[i][2] << std::endl;
Index: iceparams.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/iceparams.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** iceparams.h 28 Nov 2006 17:57:54 -0000 1.1
--- iceparams.h 28 Nov 2006 21:01:33 -0000 1.2
***************
*** 11,16 ****
};
! enum Scan_type {NO_SCAN, TCP_CONNECT_SCAN, NBT_SCAN};
! // -S0 -ST -SB
--- 11,16 ----
};
! enum Scan_type {NO_SCAN, TCP_CONNECT_SCAN, NBT_SCAN, PROT_SCAN};
! // -S0 -ST -SB -SI
***************
*** 25,31 ****
int UID; // we're root or not?
! // Target
! char *target;
// PreScan settings
--- 25,31 ----
int UID; // we're root or not?
! // Target
! char *target;
// PreScan settings
Index: csubtarget.h
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/csubtarget.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** csubtarget.h 28 Nov 2006 17:57:54 -0000 1.1
--- csubtarget.h 28 Nov 2006 21:01:33 -0000 1.2
***************
*** 11,14 ****
--- 11,15 ----
#include "icediscover.h"
#include "nbt_wrapper.h"
+ #include "iceprotocol.h"
#define CONNECT_TIMEOUT 24
***************
*** 83,87 ****
--- 84,96 ----
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();
}
+
+ int prot_scan(){
+
+ cprotocol_scan cps(par, out);
+ cps.test(hostname);
+
+ }
int nbt_scan(){
Index: TODO
===================================================================
RCS file: /cvsroot/javanetsim/IceScan/TODO,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TODO 28 Nov 2006 19:19:27 -0000 1.2
--- TODO 28 Nov 2006 21:01:33 -0000 1.3
***************
*** 20,24 ****
+ Window Scan (-SW) [QweR]
+ Xmas Tree Scan (-SX) [QweR]
! + IP Protocol Scan (-SO) [Key]
+ Null Scan (-SN) [Key]
+ TCP SYN Scan (-SS) [Key]
--- 20,24 ----
+ Window Scan (-SW) [QweR]
+ Xmas Tree Scan (-SX) [QweR]
! + IP Protocol Scan (-SI) [Key]
+ Null Scan (-SN) [Key]
+ TCP SYN Scan (-SS) [Key]
--- NEW FILE: iceprotocol.h ---
#ifndef ICEPROTOCOL_H
#define ICEPROTOCOL_H
#include "icesockets/csocket.h"
#include "icesockets/crawsocket.h"
// protocol scan and etc...
class cprotocol_scan{
iceoutput *out;
iceparams *par;
public:
cprotocol_scan(iceparams *par, iceoutput *out){
this->out = out;
this->par = par;
}
int test(char *hostname){
//dummy
return 0;
char bufts[2] = " "; bufts[0] = 0; bufts[1] = 0;
crawsocket r(AF_INET, SOCK_RAW, 6);
r.sendto(hostname, bufts, sizeof(bufts), 0);
DBGOUTPUT("packet sent");
char dhostname[1024] = "";
char buf[1500]; //1500 == standart IP Packet size
int len = r.recvfrom(buf, sizeof(buf), 0, dhostname);
DBGOUTPUT("packet recieved");
DBGOUTPUT(dhostname);
}
};
#endif
|