167 lines
5.5 KiB
HTML
167 lines
5.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>⚠️ Accesso bloccato - Pagina phishing riconosciuta</title>
|
|
<meta name="description" content="L'accesso al dominio è stato bloccato dal sistema anti-phishing BastionGuard per proteggere i tuoi dati sensibili.">
|
|
<meta name="robots" content="noindex,nofollow">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
|
<style>
|
|
body {
|
|
background: linear-gradient(135deg, #ff6f61, #d6a4a4);
|
|
color: #fff;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
margin: 0;
|
|
text-align: center;
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
}
|
|
.error-container {
|
|
background: rgba(0, 0, 0, 0.55);
|
|
border-radius: 15px;
|
|
padding: 3rem 2rem;
|
|
max-width: 720px;
|
|
box-shadow: 0 0 20px rgba(0,0,0,0.4);
|
|
}
|
|
.error-title {
|
|
font-size: 2.2rem;
|
|
font-weight: 700;
|
|
margin-bottom: 1.2rem;
|
|
}
|
|
.error-message {
|
|
font-size: 1.15rem;
|
|
margin-bottom: 1.6rem;
|
|
line-height: 1.5;
|
|
}
|
|
.btn-danger {
|
|
background-color: #ff6f61;
|
|
border: none;
|
|
}
|
|
.btn-danger:hover {
|
|
background-color: #d9534f;
|
|
}
|
|
.btn-outline-light {
|
|
border-width: 2px;
|
|
}
|
|
.muted-small { font-size: .9rem; opacity: .85; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="error-container" id="blockpage" role="main" aria-labelledby="err_title">
|
|
<div class="error-title" id="err_title">⚠️ Sito bloccato per phishing</div>
|
|
|
|
<div class="error-message" id="msg">
|
|
L'accesso al dominio <strong><i id="domain_text">— dominio —</i></strong> è stato
|
|
<b>bloccato</b> dal sistema anti-phishing di BastionGuard.<br>
|
|
Questo sito potrebbe tentare di rubare dati sensibili (password, carte di credito, ecc.).
|
|
</div>
|
|
|
|
<div class="d-flex flex-column gap-3">
|
|
<a href="about:blank" class="btn btn-outline-light btn-lg w-100" role="button" aria-label="Torna al sicuro">🔒 Torna al sicuro</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<p class="mt-4 mb-0 text-light muted-small">
|
|
Sistema anti-phishing BastionGuard — protezione attiva
|
|
</p>
|
|
</div>
|
|
|
|
<script>
|
|
(function() {
|
|
// helper: read ?domain=... from querystring
|
|
function getQueryParam(name) {
|
|
try {
|
|
const u = new URL(window.location.href);
|
|
return u.searchParams.get(name) || '';
|
|
} catch (e) { return ''; }
|
|
}
|
|
|
|
// try to obtain a sensible domain to display:
|
|
// priority: ?domain= -> location.hostname -> document.referrer host -> "dominio sconosciuto"
|
|
var domain = '';
|
|
domain = getQueryParam('domain') || domain;
|
|
|
|
// location.hostname is normally the value in the browser address bar (original host)
|
|
try {
|
|
if (!domain && window.location && window.location.hostname) {
|
|
domain = window.location.hostname;
|
|
}
|
|
} catch(e) {}
|
|
|
|
// fallback to parsing referrer (if present)
|
|
try {
|
|
if (!domain && document.referrer) {
|
|
try {
|
|
var r = new URL(document.referrer);
|
|
domain = r.hostname || domain;
|
|
} catch(e) { /* ignore */ }
|
|
}
|
|
} catch(e) {}
|
|
|
|
if (!domain) domain = 'dominio sconosciuto';
|
|
|
|
// sanitize just in case: keep only common hostname chars
|
|
domain = domain.toString().trim().replace(/[^A-Za-z0-9\.\-:_]/g, '');
|
|
|
|
// inject into page
|
|
var el = document.getElementById('domain_text');
|
|
if (el) el.textContent = domain;
|
|
var titleDomain = document.getElementById('page_title_domain');
|
|
if (titleDomain) titleDomain.textContent = domain;
|
|
// also update <title> for UA that reads it
|
|
try {
|
|
if (document.title && document.title.indexOf('{{') !== -1) {
|
|
document.title = '⚠️ Accesso bloccato - ' + domain;
|
|
}
|
|
} catch(e){}
|
|
|
|
// Build continue href if server left placeholders or didn't provide valid data
|
|
try {
|
|
var btn = document.getElementById('continue_btn');
|
|
if (!btn) return;
|
|
|
|
var href = btn.getAttribute('href') || '';
|
|
var hasPlaceholderHref = href.indexOf('{{') !== -1;
|
|
|
|
var dataTarget = btn.dataset.target || '';
|
|
var dataEvent = btn.dataset.event || '';
|
|
|
|
// choose a target: prefer dataset.target (if valid), otherwise the detected domain
|
|
var targetVal = (dataTarget && dataTarget.indexOf('{{') === -1) ? dataTarget : domain;
|
|
if (!targetVal) {
|
|
btn.classList.add('disabled');
|
|
btn.setAttribute('aria-disabled', 'true');
|
|
btn.href = 'about:blank';
|
|
return;
|
|
}
|
|
|
|
// if server already provided a concrete href (no placeholders), keep it
|
|
if (!hasPlaceholderHref) {
|
|
return;
|
|
}
|
|
|
|
// build a safe relative continue URL handled by local warning server:
|
|
// /continue?target=<encoded>&event=<encoded>
|
|
function e(s) { return encodeURIComponent(s); }
|
|
var built = '/continue?target=' + e(targetVal);
|
|
if (dataEvent && dataEvent.indexOf('{{') === -1) {
|
|
built += '&event=' + e(dataEvent);
|
|
}
|
|
|
|
// Set the href to the safe relative URL. If you prefer absolute to 127.0.0.1 use:
|
|
// btn.href = 'http://127.0.0.1:81' + built; // <-- only if your local warning server listens on :81
|
|
btn.href = built;
|
|
|
|
} catch (e) {
|
|
// don't break the page on JS errors
|
|
console && console.warn && console.warn("block page script error", e);
|
|
}
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|