Added display and API for SSH fingerprints

This commit is contained in:
2023-09-29 02:15:06 -04:00
parent 8649c75eac
commit 89928841bc
10 changed files with 257 additions and 148 deletions

14
index.php Normal file → Executable file
View File

@@ -1,3 +1,4 @@
<!DOCTYPE html>
<HTML lang="en">
<Head>
<Title>HackersTown Server Access</Title>
@@ -8,6 +9,7 @@
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/color/jquery.color.plus-names-2.1.2.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.all.min.js" crossorigin="anonymous"></script>
<script src="/fittext.js"></script>
<script src="/index.js"></script>
<!-- Stylesheets -->
@@ -19,7 +21,11 @@
<div class="desktopOnly col-4"></div>
<div id="content" class="col-4 center">
<div class="row">
<a href="https://hackers.town">
<?php if(file_exists("/var/www/usergen/DOMAIN_OVERRIDE")){
echo "<a href=\"".str_replace("\n", "", file_get_contents("/var/www/usergen/DOMAIN_OVERRIDE"))."\">";
}else{
echo "<a href=\"https://hackers.town\">";
}?>
<img src="/Assets/HTown.png" class="logo self-align-center mx-auto d-block" alt="Hacker Town logo in ASCII art. Rendered as image to force correct visualization."/>
</a>
</div>
@@ -32,16 +38,18 @@
<button id="bttn" class="keyButton" onclick="beginOauth()">Create Account</button>
</div>
<div class="row copyright">
<?php
<?php
if (file_exists("/etc/ttyserver/canary")){
echo "Canary";
}
?>
<br>
<button class="footerbutton" onclick="displayFingerprints()">SSH Fingerprints</button>
<br>
<a href="https://git.corrupt.link/liz/tilde-oauth">View Source on Git</a>
</div>
</div>
<div class="desktopOnly col-4"></div>
</div>
</Body>
</HTML>
</HTML>