Advertisement
Guest User

Untitled

a guest
Sep 7th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. # let us initialize the AuParser
  2. aup = auparse.AuParser(auparse.AUSOURCE_FEED)
  3.  
  4. # we initalize the callback to be fn_process_event
  5. aup.add_callback(fn_process_event, None)
  6.  
  7. myfile = "/var/log/audit/audit.log"
  8.  
  9. while True:
  10.     try:
  11.         # we read in line by line from stdin
  12.         for line in fileinput.input():
  13.         #for line in fileinput.input(myfile):
  14.             aup.feed(line)
  15.     except:
  16.         logger.error("Fatal error in while loop", exc_info=True)
  17.  
  18. # we flush the feed when we quit
  19. aup.flush_feed()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement