Advertisement
Guest User

Untitled

a guest
Oct 17th, 2011
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. # Created by Pathogen @ www.hakhub.tk
  2.  
  3. import sys,re
  4. import sshmon
  5. import subprocess as sp
  6.  
  7.  
  8. cmd = sp.Popen("cat /proc/version",stdout = sp.PIPE,shell=True)
  9. plat = cmd.stdout.read()
  10. if re.search("ubuntu",str(plat)):
  11.  platform = "Ubuntu"  
  12. elif re.search("Red Hat",str(plat)):
  13.  platform = "Red Hat"
  14.  
  15.  
  16. module = raw_input("Enter the log to parse -> ")
  17. if module == "ssh":
  18.  if platform == "Red Hat":
  19.   sshmon.RHL()
  20.  elif platform == "Ubuntu":
  21.   sshmon.ubuntu()
  22. elif module == "":
  23.  print "No module chosen."
  24.  
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement