Advertisement
kaitolegion

CMS.py

Oct 24th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. #!/usr/bin/python
  2. import urllib
  3. import urllib3
  4. from urllib import urlopen as o
  5. import requests, re, urllib2, os, sys, codecs
  6. from multiprocessing.dummy import Pool
  7. from time import time as timer
  8. import time,random
  9. from random import sample as rand
  10. from platform import system
  11. import datetime
  12. from colorama import Fore
  13. from colorama import Style
  14. from pprint import pprint
  15. from colorama import init
  16. from urlparse import urlparse
  17. from requests.packages.urllib3.exceptions import InsecureRequestWarning
  18.  
  19. init (autoreset=True)
  20.  
  21. requests.packages.urllib3.disable_warnings (InsecureRequestWarning)
  22.  
  23. ####### Colors ######
  24.  
  25. fr = Fore.RED
  26. fc = Fore.CYAN
  27. fw = Fore.WHITE
  28. fg = Fore.GREEN
  29. sd = Style.DIM
  30. sn = Style.NORMAL
  31. sb = Style.BRIGHT
  32.  
  33. #######################
  34.  
  35. os.system('clear')
  36. start_raw = raw_input("\033[92m[>]\033[91m List Of Sites [\033[97mlist.txt\033[91m]:# ")
  37. try:
  38. with open(start_raw, 'r') as f:
  39. sites = f.read().splitlines()
  40. except IOError:
  41. pass
  42.  
  43. try:
  44. sites = list((sites))
  45. except NameError:
  46. print '\n [!] List Not Found\n'
  47. raw_input(' \033[92m[\033[91mExit\033[92m]')
  48.  
  49.  
  50. Agent = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0'}
  51. user_agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3"
  52.  
  53. def rand_str (len = None) :
  54. if len == None :
  55. len = 8
  56. return ''.join (rand ('abcdefghijklmnopqrstuvwxyz', len))
  57.  
  58. def prepare(url, ua):
  59. try:
  60. global user_agent
  61. headers = {
  62. 'User-Agent' : user_agent,
  63. 'x-forwarded-for' : ua
  64. }
  65. cookies = urllib2.Request(url, headers=headers)
  66. result = urllib2.urlopen(cookies)
  67. cookieJar = result.info().getheader('Set-Cookie')
  68. injection = urllib2.Request(url, headers=headers)
  69. injection.add_header('Cookie', cookieJar)
  70. urllib2.urlopen(injection)
  71. except:
  72. pass
  73.  
  74.  
  75. def cms(url):
  76.  
  77. try:
  78. if requests.get(url + "/administrator/manifests/files/joomla.xml", verify=False).status_code == 200:
  79. joomla = requests.get(url + "/administrator/manifests/files/joomla.xml", verify=False)
  80. joomla_version = re.findall('<version>(.*?)<\/version>', joomla.text)
  81. print "\033[92m[Joomla] \033[92mURL:",url
  82. open('CMS/Joomla.txt', 'a').write(url+'\n')
  83.  
  84.  
  85. elif requests.get(url + "/language/en-GB/en-GB.xml", verify=False).status_code == 200:
  86. joomla = requests.get(url + "/language/en-GB/en-GB.xml", verify=False)
  87. joomla_version = re.findall('<version>(.*?)<\/version>', joomla.text)
  88. print "\033[92m[Joomla] \033[92mURL:",url
  89. open('CMS/Joomla.txt', 'a').write(url+'\n')
  90.  
  91. except :
  92. pass
  93. try:
  94.  
  95. Checktwo = requests.get(url, timeout=5)
  96. if "/wp-content/" in Checktwo.text.encode('utf-8'):
  97. print "\033[92m[Wordpress] \033[92mURL:",url
  98. open('CMS/Wordpress.txt', 'a').write(url+'/wp-login.php\n')
  99. open('CMS/wp.txt','a').write(url+'\n')
  100.  
  101. else:
  102. print ''.format(sb, sd, url, fc,fc, sb,fr)
  103. except :
  104. pass
  105. try:
  106.  
  107. Checktwo = requests.get(url, timeout=5)
  108. if "/sites/default/" in Checktwo.text.encode('utf-8'):
  109. print "\033[92m[Drupal] \033[92mURL:",url
  110. open('CMS/Drupal.txt', 'a').write(url+'\n')
  111. drupal(url)
  112. except :
  113. pass
  114. try:
  115.  
  116. Checktwo = requests.get(url, timeout=5)
  117.  
  118. if "prestashop" in Checktwo.text.encode('utf-8'):
  119. print "\033[0m[Prestashop] \033[92mURL:",url
  120.  
  121. open('CMS/Prestashop.txt', 'a').write(url+'\n')
  122. prestashop(url)
  123. except :
  124. pass
  125. try:
  126.  
  127. CheckOsc = requests.get(url + '/admin/images/cal_date_over.gif')
  128. CheckOsc2 = requests.get(url + '/admin/login.php')
  129.  
  130. if 'GIF89a' in CheckOsc.text.encode('utf-8') or 'osCommerce' in CheckOsc2.text.encode('utf-8'):
  131. print "\033[0m[osCommerce] \033[92mURL:",url
  132. open('CMS/osCommerce.txt', 'a').write(url+'\n')
  133. osrce(url)
  134. except :
  135. pass
  136. try:
  137.  
  138. Checktree = requests.get(url + '/application/configs/application.ini')
  139.  
  140. if "APPLICATION_PATH" in Checktree.text.encode('utf-8'):
  141. print "\033[92m[Zen] \033[92mURL:",url
  142.  
  143. open('CMS/zen.txt', 'a').write(url+'\n')
  144. zenbot(url)
  145. except :
  146. pass
  147. try:
  148.  
  149. Checktwo = requests.get(url, timeout=5)
  150.  
  151. if "Magento" in Checktwo.text.encode('utf-8'):
  152. print "\033[92m[Magento] \033[92mURL:",url
  153.  
  154. open('CMS/Magento.txt', 'a').write(url+'\n')
  155. except :
  156. pass
  157. try:
  158.  
  159. Checktwo = requests.get(url, timeout=5)
  160.  
  161. if "OpenCart" in Checktwo.text.encode('utf-8'):
  162. print "\033[92m[OpenCart] \033[92mURL:",url
  163.  
  164. open('CMS/OpenCart.txt', 'a').write(url+'\n')
  165. except :
  166. pass
  167. try:
  168.  
  169. Checktwo = requests.get(url, timeout=5)
  170. if "vBulletin" in Checktwo.text.encode('utf-8'):
  171. print "\033[92m[vBulletin] \033[92mURL:",url
  172. open('CMS/vBulletin.txt', 'a').write(url+'\n')
  173. except :
  174. pass
  175.  
  176.  
  177. def Main():
  178. try:
  179. start = timer()
  180. ThreadPool = Pool(100)
  181. Threads = ThreadPool.map(cms, sites)
  182. print('Finished in : ' + str(timer() - start) + ' seconds')
  183. except :
  184. pass
  185.  
  186.  
  187. if __name__ == '__main__':
  188. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement