-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
190 lines (177 loc) · 7.58 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cyber Attack Map</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="/static/css/style.css" />
</head>
<body>
<!-- Loading modal -->
<div id="loadingModal" class="loading-modal">
<div class="loading-modal-content">
<p><ion-icon name="refresh-outline" class="rotate"></ion-icon> Loading map data, please wait...</p>
</div>
</div>
<!-- The map will be added here -->
<div id="map"></div>
<!-- Menylinje i toppen av kartet -->
<div class="table-controls">
<button id="toggle-table-btn" class="toggle-table-btn">
<ion-icon name="refresh-outline" class="rotate"></ion-icon> Realtime log
</button>
<label>
<input type="checkbox" id="autoscroll-checkbox" checked> Auto-scroll
</label>
<button id="top-talkers-btn" class="toggle-table-btn">
<ion-icon name="podium-outline"></ion-icon> Top 10
</button>
<button id="dashboard-btn" class="menu-btn">
<ion-icon name="grid-outline"></ion-icon> Dashboard
</button>
<button id="settings-btn" class="menu-btn">
<ion-icon name="settings-outline"></ion-icon> Settings
</button>
<button id="stats-reports-btn" class="menu-btn">
<ion-icon name="analytics-outline"></ion-icon> Stats & Reports
</button>
<input type="text" id="search-input" placeholder="Search..." />
<!-- WebSocket statusindikatorer -->
<div class="status-indicators">
<span id="ws-connected" class="status-icon green">
<ion-icon name="flash-outline"></ion-icon>
</span>
<span id="ws-disconnected" class="status-icon red hidden">
<ion-icon name="flash-off-outline"></ion-icon>
</span>
<span id="ws-clients" class="status-icon">
<ion-icon name="desktop-outline"></ion-icon>
<span id="client-count" class="badge">0</span>
</span>
</div>
</div>
<!-- Modal for å vise tilkoblede klienter -->
<div id="client-modal" class="modal hidden">
<div class="modal-content">
<span class="close" id="close-client-modal">×</span>
<h3>Connected Clients</h3>
<ul id="client-list"></ul>
</div>
</div>
<!-- Modal for attacker information -->
<div id="attacker-modal" class="modal">
<div class="modal-content">
<span class="close" id="close-attacker-modal">×</span>
<h2>Attacker Information</h2>
<!-- Tabs for different sections -->
<div class="tabs">
<button class="tablinks active" onclick="openTab(event, 'Overview')">
<ion-icon name="information-circle-outline"></ion-icon> Overview
</button>
<button class="tablinks" onclick="openTab(event, 'Logs')">
<ion-icon name="document-text-outline"></ion-icon> Logs
</button>
<button class="tablinks" onclick="openTab(event, 'Analysis')">
<ion-icon name="analytics-outline"></ion-icon> Analysis
</button>
<button class="tablinks" onclick="openTab(event, 'Actions')">
<ion-icon name="construct-outline"></ion-icon> Actions
</button>
</div>
<!-- Overview Tab Content -->
<div id="Overview" class="tabcontent">
<div class="overview-content">
<div class="graph">
<!-- Placeholder for graph -->
<canvas id="attackGraph"></canvas>
</div>
<div class="details">
<p><strong>IP Address:</strong> <span id="ip-address"></span></p>
<p><strong>Hostname:</strong> <span id="hostname"></span></p>
<p><strong>First Observed:</strong> <span id="first-observed"></span></p>
<p><strong>Last Observed:</strong> <span id="last-observed"></span></p>
<p><strong>Total Attempts:</strong> <span id="total-attempts"></span></p>
</div>
</div>
</div>
<!-- Logs Tab Content -->
<div id="Logs" class="tabcontent" style="display:none;">
<h3>Detailed Log</h3>
<table id="log-table">
<thead>
<tr>
<th>Timestamp</th>
<th>Event</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<!-- Log entries will be dynamically added here -->
</tbody>
</table>
</div>
<!-- Analysis Tab Content -->
<div id="Analysis" class="tabcontent" style="display:none;">
<h3>Attack Analysis</h3>
<p>Type of Attack: <span id="attack-type"></span></p>
<p>Likelihood of Success: <span id="attack-likelihood"></span></p>
<p>Known Vulnerabilities: <span id="known-vulnerabilities"></span></p>
</div>
<!-- Actions Tab Content -->
<div id="Actions" class="tabcontent" style="display:none;">
<h3>Take Action</h3>
<button id="whois-btn">WHOIS Lookup</button>
<button id="portscan-btn">Port Scan</button>
<button id="os-detection-btn">OS Detection</button>
</div>
</div>
</div>
<!-- Table for Top 10 attackers -->
<div class="top-attackers-controls">
<h3>Top 10 Attackers</h3>
<table class="top-attackers-table">
<thead>
<tr>
<th>Flag</th>
<th>Source IP</th>
<th>Count</th>
<th>Country</th>
<th>City</th>
<th>Org</th>
</tr>
</thead>
<tbody id="top-talkers-table-body">
<!-- Rows will be added here dynamically -->
</tbody>
</table>
</div>
<!-- Tabell for å vise angrepsinformasjon i sanntid -->
<div class="attack-table-container" id="attack-table-container">
<table>
<thead>
<tr>
<th>Flag</th>
<th>Time</th>
<th>IP</th>
<th>Port</th>
<th>Country</th>
<th>City</th>
<th>Org</th>
</tr>
</thead>
<tbody id="attack-table-body">
<!-- Attack info will be added here dynamically -->
</tbody>
</table>
</div>
<!-- Inkluder eksterne og lokale skript -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<script src="/static/js/map.js"></script>
<script src="/static/js/app.js"></script>
<script src="/static/js/modals.js"></script>
<script src="/static/js/websocket.js"></script>
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
</body>
</html>