* Responding to the PR comments with the logs and usage changes.

This commit is contained in:
maor.rayzin 2018-06-12 16:29:27 +03:00
parent d312a3a771
commit db6f44109b
2 changed files with 6 additions and 4 deletions

View File

@ -146,7 +146,7 @@ class Configuration(object):
max_iterations = 1 max_iterations = 1
scanner_class = TcpScanner scanner_class = TcpScanner
finger_classes = [SMBFinger, SSHFinger, PingScanner, HTTPFinger, MySQLFinger, ElasticFinger] finger_classes = [SMBFinger, SSHFinger, PingScanner, HTTPFinger, MySQLFinger, ElasticFinger, MSSQLFinger]
exploiter_classes = [SmbExploiter, WmiExploiter, # Windows exploits exploiter_classes = [SmbExploiter, WmiExploiter, # Windows exploits
SSHExploiter, ShellShockExploiter, SambaCryExploiter, # Linux SSHExploiter, ShellShockExploiter, SambaCryExploiter, # Linux
ElasticGroovyExploiter, # multi ElasticGroovyExploiter, # multi

View File

@ -50,15 +50,17 @@ class MSSQLFinger(HostFinger):
sock.sendto(message, server_address) sock.sendto(message, server_address)
data, server = sock.recvfrom(self.BUFFER_SIZE) data, server = sock.recvfrom(self.BUFFER_SIZE)
except socket.timeout: except socket.timeout:
LOG.error('Socket timeout reached, maybe browser service on host: {0} doesnt exist'.format(host)) LOG.info('Socket timeout reached, maybe browser service on host: {0} doesnt exist'.format(host))
sock.close() sock.close()
return False return False
host.services[self.SERVICE_NAME] = {} host.services[self.SERVICE_NAME] = {}
# Loop through the server data # Loop through the server data
for server in data[3:].decode().split(';;'): instances_list = data[3:].decode().split(';;')
instance_info = server.split(';') LOG.info('{0} MSSQL instances found'.format(len(instances_list)))
for instance in instances_list:
instance_info = instance.split(';')
if len(instance_info) > 1: if len(instance_info) > 1:
host.services[self.SERVICE_NAME][instance_info[1]] = {} host.services[self.SERVICE_NAME][instance_info[1]] = {}
for i in range(1, len(instance_info), 2): for i in range(1, len(instance_info), 2):