Snort alert tail...

Jan-Eric jan.eric-enlund at multi.fi
Sun Jun 16 08:51:45 EDT 2002


HEllo !
I'm trying to write a dynamic firewall script in python that scans the Snort 
alert file like 'tail -f' and takes action based on the infomation it gets 
from that file. But I can't get the 'tail' function to work.It reads the 
file, but any new information that Snort is writing to the file doesn't 
show up to the script.

ex.
file = open('/var/log/snort', 'r')
while 1:
        file = file.read()
        print file
....

Any suggestions???
Jan-Eric / Finland



More information about the Python-list mailing list