Minor readability changes in config service

This commit is contained in:
VakarisZ 2019-05-22 11:41:22 +03:00
parent fa836cc638
commit 7560887dd1
2 changed files with 3 additions and 2 deletions

View File

@ -95,7 +95,7 @@ class MSSQLExploiter(HostExploiter):
# Running the cmd on remote host
for cmd in cmds:
cursor.execute(cmd)
sleep(0.5)
sleep(MSSQLExploiter.QUERY_BUFFER)
except Exception as e:
LOG.error('Error sending the payload using xp_cmdshell to host: %s' % e)
return False

View File

@ -178,7 +178,8 @@ class InfectionMonkey(object):
if monkey_tunnel:
monkey_tunnel.set_tunnel_for_host(machine)
if self._default_server:
machine.set_default_server(get_interface_to_target(machine.ip_addr)+':'+self._default_server_port)
machine.set_default_server(get_interface_to_target(machine.ip_addr) +
(':'+self._default_server_port if self._default_server_port else ''))
LOG.debug("Default server: %s set to machine: %r" % (self._default_server, machine))
# Order exploits according to their type