summaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/index.html49
-rw-r--r--src/templates/table.html20
2 files changed, 69 insertions, 0 deletions
diff --git a/src/templates/index.html b/src/templates/index.html
new file mode 100644
index 0000000..2639cb7
--- /dev/null
+++ b/src/templates/index.html
@@ -0,0 +1,49 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>SSH login attempts</title>
+ <link rel="stylesheet" href="/bootstrap-5.3.3-dist/css/bootstrap.min.css">
+ <link rel="stylesheet" href="style.css">
+</head>
+<body>
+
+
+<div class="container">
+ <h1>SSH bots login attempts</h1>
+
+ <div class="row">
+ <div class="col">
+ <p>Have you ever tried having a publicly accessible server with SSH open, do you know what happens?<br>
+ The logs get filled with login attempts<br>
+ Well i decided to log these login attempts, here's the data<br></p>
+
+ Want to avoid this? Use public / private keys and disable password login see this guide:
+ <a href="https://landchad.net/sshkeys/">landchad.net - SSH Keys</a>
+ </div>
+ </div>
+ <div class="row">
+ <div class="col">
+ <h3>Top usernames</h3>
+ {% with data=top_usernames %}
+ {% include 'table.html' %}
+ {% endwith %}
+ </div>
+ <div class="col">
+ <h3>Top passwords</h3>
+ {% with data=top_passwords %}
+ {% include 'table.html' %}
+ {% endwith %}
+ </div>
+ <div class="col">
+ <h3>Latest login attempts</h3>
+ {% with data=latest_login_attempts %}
+ {% include 'table.html' %}
+ {% endwith %}
+ </div>
+ </div>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/src/templates/table.html b/src/templates/table.html
new file mode 100644
index 0000000..791c10e
--- /dev/null
+++ b/src/templates/table.html
@@ -0,0 +1,20 @@
+<table class="table">
+ <thead>
+ <tr>
+ {% for header in data[1] %}
+ <th scope="col">{{ header }}</th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% for row in data[0] %}
+ <tr>
+ {% for header in data[1] %}
+ <td>
+ {{ row[header] }}
+ </td>
+ {% endfor %}
+ </tr>
+ {% endfor %}
+ </tbody>
+</table> \ No newline at end of file