Beispiel #1
0
$URI = substr($current_url, strlen(PMX_SITEURL), strlen($current_url) - strlen(PMX_SITEURL));
$uri = explode('/', $URI);
$saltid = substr($uri[2], 0, 8);
// 项目字符串ID
if (count($uri) < 4) {
    header('Content-Type: text/javascript; charset=utf-8');
    die("/*null*/");
}
if (strlen($uri[3]) != 50) {
    header('Content-Type: text/javascript; charset=utf-8');
    die("/*null*/");
}
$sid = $uri[3];
// XSS漏洞页字符串ID
$pmxProj = new pmxProject();
$pmxHost = new pmxHost();
if ($pmxProj->isExistSaltID($saltid) == FALSE) {
    header('Content-Type: text/javascript; charset=utf-8');
    die("/*null*/");
}
$pid = $pmxProj->getIDbySlatID($saltid);
/**
 * 判断是否第一次上线
 */
if ($pmxHost->isExistSaltID($sid) == FALSE) {
    $pmxHost->addHost($pid, $sid);
    // 添加主机
} else {
    $pmxHost->updateHost($sid);
    // 更新主机信息
}
Beispiel #2
0
<?php

/**
 * 删除主机(IP)
 */
if (!defined("PMX_ENTRANCE")) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
header('Content-Type: text/html; charset=utf-8');
if (!pmx_validate_token()) {
    die("Error: Token is incorrect.");
}
$ip = isset($_GET["ip"]) ? $_GET["ip"] : "";
$pmxHost = new pmxHost();
if (!$pmxHost->isExistIP($ip)) {
    die("Error: The IP is non-existent.");
}
if ($pmxHost->delHostIP($ip)) {
    echo esc_html("Success: You have deleted IP {$ip} successful.");
}
Beispiel #3
0
}
if (!pmx_validate_token()) {
    die("Token is incorrect.");
}
$type_allow = array("executed", "waiting");
// 允许的类型
$sid = isset($_GET["sid"]) ? $_GET["sid"] : NULL;
$type = isset($_GET["type"]) ? $_GET["type"] : NULL;
$top = isset($_GET["top"]) ? intval($_GET["top"]) : 10;
if ($sid == NULL || $type == NULL) {
    json_out(0, "sid or type couldn't be NULL.");
}
if (!in_array($type, $type_allow)) {
    json_out(0, "Type is invalid.");
}
$pmxHost = new pmxHost();
if (!$pmxHost->isExistSaltID($sid)) {
    json_out(0, "sid is non-existent.");
}
if ($type == "executed") {
    $hostExecutedLogs = $pmxHost->getExecutedLogs($sid);
    if (!count($hostExecutedLogs) > 0) {
        json_out(1, "", "<p><center>Empty</center></p>");
    }
    $html = "";
    $index = 0;
    foreach ($hostExecutedLogs as $hostExecutedLogs_item) {
        if ($index >= $top) {
            break;
        }
        $index++;
Beispiel #4
0
<?php

if (!defined("PMX_ENTRANCE")) {
    header("HTTP/1.0 404 Not Found");
    exit;
}
$id = isset($_GET['id']) ? intval($_GET['id']) : "";
$pmxHost = new pmxHost();
if (!$pmxHost->isExistID($id)) {
    die("Error: ID is non-existent");
}
$hostDetail = $pmxHost->getDetailByID($id);
pmx_require_header("Host Management");
pmx_require_nav("");
?>
<div class="main">
	<div class="main-item-single main-item-hosts-item pull-left">
		<div
			class="main-item-single-left main-item-single-host-item-tabs  pull-left">
			<ul class="nav nav-tabs host-item-tabs" role="tablist">
				<li class="hostinfo active"><a href="#">Host Info</a></li>
				<!--   <li class="logs"><a href="#">Logs</a></li>
			 <li class="cookies"><a href="#">Cookies</a></li> -->
			</ul>
			<div class="host-mgmt-item host-mgmt-item-1 host-mgmt-item-hostinfo">
				<table class="table table-condensed table-bordered">
					<tr>
						<td><b>SID</b> <a
							href="<?php 
echo pmx_getactionurl_delHostLogSID($hostDetail['sid']);
?>