forked from p15670423/monkey
Remove relative range option from config
This commit is contained in:
parent
1011e731af
commit
b58c4ea622
|
@ -183,7 +183,6 @@ class Configuration(object):
|
||||||
local_network_scan = True
|
local_network_scan = True
|
||||||
|
|
||||||
range_class = FixedRange
|
range_class = FixedRange
|
||||||
range_size = 1
|
|
||||||
range_fixed = ['', ]
|
range_fixed = ['', ]
|
||||||
|
|
||||||
blocked_ips = ['', ]
|
blocked_ips = ['', ]
|
||||||
|
|
|
@ -52,7 +52,6 @@
|
||||||
"ms08_067_remote_user_add": "Monkey_IUSER_SUPPORT",
|
"ms08_067_remote_user_add": "Monkey_IUSER_SUPPORT",
|
||||||
"ms08_067_remote_user_pass": "Password1!",
|
"ms08_067_remote_user_pass": "Password1!",
|
||||||
"ping_scan_timeout": 10000,
|
"ping_scan_timeout": 10000,
|
||||||
"range_size": 30,
|
|
||||||
"rdp_use_vbs_download": true,
|
"rdp_use_vbs_download": true,
|
||||||
"smb_download_timeout": 300,
|
"smb_download_timeout": 300,
|
||||||
"smb_service_name": "InfectionMonkey",
|
"smb_service_name": "InfectionMonkey",
|
||||||
|
|
|
@ -45,7 +45,7 @@ class RelativeRange(NetworkRange):
|
||||||
def __init__(self, base_address, shuffle=True):
|
def __init__(self, base_address, shuffle=True):
|
||||||
base_address = struct.unpack(">L", socket.inet_aton(base_address))[0]
|
base_address = struct.unpack(">L", socket.inet_aton(base_address))[0]
|
||||||
super(RelativeRange, self).__init__(base_address, shuffle=shuffle)
|
super(RelativeRange, self).__init__(base_address, shuffle=shuffle)
|
||||||
self._size = self._config.range_size
|
self._size = 1
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<RelativeRange %s-%s>" % (socket.inet_ntoa(struct.pack(">L", self._base_address - self._size)),
|
return "<RelativeRange %s-%s>" % (socket.inet_ntoa(struct.pack(">L", self._base_address - self._size)),
|
||||||
|
|
|
@ -208,28 +208,17 @@ SCHEMA = {
|
||||||
"default": "FixedRange",
|
"default": "FixedRange",
|
||||||
"enum": [
|
"enum": [
|
||||||
"FixedRange",
|
"FixedRange",
|
||||||
"RelativeRange",
|
|
||||||
"ClassCRange"
|
"ClassCRange"
|
||||||
],
|
],
|
||||||
"enumNames": [
|
"enumNames": [
|
||||||
"Fixed Range",
|
"Fixed Range",
|
||||||
"Relative Range",
|
|
||||||
"Class C Range"
|
"Class C Range"
|
||||||
],
|
],
|
||||||
"description":
|
"description":
|
||||||
"Determines which class to use to determine scan range."
|
"Determines which class to use to determine scan range."
|
||||||
" Fixed Range will scan only specific IPs listed under Fixed range IP list."
|
" Fixed Range will scan only specific IPs listed under Fixed range IP list."
|
||||||
" Relative Range will scan the <Relative range size> closest ips to the machine's IP."
|
|
||||||
" Class C Range will scan machines in the Class C network the monkey's on."
|
" Class C Range will scan machines in the Class C network the monkey's on."
|
||||||
},
|
},
|
||||||
"range_size": {
|
|
||||||
"title": "Relative range size",
|
|
||||||
"type": "integer",
|
|
||||||
"default": 1,
|
|
||||||
"description":
|
|
||||||
"Determines the size of the RelativeRange - amount of IPs to scan"
|
|
||||||
" (Only relevant for Relative Range)"
|
|
||||||
},
|
|
||||||
"range_fixed": {
|
"range_fixed": {
|
||||||
"title": "Fixed range IP list",
|
"title": "Fixed range IP list",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|
Loading…
Reference in New Issue