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:
t3chn0m4g3
2022-01-29 00:00:29 +00:00
parent 12a413b4cb
commit e6f392a098
45 changed files with 2401 additions and 344 deletions

BIN
docker/nginx/dist/html/assets/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 950 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 KiB

View 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;
}

View File

@ -0,0 +1,46 @@
// ┬ ┬┌─┐┌┬┐┌─┐
// │ │└─┐ │ └─┐
// ┴─┘┴└─┘ ┴ └─┘
// Print the first List
const printFirstList = () => {
let icon = `<i class="list__head" icon-name="${CONFIG.firstListIcon}"></i>`;
const position = 'beforeend';
list_1.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.firstList) {
// List item
let item = `
<a
target="${CONFIG.openInNewTab ? '_blank' : ''}"
href="${link.link}"
class="list__link"
>${link.name}</a
>
`;
const position = 'beforeend';
list_1.insertAdjacentHTML(position, item);
}
};
// Print the second List
const printSecondList = () => {
let icon = `<i class="list__head" icon-name="${CONFIG.secondListIcon}"></i>`;
const position = 'beforeend';
list_2.insertAdjacentHTML(position, icon);
for (const link of CONFIG.lists.secondList) {
// List item
let item = `
<a
target="${CONFIG.openInNewTab ? '_blank' : ''}"
href="${link.link}"
class="list__link"
>${link.name}</a
>
`;
const position = 'beforeend';
list_2.insertAdjacentHTML(position, item);
}
};
printFirstList();
printSecondList();

View File

@ -0,0 +1,7 @@
// ┌┬┐┬ ┬┌─┐┌┬┐┌─┐
// │ ├─┤├┤ │││├┤
// ┴ ┴ ┴└─┘┴ ┴└─┘
if (CONFIG.imageBackground) {
document.body.classList.add('withImageBackground');
}

View File

@ -0,0 +1,36 @@
// ┌┬┐┬┌┬┐┌─┐
// │ ││││├┤
// ┴ ┴┴ ┴└─┘
window.onload = displayClock();
// Clock function
function displayClock() {
const monthNames = [
'Jan',
'Feb',
'Mar',
'Apr',
'May',
'Jun',
'Jul',
'Aug',
'Sep',
'Oct',
'Nov',
'Dec',
];
// Get clock elements
var d = new Date();
var mm = monthNames[d.getMonth()];
var dd = d.getDate();
var min = (mins = ('0' + d.getMinutes()).slice(-2));
var hh = d.getHours();
var ampm = '';
// Display clock elements
document.getElementById('hour').innerText = hh;
document.getElementById('separator').innerHTML = ' : ';
document.getElementById('minutes').innerText = min + ampm;
setTimeout(displayClock, 1000);
}