Fadly31337

Joomla Components Scanner

Oct 19th, 2020
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.31 KB | None | 0 0
  1.  
  2. #!/usr/bin/python
  3. #------------------------------------------------
  4. import time
  5. import httplib
  6. #------------------------------------------------
  7. #~ Joomla Components Scanner
  8. #~ By YASSINOX.TN
  9. #~ Changing Rights Don't make you the coder
  10. #------------------------------------------------
  11. def logo():
  12.     print '''
  13.                  .                                    
  14.                \ | /                                  
  15.                _\|/_                                  
  16.              .' ' ' '.        ___                    
  17.            _.|.--.--.|.___.--'___`-.                  
  18.          .'.'||  |  ||`----'"`   ``'`                
  19.        .'.'  ||()|()||                                
  20. .___..-'.'    /       \   Joomla Components Scanner
  21. `----'"`     /   .-.   \      (c) Fadly31337
  22.            (.'.(___).'.)                              
  23.             `.__.-.__.'                              
  24.              |_|   |_|                                
  25.               `.`-'.'                                
  26.                 `"`                                  
  27. '''
  28. logo()
  29. #------------------------------------------------
  30. Notfound = [404,401,400,403,406,301]
  31. sitesfile = raw_input("sites list path >")
  32. compath = raw_input("Components List Path >")
  33. #------------------------------------------------
  34. def grab(site,com):
  35.     global resp
  36.     try:
  37.             conn = httplib.HTTPConnection(site)
  38.             conn.request('HEAD', "/index.php?option=" + com)
  39.             resp = conn.getresponse().status
  40.     except(), message:
  41.             print "Cant Connect :",message
  42.             pass
  43. #------------------------------------------------
  44. def timer():
  45.     now = time.localtime(time.time())
  46.     return time.asctime(now)
  47. #------------------------------------------------
  48. def main():
  49.     sites = open(sitesfile).readlines()
  50.     compo = open(compath).readlines()
  51.     for site in sites:
  52.         site = site.rstrip()
  53.         for com in compo:
  54.                 com = com.rstrip()
  55.                 grab(site,com)
  56.                 if resp not in Notfound:
  57.                     print "+----------------------------------------+"
  58.                     print "| current site :" + site
  59.                     print "| Found component : "  + com
  60. #----------------------------------------------------------------
  61. main()
Add Comment
Please, Sign In to add comment