Advertisement
WhosYourDaddySec

Dork Scanner

Nov 20th, 2023
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. python
  2. import subprocess
  3. from datetime import datetime
  4.  
  5. # Define the dork list for admin and database discovery
  6. dorks = [
  7. "inurl:/admin",
  8. "inurl:/login",
  9. "inurl:/administrator",
  10. "inurl:/adminLogin",
  11. "inurl:/adminPanel",
  12. "intitle:\"phpMyAdmin\"",
  13. "intitle:\"Admin Login\"",
  14. "intitle:\"Admin Panel\"",
  15. "intitle:\"Login\"",
  16. "intext:\"Powered by PHPMyAdmin\"",
  17. "intext:\"Admin Login\"",
  18. "intext:\"Admin Panel\"",
  19. "intext:\"Login\"",
  20. "intext:\"Powered by phpMyAdmin\"",
  21. "inurl:/wp-admin",
  22. "inurl:/wp-login",
  23. "intitle:\"WordPress Login\"",
  24. "inurl:/drupal",
  25. "intext:\"Powered by Drupal\"",
  26. "inurl:/joomla",
  27. "intext:\"Powered by Joomla\"",
  28. "inurl:/phpmyadmin",
  29. "inurl:/dbadmin",
  30. "inurl:/myadmin",
  31. "inurl:/phpMyAdmin2",
  32. "inurl:/phpMyAdmin3",
  33. "intext:\"Welcome to phpMyAdmin\"",
  34. "intext:\"Welcome to phpMyAdmin 2\"",
  35. "intext:\"Welcome to phpMyAdmin 3\"",
  36. "inurl:/webadmin",
  37. "inurl:/siteadmin",
  38. "inurl:/phpmyadmin2",
  39. "inurl:/phpmyadmin3",
  40. "inurl:/phpmyadmin4",
  41. "intext:\"Administer your database\"",
  42. "intext:\"Database management system\"",
  43. "intext:\"MySQL administrator\"",
  44. "intext:\"phpMyAdmin login\"",
  45. "intext:\"Control Panel\"",
  46. "inurl:/controlpanel",
  47. "intext:\"cPanel Login\"",
  48. "inurl:/phpmyadmin/index.php",
  49. "intext:\"phpMyAdmin setup\"",
  50. "intext:\"phpMyAdmin username\"",
  51. "inext:\"phpMyAdmin password\"",
  52. "inext:\"phpMyAdmin hostname\"",
  53. "inurl:/phpmyadmin/config.inc.php",
  54. "intext:\"config file\" ext:txt",
  55. "inext:\"root@localhost\" intext:\"phpMyAdmin\"",
  56. "inurl:/administrator/index.php",
  57. "inurl:/admin1.php",
  58. "inurl:/admin1.html",
  59. "inurl:/login.php",
  60. "inurl:/login.html",
  61. "inurl:/login.aspx",
  62. "inurl:/siteadmin/index.php",
  63. "inurl:/siteadmin",
  64. "inurl:/siteadmin/login.asp",
  65. "inurl:/admin/controlpanel.asp",
  66. "inurl:/admin/login.asp",
  67. "inurl:/admin/index.asp",
  68. "inurl:/user/login",
  69. "inurl:/users/login",
  70. "inurl:/adminarea",
  71. "inurl:/bb-admin",
  72. "inurl:/wp-admin",
  73. "inurl:/wp-login",
  74. "inurl:/wp-login.php",
  75. "inurl:/bb-admin/login",
  76. "inurl:/bb-admin/admin",
  77. "inurl:/bb-admin/admin.html",
  78. "inurl:/bb-admin/admin.php",
  79. "inurl:/administrator/index.html",
  80. "inurl:/administrator/index.php",
  81. "inurl:/administrator/login",
  82. "inurl:/admin/cp.php",
  83. "inurl:/admin/index.html",
  84. "inurl:/admin/index.php",
  85. "inurl:/admin/admin.html",
  86. "inurl:/admin/admin.php",
  87. "inurl:/login/login.html",
  88. "inurl:/login/login.php",
  89. "inurl:/admin/account.html",
  90. "inurl:/admin/account.php",
  91. "inurl:/admin/index.html",
  92. "inurl:/admin/index.php",
  93. "inurl:/admin/admin.html",
  94. "inurl:/admin/admin.php",
  95. "inurl:/admin/login/login.html",
  96. "inurl:/admin/login/login.php",
  97. "inurl:/admin/login/admin.html",
  98. "inurl:/admin/login/admin.php",
  99. "inurl:/admin/login/account.html",
  100. "inurl:/admin/login/account.php",
  101. "inurl:/admin/cp.html",
  102. "inurl:/admin/cp.php",
  103. "inurl:/admin/home.html",
  104. "inurl:/admin/home.php",
  105. "inurl:/admin/admin/home.html",
  106. "inurl:/admin/admin/home.php",
  107. "inurl:/admin/login/home.html",
  108. "inurl:/admin/login/home.php",
  109. "inurl:/admin/login/index.html",
  110. "inurl:/admin/login/index.php",
  111. "inurl:/admin/index/home.html",
  112. "inurl:/admin/index/home.php",
  113. "inurl:/admin/index/login/index.html",
  114. "inurl:/admin/index/login/index.php",
  115. "inurl:/admin/login/home/index.html",
  116. "inurl:/admin/login/home/index.php",
  117. "inurl:/admin/index/login/index.html",
  118. "inurl:/admin/index/login/index.php",
  119. "inurl:/admin/home/index/index.html",
  120. "inurl:/admin/home/index/index.php",
  121. "inurl:/phpmyadmin/index.html",
  122. "inurl:/phpmyadmin/index.php",
  123. "inurl:/phpmyadmin/phpmyadmin/index.html",
  124. "inurl:/phpmyadmin/phpmyadmin/index.php",
  125. "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/index.html",
  126. "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/index.php",
  127. "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/index.html",
  128. "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/index.php",
  129. ]
  130.  
  131. # Function to display Lynx output and save to a file
  132. def display_and_save_results(dork, output_file):
  133. try:
  134. print(f"Searching for: {
  135. dork
  136. }")
  137.  
  138. lynx_output = subprocess.check_output(["lynx", "-dump", f```python
  139. "https://www.google.com/search?q={dork}"])
  140. decoded_output = lynx_output.decode("utf-8")
  141.  
  142. with open(output_file, "a") as file:
  143. file.write(f"Search results for: {
  144. dork
  145. }\n\n")
  146. file.write(decoded_output)
  147. file.write("\n" + "-" * 40 + "\n\n")
  148.  
  149. print("Results saved to file.\n")
  150.  
  151. except subprocess.CalledProcessError as e:
  152. print(f"Error executing Lynx for {
  153. dork
  154. }: {
  155. e
  156. }\n")
  157. except Exception as e:
  158. print(f"An error occurred while processing {
  159. dork
  160. }: {
  161. e
  162. }\n")
  163.  
  164. # Main function
  165. def main():
  166. print("Google Dork Scanner for Admin and Database Discovery")
  167. print("-" * 40)
  168.  
  169. # Create a timestamp for the output file
  170. timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
  171. output_file = f"dork_scanner_output_ {
  172. timestamp
  173. }.txt"
  174.  
  175. # Iterate over the dork list
  176. for dork in dorks:
  177. display_and_save_results(dork, output_file)
  178.  
  179. print("Scanning complete.")
  180.  
  181. if __name__ == "__main__":
  182. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement