SaintDruG

WP Checker

May 29th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Greetz to Magnom-Sec Original : http://pastebin.com/8X4Pf4L8
  2. # Wroten in python by MatriX Coder :D
  3.  
  4. import sys , urllib2 , re
  5.  
  6. try:
  7.     def check(site):
  8.         if 'http://' not in site:
  9.             site = 'http://' + site
  10.         print('\n')
  11.         print(site)
  12.         resp = urllib2.urlopen(site).read()
  13.         # Check version
  14.         wpversion = re.search('content="WordPress (.*?)"', resp).group(1)
  15.         # Check official theme
  16.         wptheme = re.search('wp-content/themes/(.*?)/', resp).group(1)
  17.         # Check official plugin
  18.         wpplugin = re.search('wp-content/plugins/(.*?)/', resp).group(1)
  19.         print ('\tversion ---> ' + wpversion) + ('\n\ttheme ---> ' + wptheme) + ('\n\tplugin ---> ' + wpplugin)
  20.  
  21.     s = sys.argv[1]
  22.     with open(s) as f:
  23.         sites = f.readlines()
  24.     for site in sites:
  25.         site = site.replace('\n' , '')
  26.         check(site)
  27. except IndexError:
  28.     print('[*] Usage : '+sys.argv[0]+'list.txt')
Add Comment
Please, Sign In to add comment