Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python
- import subprocess
- from datetime import datetime
- # Define the dork list for admin and database discovery
- dorks = [
- "inurl:/admin",
- "inurl:/login",
- "inurl:/administrator",
- "inurl:/adminLogin",
- "inurl:/adminPanel",
- "intitle:\"phpMyAdmin\"",
- "intitle:\"Admin Login\"",
- "intitle:\"Admin Panel\"",
- "intitle:\"Login\"",
- "intext:\"Powered by PHPMyAdmin\"",
- "intext:\"Admin Login\"",
- "intext:\"Admin Panel\"",
- "intext:\"Login\"",
- "intext:\"Powered by phpMyAdmin\"",
- "inurl:/wp-admin",
- "inurl:/wp-login",
- "intitle:\"WordPress Login\"",
- "inurl:/drupal",
- "intext:\"Powered by Drupal\"",
- "inurl:/joomla",
- "intext:\"Powered by Joomla\"",
- "inurl:/phpmyadmin",
- "inurl:/dbadmin",
- "inurl:/myadmin",
- "inurl:/phpMyAdmin2",
- "inurl:/phpMyAdmin3",
- "intext:\"Welcome to phpMyAdmin\"",
- "intext:\"Welcome to phpMyAdmin 2\"",
- "intext:\"Welcome to phpMyAdmin 3\"",
- "inurl:/webadmin",
- "inurl:/siteadmin",
- "inurl:/phpmyadmin2",
- "inurl:/phpmyadmin3",
- "inurl:/phpmyadmin4",
- "intext:\"Administer your database\"",
- "intext:\"Database management system\"",
- "intext:\"MySQL administrator\"",
- "intext:\"phpMyAdmin login\"",
- "intext:\"Control Panel\"",
- "inurl:/controlpanel",
- "intext:\"cPanel Login\"",
- "inurl:/phpmyadmin/index.php",
- "intext:\"phpMyAdmin setup\"",
- "intext:\"phpMyAdmin username\"",
- "inext:\"phpMyAdmin password\"",
- "inext:\"phpMyAdmin hostname\"",
- "inurl:/phpmyadmin/config.inc.php",
- "intext:\"config file\" ext:txt",
- "inext:\"root@localhost\" intext:\"phpMyAdmin\"",
- "inurl:/administrator/index.php",
- "inurl:/admin1.php",
- "inurl:/admin1.html",
- "inurl:/login.php",
- "inurl:/login.html",
- "inurl:/login.aspx",
- "inurl:/siteadmin/index.php",
- "inurl:/siteadmin",
- "inurl:/siteadmin/login.asp",
- "inurl:/admin/controlpanel.asp",
- "inurl:/admin/login.asp",
- "inurl:/admin/index.asp",
- "inurl:/user/login",
- "inurl:/users/login",
- "inurl:/adminarea",
- "inurl:/bb-admin",
- "inurl:/wp-admin",
- "inurl:/wp-login",
- "inurl:/wp-login.php",
- "inurl:/bb-admin/login",
- "inurl:/bb-admin/admin",
- "inurl:/bb-admin/admin.html",
- "inurl:/bb-admin/admin.php",
- "inurl:/administrator/index.html",
- "inurl:/administrator/index.php",
- "inurl:/administrator/login",
- "inurl:/admin/cp.php",
- "inurl:/admin/index.html",
- "inurl:/admin/index.php",
- "inurl:/admin/admin.html",
- "inurl:/admin/admin.php",
- "inurl:/login/login.html",
- "inurl:/login/login.php",
- "inurl:/admin/account.html",
- "inurl:/admin/account.php",
- "inurl:/admin/index.html",
- "inurl:/admin/index.php",
- "inurl:/admin/admin.html",
- "inurl:/admin/admin.php",
- "inurl:/admin/login/login.html",
- "inurl:/admin/login/login.php",
- "inurl:/admin/login/admin.html",
- "inurl:/admin/login/admin.php",
- "inurl:/admin/login/account.html",
- "inurl:/admin/login/account.php",
- "inurl:/admin/cp.html",
- "inurl:/admin/cp.php",
- "inurl:/admin/home.html",
- "inurl:/admin/home.php",
- "inurl:/admin/admin/home.html",
- "inurl:/admin/admin/home.php",
- "inurl:/admin/login/home.html",
- "inurl:/admin/login/home.php",
- "inurl:/admin/login/index.html",
- "inurl:/admin/login/index.php",
- "inurl:/admin/index/home.html",
- "inurl:/admin/index/home.php",
- "inurl:/admin/index/login/index.html",
- "inurl:/admin/index/login/index.php",
- "inurl:/admin/login/home/index.html",
- "inurl:/admin/login/home/index.php",
- "inurl:/admin/index/login/index.html",
- "inurl:/admin/index/login/index.php",
- "inurl:/admin/home/index/index.html",
- "inurl:/admin/home/index/index.php",
- "inurl:/phpmyadmin/index.html",
- "inurl:/phpmyadmin/index.php",
- "inurl:/phpmyadmin/phpmyadmin/index.html",
- "inurl:/phpmyadmin/phpmyadmin/index.php",
- "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/index.html",
- "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/index.php",
- "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/index.html",
- "inurl:/phpmyadmin/phpmyadmin/phpmyadmin/phpmyadmin/index.php",
- ]
- # Function to display Lynx output and save to a file
- def display_and_save_results(dork, output_file):
- try:
- print(f"Searching for: {
- dork
- }")
- lynx_output = subprocess.check_output(["lynx", "-dump", f```python
- "https://www.google.com/search?q={dork}"])
- decoded_output = lynx_output.decode("utf-8")
- with open(output_file, "a") as file:
- file.write(f"Search results for: {
- dork
- }\n\n")
- file.write(decoded_output)
- file.write("\n" + "-" * 40 + "\n\n")
- print("Results saved to file.\n")
- except subprocess.CalledProcessError as e:
- print(f"Error executing Lynx for {
- dork
- }: {
- e
- }\n")
- except Exception as e:
- print(f"An error occurred while processing {
- dork
- }: {
- e
- }\n")
- # Main function
- def main():
- print("Google Dork Scanner for Admin and Database Discovery")
- print("-" * 40)
- # Create a timestamp for the output file
- timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
- output_file = f"dork_scanner_output_ {
- timestamp
- }.txt"
- # Iterate over the dork list
- for dork in dorks:
- display_and_save_results(dork, output_file)
- print("Scanning complete.")
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement