#!/usr/bin/env python

import os
from optparse import OptionParser

def main():
    print 'Evil logs:\n'
    log_p = '/var/log/spoofer/curr_evil.log'
    if os.path.isfile(log_p):
    	logf = open(log_p, 'r')
        logs = logf.readlines()
    	logs = logs[len(logs) - 6:]
    	logf.close()
    	for log in logs:
	    print log.strip()     
        print ''
        print '------------------------------'
    else:
        print 'No logfile present'
        print ''
        print '------------------------------'

    print 'Snort Alerts:\n'
    alert_p = '/var/log/snort/alert'
    if os.path.isfile(alert_p):
        alertf = open(alert_p, 'r')
        alerts = alertf.readlines()
        alerts = alerts[len(alerts) - 25:]
        alertf.close()
        for line in alerts:
            print line.strip()
    else:
        print 'No alert file present'
        print ''
        print '------------------------------'

if __name__ == '__main__':
    main()
