Esempio n. 1
0
 def run_network(self):
     """Runs `netcat` on hosts in the network to provide open ports to scan"""
     Scenario.run_network(self)
     # Open random top ports for scanning
     for host in self.net.hosts:
         if host.name == 'kali':
             continue
         host.taskPorts = []
         for port in range(0, random.randint(0, 4)):
             host.taskPorts.append(random.choice(top_100_ports))
         for port in host.taskPorts:
             host.cmd('nc', '-l', '-d', '-p', port, '&')
     if self.developer:
         self.kali.cmd('ip a')
         self.kali.cmd('nmap -v %s/%s' % (self.kali.defaultIntf().IP(), self.prefixlen))
Esempio n. 2
0
 def run_network(self):
     """Runs the network. Adds an OpenFlow rule the the network switch for flood packets on all ports."""
     Scenario.run_network(self)
     self.add_ftp()
     # Add a rule to the switch to flood packets
     self.switch.dpctl("add-flow", "action=flood")
Esempio n. 3
0
 def run_network(self):
     Scenario.run_network(self)
     self.add_ftp()