215febri

LaraCMS

Mar 23rd, 2021 (edited)
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.78 KB | None | 0 0
  1. import os, requests, time
  2. from multiprocessing.dummy import Pool as ThreadPool
  3. from multiprocessing import Pool
  4. import threading
  5. import sys
  6. from colorama import Fore, Style
  7.  
  8.  
  9. def screen_clear():
  10.     _ = os.system('cls')
  11.  
  12.  
  13. bl = Fore.BLUE
  14. wh = Fore.WHITE
  15. gr = Fore.GREEN
  16. red = Fore.RED
  17. res = Style.RESET_ALL
  18. yl = Fore.YELLOW
  19. pk =Fore.LIGHTMAGENTA_EX
  20.  
  21. headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0'}
  22.  
  23. def laravelcheck (star):
  24.     if "://" in star:
  25.       star = star
  26.     else:
  27.       star = "http://" + star
  28.     star = star.replace('\n', '').replace('\r', '')
  29.     url = star + "/.env"
  30.     check = requests.get(url, headers=headers, timeout=3)
  31.     resp = check.text
  32.     try:
  33.         if "DB_HOST" in resp:
  34.             print(f"{yl}[ VALID ] Laravel => {pk} {star}\n")
  35.             mrigel = open("Laravel.txt", "a")
  36.             mrigel.write(f'{star}.env\n')
  37.         else:
  38.             print(f"{bl} [ OTHER ] => {white} {star}\n")
  39.             mrigel = open("Othercms.txt", "a")
  40.             mrigel.write(f'{star}.env\n')
  41.     except:
  42.         pass
  43. def wpcheck (star):
  44.     if "://" in star:
  45.       star = star
  46.     else:
  47.       star = "http://" + star
  48.     star = star.replace('\n', '').replace('\r', '')
  49.     url = star + "/wp-content/"
  50.     check = requests.get(url, headers=headers, timeout=3)
  51.     try:
  52.         if check.status_code == 200:
  53.             print(f"{gr}[ VALID ] Wordpress => {pk} {star}\n")
  54.             mrigel = open("/Wordpress.txt", "a")
  55.             mrigel.write(f'{star}\n')
  56.         else:
  57.             print(f"{bl} [ OTHER ] => {white} {star}\n")
  58.             mrigel = open("Othercms.txt", "a")
  59.             mrigel.write(f'{star}.env\n')
  60.     except:
  61.         pass
  62.  
  63.  
  64. def filter(star):
  65.     try:
  66.        laravelcheck(star)
  67.        wpcheck(star)
  68.     except:
  69.        pass
  70.  
  71.  
  72. def main():
  73.     print(f'''    
  74.        __                                __   _       ______     ________  ________{wh}
  75.       / /   ____ __{bl}_PT_RUMAH_DIMAZ_{bl} __   _____  / /  | |     / / __ \  / ____/  |/  / ___/{red}
  76.      / /   / __ `/ ___/ __ `/ | / / _ \/ /   | | /| / / /_/ /  / /   / /|_/ /\__ \ {bl}
  77.     / /___/ /_/ / /  / /_/ /| |/ /  __/ /    | |/ |/ / ____/  / /___/ /  / /___/ / {yl}
  78.    /_____/\__,_/_/   \__,_/ |___/\___/_/     |__/|__/_/       \____/_/  /_//____/  {gr}
  79.                                                        {wh}        Laravel Check {red} CMS {res}                    
  80.    ''')
  81.     list = input(f"{wh}Masukan Listnya Bosku/{red} {gr}${res} ")
  82.     star = open(list, 'r').readlines()
  83.     try:
  84.        ThreadPool = Pool(50)
  85.        ThreadPool.map(filter, star)
  86.        ThreadPool.close()
  87.        ThreadPool.join()
  88.     except:
  89.        pass
  90.        
  91. if __name__ == '__main__':
  92.     screen_clear()
  93.     main()
Add Comment
Please, Sign In to add comment