tiamat/cmd/templates/index.html

75 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<title>Tiamat Dashboard</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/style.css" rel="stylesheet">
<script src="https://unpkg.com/htmx.org@1.9.12"
integrity="sha384-ujb1lZYygJmzgSwoxRggbCHcjc0rB2XoQrxeTUQyRjrOnlCoYta87iKBWq3EsdM2"
crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div id="main">
<b>
<ul>
<li class="hor">
<p><a href="/">Home</a></p>
</li>
<li class="hor">
<p><a href="https://git.bulgariu.xyz/raul/tiamat" target="_blank">Source code</a></p>
</li>
<li class="hor">
<p><a href="/dump" target="_blank">Dump clients</a></p>
</li>
</ul>
</b>
<hr>
<h2 align=center>Current clients</h2>
{{ range .Clients }}
<table border=1>
<tr>
<td>ID</td>
<td>Status</td>
<td>IP</td>
<td>Username</td>
<td>Hostname</td>
<td>Operating System</td>
<td rowspan=2>
<a target="_blank" href="command/{{ .ClientID }}"><b>CMD</b></a>
</td>
<td rowspan=2>
<a href="/" hx-post="kill/{{ .ClientID }}" hx-swap="none" id="pointer"><b>KILL</b></a>
</td>
</tr>
<tr>
<td>{{ .ClientID }}</td>
<td>
{{ if .IsOnline }}
<on>
OK
</on>
{{ else }}
<off>
Offline
</off>
{{ end }}
</td>
<td>{{ .ClientBasicInfo.PublicIP }}</td>
<td>{{ .ClientBasicInfo.Username }}</td>
<td>{{ .ClientBasicInfo.Hostname }}</td>
<td>{{ .ClientBasicInfo.OperatingSystem }}</td>
</tr>
</table>
<hr>
{{ end }}
</div>
</div>
</body>
</html>