Exemplo n.º 1
0
 def getService(self, transport, service):
     ip = transport.getPeer().address.host
     location = ip_to_location(ip)
     data = {
         'ip': location['ip'],
         'country': location['country_code'],
         'region': location['region_code'],
         'city': location['city'],
         'action': 'auth'
     }
     honey_logging.stash.info('logstash-honey', extra=data)
     return SSHFactory.getService(self, transport, service)