Also set src_ip directly in auth_password

This commit is contained in:
honigbij 2015-03-18 19:03:09 +01:00
parent 8f343662c0
commit cb1ba514a6
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ class HoneyPotSSHUserAuthServer(userauth.SSHUserAuthServer):
# Overridden to pass src_ip to auth.UsernamePasswordIP
def auth_password(self, packet):
password = getNS(packet[1:])[0]
c = auth.UsernamePasswordIP(self.user, password, self.transport.src_ip)
src_ip = self.transport.getPeer().address.host
c = auth.UsernamePasswordIP(self.user, password, src_ip)
return self.portal.login(c, None, conchinterfaces.IConchUser).addErrback(
self._ebPassword)