示例#1
0
 def connectionLost(self, reason):
     for i in self.interactors:
         i.sessionClosed()
     if self.transport.sessionno in self.factory.sessions:
         del self.factory.sessions[self.transport.sessionno]
     self.lastlogExit()
     if self.ttylog_open:
         ttylog.ttylog_close(self.ttylog_file, time.time())
         self.ttylog_open = False
     transport.SSHServerTransport.connectionLost(self, reason)
示例#2
0
 def connectionLost(self, reason):
     for i in self.interactors:
         i.sessionClosed()
     if self.transport.sessionno in self.factory.sessions:
         del self.factory.sessions[self.transport.sessionno]
     self.lastlogExit()
     if self.ttylog_open:
         ttylog.ttylog_close(self.ttylog_file, time.time())
         self.ttylog_open = False
     transport.SSHServerTransport.connectionLost(self, reason)
示例#3
0
 def connectionLost(self, reason):
     cfg = config()
     for i in self.interactors:
         i.sessionClosed()
     if self.transport.sessionno in self.factory.sessions:
         del self.factory.sessions[self.transport.sessionno]
     self.lastlogExit()
     if self.ttylog_open:
         ttylog.ttylog_close(self.ttylog_file, time.time())
         self.ttylog_open = False
     if cfg.has_option('smtp', 'alert_quit'):
         if cfg.get('smtp', 'alert_quit') == 'true':
             print 'Emailing about attack being over (alert_quit = true).'
             emailMessage = 'The attacker quit.\n\nPlease check the logs (%s)!' % (self.ttylog_file)
             sendEmail('SSH Attack Finished',  emailMessage)
     transport.SSHServerTransport.connectionLost(self, reason)
示例#4
0
 def close_tty(self, ttylog_file):
     ttylog.ttylog_close(ttylog_file, time.time())
示例#5
0
 def closeTTY(self, ttylog_file):
     ttylog.ttylog_close(ttylog_file, time.time())
示例#6
0
 def connectionLost(self, reason):
     if self.ttylog_open:
         ttylog.ttylog_close(self.ttylog_file, time.time())
         self.ttylog_open = False
     insults.ServerProtocol.connectionLost(self, reason)
示例#7
0
 def connectionLost(self, reason):
     if self.ttylog_open:
         ttylog.ttylog_close(self.ttylog_file, time.time())
         self.ttylog_open = False
     insults.ServerProtocol.connectionLost(self, reason)