예제 #1
0
파일: protocol.py 프로젝트: RyanKung/cowrie
 def lastlogExit(self):
     starttime = time.strftime("%a %b %d %H:%M", time.localtime(self.logintime))
     endtime = time.strftime("%H:%M", time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     f = file("%s/lastlog.txt" % self.env.cfg.get("honeypot", "data_path"), "a")
     f.write("root\tpts/0\t%s\t%s - %s (%s)\n" % (self.clientIP, starttime, endtime, duration))
     f.close()
예제 #2
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
                               time.localtime(self.logintime))
     endtime = time.strftime('%H:%M', time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     utils.addToLastlog('root\tpts/0\t%s\t%s - %s (%s)' % \
         (self.clientIP, starttime, endtime, duration))
예제 #3
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
         time.localtime(self.logintime))
     endtime = time.strftime('%H:%M',
         time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     utils.addToLastlog('root\tpts/0\t%s\t%s - %s (%s)' % \
         (self.clientIP, starttime, endtime, duration))
예제 #4
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
         time.localtime(self.logintime))
     endtime = time.strftime('%H:%M',
         time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     f = file('%s/lastlog.txt' % self.env.cfg.get('honeypot', 'data_path'), 'a')
     f.write('root\tpts/0\t%s\t%s - %s (%s)\n' % \
         (self.clientIP, starttime, endtime, duration))
     f.close()
예제 #5
0
 def lastlogExit(self):
     starttime = time.strftime('%a %b %d %H:%M',
                               time.localtime(self.logintime))
     endtime = time.strftime('%H:%M', time.localtime(time.time()))
     duration = utils.durationHuman(time.time() - self.logintime)
     f = file('%s/lastlog.txt' % self.env.cfg.get('honeypot', 'data_path'),
              'a')
     f.write('root\tpts/0\t%s\t%s - %s (%s)\n' % \
         (self.clientIP, starttime, endtime, duration))
     f.close()