added DNS resolver
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
/* Smarty version 5.4.2, created on 2024-12-17 20:54:57
|
||||
/* Smarty version 5.4.2, created on 2024-12-18 17:31:55
|
||||
from 'file:index.tpl' */
|
||||
|
||||
/* @var \Smarty\Template $_smarty_tpl */
|
||||
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
'version' => '5.4.2',
|
||||
'unifunc' => 'content_6761e5219d7cf3_55254235',
|
||||
'unifunc' => 'content_6763070bd6f6f3_73946052',
|
||||
'has_nocache_code' => false,
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'affb24851ed623b62affa076808377b28b01c478' =>
|
||||
array (
|
||||
0 => 'index.tpl',
|
||||
1 => 1734468879,
|
||||
1 => 1734543111,
|
||||
2 => 'file',
|
||||
),
|
||||
),
|
||||
@@ -20,7 +20,7 @@ if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
||||
array (
|
||||
),
|
||||
))) {
|
||||
function content_6761e5219d7cf3_55254235 (\Smarty\Template $_smarty_tpl) {
|
||||
function content_6763070bd6f6f3_73946052 (\Smarty\Template $_smarty_tpl) {
|
||||
$_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
?><!DOCTYPE html>
|
||||
|
||||
@@ -76,26 +76,28 @@ $_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
<a class="btn text-light" onclick="initializeTable('latest_requests');">Latest</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('count_requests_by_ip');">Top by IP</a>
|
||||
<a class="btn text-light" onclick="initializeTable('count_requests_by_ip');">Top by
|
||||
IP</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('count_requests_by_ua');">Top by UA</a>
|
||||
<a class="btn text-light" onclick="initializeTable('count_requests_by_ua');">Top by
|
||||
UA</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_ua_path');">IP+UA+Path</a>
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_ua_path');">IP+UA+Path</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_by_load');">IP+Load</a>
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_by_load');">IP+Load</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_by_rps');">IP+RPS</a>
|
||||
<a class="btn text-light" onclick="initializeTable('top_ip_by_rps');">IP+RPS</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="btn text-light" onclick="initializeTable('top_net_28_by_rps');">IP+RPS</a>
|
||||
<a class="btn text-light" onclick="initializeTable('top_net_28_by_rps');">IP+RPS</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -138,7 +140,7 @@ $_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
<div class="input-group">
|
||||
<div class="input-group-text">From</div>
|
||||
|
||||
<input type="datetime-local" id="date-from" name="date-from" class="form-control mr-3" >
|
||||
<input type="datetime-local" id="date-from" name="date-from" class="form-control mr-3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
@@ -162,7 +164,7 @@ $_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
document.getElementById('date-from').addEventListener('change', refreshTable);
|
||||
|
||||
|
||||
document.getElementById('limit').addEventListener('change', refreshTable);
|
||||
|
||||
function refreshTable() {
|
||||
@@ -182,7 +184,7 @@ $_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
dateFrom.value = yesterday.toISOString().slice(0, 16);
|
||||
dateTo.value = tomorrow.toISOString().slice(0, 16);
|
||||
};
|
||||
document.getElementById('date-to').addEventListener('change', refreshTable);
|
||||
document.getElementById('date-to').addEventListener('change', refreshTable);
|
||||
|
||||
|
||||
function initializeTable(latest_requests) {
|
||||
@@ -297,6 +299,70 @@ $_smarty_current_dir = '/home/l/public_html/xbotcontrol/smarty/template';
|
||||
}
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<?php echo '<script'; ?>
|
||||
>
|
||||
function ipFormatter(value) {
|
||||
return `<span class="ip-address" data-ip="${value}">${value}</span>`;
|
||||
}
|
||||
|
||||
document.addEventListener('mouseover', async (event) => {
|
||||
const target = event.target;
|
||||
if (target.classList.contains('ip-address')) {
|
||||
const ipAddress = target.getAttribute('data-ip');
|
||||
const popupId = `popup-${ipAddress.replace(/\./g, '-')}`;
|
||||
let popup = document.getElementById(popupId);
|
||||
|
||||
if (!popup) {
|
||||
popup = document.createElement('div');
|
||||
popup.id = popupId;
|
||||
popup.style.position = 'absolute';
|
||||
popup.style.background = '#f9f9f9';
|
||||
popup.style.border = '1px solid #ccc';
|
||||
popup.style.padding = '10px';
|
||||
popup.style.borderRadius = '5px';
|
||||
popup.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.2)';
|
||||
popup.style.zIndex = '1000';
|
||||
popup.style.whiteSpace = 'nowrap';
|
||||
popup.style.display = 'none';
|
||||
document.body.appendChild(popup);
|
||||
|
||||
fetch(location.pathname + `/api/ipinfo/${ipAddress}`)
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
const location = data.geo.continent?.names?.en + ' > ' + data.geo.country
|
||||
?.names?.en + ' > ' + data.geo.city?.names?.en || 'Unknown';
|
||||
const reverseDns = data.reverse_dns || 'N/A';
|
||||
popup.innerHTML = `
|
||||
<strong>Location:</strong> ${location}<br>
|
||||
<strong>Reverse DNS:</strong> ${reverseDns}
|
||||
`;
|
||||
})
|
||||
.catch(() => {
|
||||
popup.innerHTML = 'Error fetching data.';
|
||||
});
|
||||
}
|
||||
|
||||
popup.style.display = 'block';
|
||||
popup.style.left = `${event.pageX + 10}px`;
|
||||
popup.style.top = `${event.pageY + 10}px`;
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener('mouseout', (event) => {
|
||||
const target = event.target;
|
||||
if (target.classList.contains('ip-address')) {
|
||||
const ipAddress = target.getAttribute('data-ip');
|
||||
const popupId = `popup-${ipAddress.replace(/\./g, '-')}`;
|
||||
const popup = document.getElementById(popupId);
|
||||
if (popup) {
|
||||
popup.style.display = 'none';
|
||||
}
|
||||
}
|
||||
});
|
||||
<?php echo '</script'; ?>
|
||||
>
|
||||
|
||||
<footer class="centro-blue text-white text-center py-3">
|
||||
<div class="footer">
|
||||
<div class="container text-center centro-blue text-light">
|
||||
|
||||
Reference in New Issue
Block a user