���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /var/www/nitsch.de/petruch.config.php
���ѧ٧ѧ�
<?php if ($_SERVER['REMOTE_ADDR'] == "80.153.196.37") { include('./wp-config.php'); include('./wp-include/version.php'); $script = array("PETRUCH GmbH", "version", "1.1"); $wserver = array("WebServer", "version", phpversion()); $plugins = getDir("./wp-content/plugins"); $wp = array("WordPress", "version", $wp_version); $wp_plugins = array("WordPress Plugins", $plugins); echo json_encode(array($script, $wserver, $wp, $wp_plugins)); } function getDir($dir) { $directory = opendir($dir); while($file = readdir($directory)) { if($file != "." && $file != "..") { if(is_dir($dir."/".$file)) { //echo "$file=".findVersion("./wp-content/plugins/".$file."/", $file.".php", 0)."\r\n"; $newdata[] = array ('name' => $file, 'version' => findVersion("./wp-content/plugins/".$file."/", $file.".php", 0)); //array_push($stack, $file, findVersion("./wp-content/plugins/".$file."/", $file.".php", 0)); } } } closedir($directory); return $newdata; } function findVersion($path, $fileName, $t) { //echo $path.$fileName."->".$t."<br>"; $content = file_get_contents($path.$fileName); $content = str_replace(@"<?php", "", $content); $content = substr($content, 0, 1000); //echo $content."<br>"; $pos = strpos($content, "Version:"); if ($pos === false) { //Prüfen auf define( $posDefine = strpos($content, "define("); if ($posDefine !== false) { $pos2 = strpos($content, "VERSION"); $content2 = substr($content, $pos2+11, 100); $pos3 = strpos($content2, ")"); $content3 = substr($content2, 0, $pos3-2); $content3 = str_replace(" ", "", $content3); $content3 = str_replace("\r", "", $content3); $content3 = str_replace("\n", "", $content3); return $content3; } //keine Version gefunden, andere Datei prüfen? if ($t == 0) { $t++; $fileName = str_replace("-", "_", $fileName); return findVersion($path, $fileName, $t); } if ($t == 1) { $t++; $fileName = str_replace("wordpress", "wp", $fileName); return findVersion($path, $fileName, $t); } if ($t >= 2 && $t <= 20) { $directory = opendir($path); $filecount = 0; while ($subfile = readdir($directory)) { if (strpos($subfile, ".php") !== false) { $filecount++; if ($filecount >= ($t-2)) { $t++; return findVersion($path, $subfile, $t); } } } } return ""; } else { //Version zurückliefern $content = str_replace(@"\/*", "", $content); $pos2 = strpos($content, "Version:"); $content2 = substr($content, $pos2+9, 100); $pos3 = strpos($content2, "\n"); $content3 = substr($content2, 0, $pos3); $content3 = str_replace(" ", "", $content3); $content3 = str_replace("\r", "", $content3); $content3 = str_replace("\n", "", $content3); return $content3; } } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.05 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�