Able to playback multiple log files back to back

This commit is contained in:
g0tmi1k
2016-01-21 23:40:50 +00:00
parent 2a4925b65f
commit 05d860c3f8

View File

@ -63,7 +63,7 @@ def playlog(fd, settings):
def help(brief = 0): def help(brief = 0):
print 'Usage: %s [-bfhi] [-m secs] [-w file] <tty-log-file>\n' % \ print 'Usage: %s [-bfhi] [-m secs] [-w file] <tty-log-file> <tty-log-file>...\n' % \
os.path.basename(sys.argv[0]) os.path.basename(sys.argv[0])
if not brief: if not brief:
@ -106,11 +106,11 @@ if __name__ == '__main__':
help() help()
try: try:
logfd = open(args[0], 'rb') for logfile in args:
logfd = open(logfile, 'rb')
playlog(logfd, settings)
except IOError: except IOError:
print "Couldn't open log file!" print "\n\n[!] Couldn't open log file (%s)!" % logfile
sys.exit(2) sys.exit(2)
playlog(logfd, settings)
# vim: set sw=4: # vim: set sw=4: