mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
Tweaking
Finalize qhoneypots config, thanks to @giga-a for native JSON logging! Completely rework T-Pot Landing Page based on Bento (https://github.com/migueravila/Bento). New NGINX image is down by 100MB and only uses 3.3 MB of RAM at runtime. Keep legacy Sensor option (without logstash).
This commit is contained in:
27
docker/nginx/dist/html/assets/js/greeting.js
vendored
Normal file
27
docker/nginx/dist/html/assets/js/greeting.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
// ┌─┐┬─┐┌─┐┌─┐┌┬┐┬┌┐┌┌─┐┌─┐
|
||||
// │ ┬├┬┘├┤ ├┤ │ │││││ ┬└─┐
|
||||
// └─┘┴└─└─┘└─┘ ┴ ┴┘└┘└─┘└─┘
|
||||
|
||||
// Get the hour
|
||||
const today = new Date();
|
||||
const hour = today.getHours();
|
||||
|
||||
// Here you can change your name
|
||||
const name = CONFIG.name;
|
||||
|
||||
// Here you can change your greetings
|
||||
const gree1 = `${CONFIG.greetingNight}\xa0`;
|
||||
const gree2 = `${CONFIG.greetingMorning}\xa0`;
|
||||
const gree3 = `${CONFIG.greetingAfternoon}\xa0`;
|
||||
const gree4 = `${CONFIG.greetingEvening}\xa0`;
|
||||
|
||||
// Define the hours of the greetings
|
||||
if (hour >= 23 || hour < 5) {
|
||||
document.getElementById('greetings').innerText = gree1;
|
||||
} else if (hour >= 6 && hour < 12) {
|
||||
document.getElementById('greetings').innerText = gree2;
|
||||
} else if (hour >= 12 && hour < 17) {
|
||||
document.getElementById('greetings').innerText = gree3;
|
||||
} else {
|
||||
document.getElementById('greetings').innerText = gree4;
|
||||
}
|
Reference in New Issue
Block a user