bonekcok21

phpMyAdmin Checker

Aug 14th, 2016
1,257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.88 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # phpMyAdmin Checker
  3. # Author: cha0x <[email protected]>
  4. # ./mekiTembem404 - TCA Team
  5.  
  6.  
  7. use strict;
  8. use warnings;
  9. use LWP::UserAgent;
  10. use HTTP::Request;
  11.  
  12. my ($add,$iplist,$url,@path,@raw_data);
  13.  
  14. print q(
  15.    
  16.     phpMyAdmin Checker by cha0x
  17.        <cha0x@darkc0de.com>
  18.        
  19. );
  20.  
  21. if(@ARGV !=1) {
  22. print "Usage: perl phpmyadmin.pl <IP/URL LIST> e.g. perl phpmyadmin.pl iplist.txt";
  23. exit;
  24. }
  25.  
  26. $iplist = shift;
  27.  
  28. @path = (
  29. "/phpMyAdmin/",
  30. "/PMA/",
  31. "/admin/",
  32. "/dbadmin/",
  33. "/mysql/",
  34. "/myadmin/",
  35. "/phpmyadmin2/",
  36. "/phpMyAdmin2/",
  37. "/phpMyAdmin-2/",
  38. "/php-my-admin/",
  39. "/phpMyAdmin-2.2.3/",
  40. "/phpMyAdmin-2.2.6/",
  41. "/phpMyAdmin-2.5.1/",
  42. "/phpMyAdmin-2.5.4/",
  43. "/phpMyAdmin-2.5.5-rc1/",
  44. "/phpMyAdmin-2.5.5-rc2/",
  45. "/phpMyAdmin-2.5.5/",
  46. "/phpMyAdmin-2.5.5-pl1/",
  47. "/phpMyAdmin-2.5.6-rc1/",
  48. "/phpMyAdmin-2.5.6-rc2/",
  49. "/phpMyAdmin-2.5.6/",
  50. "/phpMyAdmin-2.5.7/",
  51. "/phpMyAdmin-2.5.7-pl1/",
  52. "/phpMyAdmin-2.6.0-alpha/",
  53. "/phpMyAdmin-2.6.0-alpha2/",
  54. "/phpMyAdmin-2.6.0-beta1/",
  55. "/phpMyAdmin-2.6.0-beta2/",
  56. "/phpMyAdmin-2.6.0-rc1/",
  57. "/phpMyAdmin-2.6.0-rc2/",
  58. "/phpMyAdmin-2.6.0-rc3/",
  59. "/phpMyAdmin-2.6.0/",
  60. "/phpMyAdmin-2.6.0-pl1/",
  61. "/phpMyAdmin-2.6.0-pl2/",
  62. "/phpMyAdmin-2.6.0-pl3/",
  63. "/phpMyAdmin-2.6.1-rc1/",
  64. "/phpMyAdmin-2.6.1-rc2/",
  65. "/phpMyAdmin-2.6.1/",
  66. "/phpMyAdmin-2.6.1-pl1/",
  67. "/phpMyAdmin-2.6.1-pl2/",
  68. "/phpMyAdmin-2.6.1-pl3/",
  69. "/phpMyAdmin-2.6.2-rc1/",
  70. "/phpMyAdmin-2.6.2-beta1/",
  71. "/phpMyAdmin-2.6.2-rc1/",
  72. "/phpMyAdmin-2.6.2/",
  73. "/phpMyAdmin-2.6.2-pl1/",
  74. "/phpMyAdmin-2.6.3/",
  75. "/phpMyAdmin-2.6.3-rc1/",
  76. "/phpMyAdmin-2.6.3/",
  77. "/phpMyAdmin-2.6.3-pl1/",
  78. "/phpMyAdmin-2.6.4-rc1/",
  79. "/phpMyAdmin-2.6.4-pl1/",
  80. "/phpMyAdmin-2.6.4-pl2/",
  81. "/phpMyAdmin-2.6.4-pl3/",
  82. "/phpMyAdmin-2.6.4-pl4/",
  83. "/phpMyAdmin-2.6.4/",
  84. "/phpMyAdmin-2.7.0-beta1/",
  85. "/phpMyAdmin-2.7.0-rc1/",
  86. "/phpMyAdmin-2.7.0-pl1/",
  87. "/phpMyAdmin-2.7.0-pl2/",
  88. "/phpMyAdmin-2.7.0/",
  89. "/phpMyAdmin-2.8.0-beta1/",
  90. "/phpMyAdmin-2.8.0-rc1/",
  91. "/phpMyAdmin-2.8.0-rc2/",
  92. "/phpMyAdmin-2.8.0/",
  93. "/phpMyAdmin-2.8.0.1/",
  94. "/phpMyAdmin-2.8.0.2/",
  95. "/phpMyAdmin-2.8.0.3/",
  96. "/phpMyAdmin-2.8.0.4/",
  97. "/phpMyAdmin-2.8.1-rc1/",
  98. "/phpMyAdmin-2.8.1/",
  99. "/phpMyAdmin-2.8.2/",
  100. "/sqlmanager/",
  101. "/mysqlmanager/",
  102. "/p/m/a/",
  103. "/PMA2005/",
  104. "/pma2005/",
  105. "/phpmanager/",
  106. "/php-myadmin/",
  107. "/phpmy-admin/",
  108. "/webadmin/",
  109. "/sqlweb/",
  110. "/websql/",
  111. "/webdb/",
  112. "/mysqladmin/",
  113. "/mysql-admin/");
  114.  
  115. open(IPLIST, $iplist) || die "[x] Error: File not found\n";  
  116. @raw_data=<IPLIST>;
  117. close(IPLIST);
  118.  
  119. print "[i] Scan Started\n\n";
  120.  
  121. foreach $url (@raw_data)
  122. {
  123.     chomp($url);
  124.     foreach $add (@path)
  125.     {
  126.         my $address = $url.$add;
  127.         my $con = HTTP::Request->new(GET=>$address);
  128.         my $useragent = LWP::UserAgent->new;
  129.         my $f = $useragent->request($con);
  130.  
  131.         if($f->is_success && $f->status_line =~ /200/)
  132.         {
  133.             print "[!] Found: $address\n"; 
  134.            
  135.             open (F,">>","found.txt");
  136.             print F "$address\n";
  137.             close(F);
  138.         }
  139.     }
  140. }
Advertisement
Add Comment
Please, Sign In to add comment