Ejemplo n.º 1
0
 public void TestScanRouter()
 {
     string ipTarget = "192.168.1.27";
     string macRouter = "c8cd723a8708";
     //PortScannerBis portScanner = new PortScannerBis();
     OwnPacketSender Sender = new OwnPacketSender();
     OwnPacketBuilder ICMPPacket = new OwnPacketBuilder( PacketType.TCP );
     for( int i = 1 ; i <= 10 ; i++ )
     {
         Sender.trySend( ICMPPacket.BuildIcmpPacket(ipTarget, macRouter) );
     }
 }
Ejemplo n.º 2
0
 public void TestScanPortWithPcap()
 {
     string ip = "192.168.1.27";
     string mac = "00113202ce22";
     //PortScannerBis portScanner = new PortScannerBis();
     OwnPacketSender Sender = new OwnPacketSender();
     OwnPacketBuilder TCPPacket = new OwnPacketBuilder(PacketType.TCP);
     for( int i = 1 ; i <= 65535 ; i++ )
     {
         Sender.trySend( TCPPacket.BuildTcpPacket(ip,mac,(ushort)i) );
     }
 }