forked from p15670423/monkey
Changed tcp scanning to be a bit more random. Might confuse really basic defenses.
This commit is contained in:
parent
ce3eaa9b2e
commit
9f27825789
|
@ -1,4 +1,5 @@
|
||||||
import time
|
import time
|
||||||
|
from random import shuffle
|
||||||
from network import HostScanner, HostFinger
|
from network import HostScanner, HostFinger
|
||||||
from model.host import VictimHost
|
from model.host import VictimHost
|
||||||
from network.tools import check_port_tcp
|
from network.tools import check_port_tcp
|
||||||
|
@ -19,8 +20,11 @@ class TcpScanner(HostScanner, HostFinger):
|
||||||
assert isinstance(host, VictimHost)
|
assert isinstance(host, VictimHost)
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
# maybe hide under really bad detection systems
|
||||||
|
target_ports = self._config.tcp_target_ports[:]
|
||||||
|
shuffle(target_ports)
|
||||||
|
|
||||||
for target_port in self._config.tcp_target_ports:
|
for target_port in target_ports:
|
||||||
|
|
||||||
is_open, banner = check_port_tcp(host.ip_addr,
|
is_open, banner = check_port_tcp(host.ip_addr,
|
||||||
target_port,
|
target_port,
|
||||||
|
|
Loading…
Reference in New Issue