forked from p15670423/monkey
Issue #35 - Added option for blocked IPs.
This commit is contained in:
parent
084cee78fd
commit
3549bb351e
|
@ -172,6 +172,8 @@ class Configuration(object):
|
|||
range_size = 1
|
||||
range_fixed = ['',]
|
||||
|
||||
blocked_ips = ['', ]
|
||||
|
||||
# TCP Scanner
|
||||
HTTP_PORTS = [80, 8080, 443,
|
||||
8008, # HTTP alternate
|
||||
|
@ -210,7 +212,6 @@ class Configuration(object):
|
|||
smb_download_timeout = 300 # timeout in seconds
|
||||
smb_service_name = "InfectionMonkey"
|
||||
|
||||
|
||||
# system info collection
|
||||
collect_system_info = True
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"range_fixed": [
|
||||
""
|
||||
],
|
||||
"blocked_ips": [""],
|
||||
"current_server": "41.50.73.31:5000",
|
||||
"psexec_passwords": [
|
||||
"Password1!",
|
||||
|
|
|
@ -52,6 +52,11 @@ class NetworkScanner(object):
|
|||
if victim.ip_addr in self._ip_addresses:
|
||||
continue
|
||||
|
||||
# skip IPs marked as blocked
|
||||
if victim.ip_addr in WormConfiguration.blocked_ips:
|
||||
LOG.info("Skipping %s due to blacklist" % victim)
|
||||
continue
|
||||
|
||||
LOG.debug("Scanning %r...", victim)
|
||||
|
||||
# if scanner detect machine is up, add it to victims list
|
||||
|
|
Loading…
Reference in New Issue