forked from p15670423/monkey
Updated format errors in aws_exporter and lowered errors to infos in vsftpd exploiter
This commit is contained in:
parent
c66a0cd44c
commit
4b84810fae
|
@ -45,7 +45,7 @@ class VSFTPDExploiter(HostExploiter):
|
|||
s.connect((ip_addr, port))
|
||||
return True
|
||||
except socket.error as e:
|
||||
LOG.error('Failed to connect to %s', self.host.ip_addr)
|
||||
LOG.info('Failed to connect to %s: %s', self.host.ip_addr, str(e))
|
||||
return False
|
||||
|
||||
def socket_send_recv(self, s, message):
|
||||
|
@ -53,7 +53,7 @@ class VSFTPDExploiter(HostExploiter):
|
|||
s.send(message)
|
||||
return s.recv(RECV_128).decode('utf-8')
|
||||
except socket.error as e:
|
||||
LOG.error('Failed to send payload to %s', self.host.ip_addr)
|
||||
LOG.info('Failed to send payload to %s: %s', self.host.ip_addr, str(e))
|
||||
return False
|
||||
|
||||
def socket_send(self, s, message):
|
||||
|
@ -61,7 +61,7 @@ class VSFTPDExploiter(HostExploiter):
|
|||
s.send(message)
|
||||
return True
|
||||
except socket.error as e:
|
||||
LOG.error('Failed to send payload to %s', self.host.ip_addr)
|
||||
LOG.info('Failed to send payload to %s: %s', self.host.ip_addr, str(e))
|
||||
return False
|
||||
|
||||
def _exploit_host(self):
|
||||
|
|
|
@ -107,10 +107,10 @@ class AWSExporter(Exporter):
|
|||
else:
|
||||
return False
|
||||
except UnknownServiceError as e:
|
||||
logger.warning('AWS exporter called but AWS-CLI securityhub service is not installed. Error: ' + e)
|
||||
logger.warning('AWS exporter called but AWS-CLI security hub service is not installed. Error: {}'.format(e))
|
||||
return False
|
||||
except Exception as e:
|
||||
logger.exception('AWS security hub findings failed to send. Error: ' + e)
|
||||
logger.exception('AWS security hub findings failed to send. Error: {}'.format(e))
|
||||
return False
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Reference in New Issue