DBmanager_finder.py


SUBMITTED BY: ne0n

DATE: March 9, 2023, 7:16 p.m.

FORMAT: Python 3.0 Traceback

SIZE: 2.5 kB

HITS: 444

  1. # module not found? just pip install modulename
  2. import os
  3. import requests
  4. import time
  5. from multiprocessing.dummy import Pool as ThreadPool
  6. from colorama import Fore, Style
  7. from urllib3.exceptions import InsecureRequestWarning
  8. from fake_useragent import UserAgent
  9. requests.packages.urllib3.disable_warnings()
  10. bl = Fore.BLUE
  11. wh = Fore.WHITE
  12. gr = Fore.GREEN
  13. red = Fore.RED
  14. res = Style.RESET_ALL
  15. yl = Fore.YELLOW
  16. headers = {'User-Agent': UserAgent().random}
  17. def screen_clear():
  18. os.system('cls' if os.name == 'nt' else 'clear')
  19. def dbman(star, config_file, result_file):
  20. if "://" not in star:
  21. star = "http://" + star
  22. star = star.replace('\n', '').replace('\r', '')
  23. url = star + config_file
  24. try:
  25. check = requests.get(url, headers=headers, timeout=5, verify=False)
  26. if check.status_code == 200:
  27. resp = check.text
  28. if "pma_password" in resp or "auth[password]" in resp:
  29. print(f"DBManager {gr}OK{res} => {star}\n")
  30. with open(result_file, "a") as f:
  31. f.write(f'{url}\n')
  32. else:
  33. print(f"{red}Not Found{res} DBManager => {star}\n")
  34. except requests.exceptions.RequestException as e:
  35. print(f"{red}ERROR{res} {str(e)} => {star}\n")
  36. def filter(star, result_file):
  37. dbman(star, "/adminer.php", result_file)
  38. dbman(star, "/phpmyadmin/index.php", result_file)
  39. dbman(star, "/myadmin/index.php", result_file)
  40. dbman(star, "/dbadmin/index.php", result_file)
  41. dbman(star, "/sql/index.php", result_file)
  42. dbman(star, "/phpadmin/index.php", result_file)
  43. dbman(star, "/mysql/index.php", result_file)
  44. dbman(star, "/pma/index.php", result_file)
  45. dbman(star, "/phpmyadmin2/index.php", result_file)
  46. dbman(star, "/sqlmanager/index.php", result_file)
  47. dbman(star, "/mysqlmanager/index.php", result_file)
  48. dbman(star, "/adminer/index.php", result_file)
  49. def main():
  50. print(f'{gr}[ DBManager$Finder ]')
  51. list_file = input(f"{gr}Gimme your {red}list{gr}:{res} ")
  52. thread_count = int(input(f"{gr}Thread: {res}"))
  53. result_file = input(f"{gr}Result filename: {res}")
  54. with open(list_file, 'r') as f:
  55. star = f.readlines()
  56. try:
  57. with ThreadPool(thread_count) as pool:
  58. pool.map(lambda x: filter(x, result_file), star)
  59. except:
  60. pass
  61. if __name__ == '__main__':
  62. screen_clear()
  63. main()

comments powered by Disqus