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()
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))
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()