360 lines
14 KiB
HTML
360 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>403 Forbidden</title>
|
|
<style>
|
|
body {
|
|
font-family: 'Microsoft YaHei', sans-serif;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f9f9f9;
|
|
color: #333;
|
|
}
|
|
|
|
.container {
|
|
max-width: 800px;
|
|
margin: 50px auto;
|
|
padding: 30px;
|
|
background-color: #fff;
|
|
border-radius: 8px;
|
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
h1 {
|
|
color: #e74c3c;
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
border-bottom: 2px solid #f1c40f;
|
|
padding-bottom: 10px;
|
|
}
|
|
|
|
.notice {
|
|
background-color: #f8f9fa;
|
|
border-left: 4px solid #3498db;
|
|
padding: 15px;
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.warning {
|
|
background-color: #fffcf2;
|
|
padding: 15px;
|
|
border-left: 4px solid #ffc107;
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.error {
|
|
background-color: #f2dede;
|
|
padding: 15px;
|
|
border-left: 4px solid #c73c3a;
|
|
margin-bottom: 20px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.theme-content {
|
|
margin-top: 30px;
|
|
}
|
|
|
|
.theme-content h2 {
|
|
color: #2c3e50;
|
|
margin-top: 25px;
|
|
}
|
|
|
|
.theme-content p {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
margin-top: 40px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #eee;
|
|
color: #7f8c8d;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.highlight {
|
|
background-color: #fffde7;
|
|
padding: 2px 5px;
|
|
border-radius: 3px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="container">
|
|
<div style="text-align: center;">
|
|
<h1>⛔ 403 Forbidden</h1>
|
|
</div>
|
|
<div class="error">
|
|
<p>
|
|
服务器已拒绝您对当前 URL 的访问请求。<br>
|
|
您应当通过我们的官方域名
|
|
<span class="highlight">www.gvsds.com</span>
|
|
访问网站,而非当前使用的
|
|
<span class="highlight" id="current-host"> [HostName] </span>
|
|
<br>
|
|
出于安全考虑,我们已启用host白名单策略。
|
|
</p>
|
|
</div>
|
|
<div class="warning">
|
|
<p>
|
|
错误代码:
|
|
<span class="highlight" id="violated-rule"></span>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="notice">
|
|
<div class="request-section">
|
|
<h4>请求基本信息</h4>
|
|
<table class="request-table">
|
|
<tbody>
|
|
<tr>
|
|
<td class="request-key">请求URL</td>
|
|
<td class="request-value" id="request-url">[正在加载...]</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="request-key">请求方法</td>
|
|
<td class="request-value" id="request-method">[正在加载...]</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="request-key">协议版本</td>
|
|
<td class="request-value" id="request-protocol">[正在加载...]</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="request-key">请求时间</td>
|
|
<td class="request-value" id="request-time">[正在加载...]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="request-section">
|
|
<h4>请求头 (Headers)</h4>
|
|
<table class="request-table" id="request-headers-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Header名称</th>
|
|
<th>值</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
<div class="request-section">
|
|
<h4>查询参数 (Query Args)</h4>
|
|
<table class="request-table" id="request-args-table">
|
|
<thead>
|
|
<tr>
|
|
<th>参数名</th>
|
|
<th>值</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
<div class="request-section">
|
|
<h4>客户端信息</h4>
|
|
<table class="request-table" id="client-info-table">
|
|
<tbody></tbody>
|
|
</table>
|
|
</div>
|
|
<div class="request-section">
|
|
<h4>服务器信息</h4>
|
|
<table class="request-table" id="server-info-table">
|
|
<tbody>
|
|
<tr>
|
|
<td class="request-key">服务器名称</td>
|
|
<td class="request-value">GVSDS Web Server</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="request-key">安全策略</td>
|
|
<td class="request-value">Host白名单验证</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="request-key">拒绝原因</td>
|
|
<td class="request-value" id="reject-reason">[正在加载...]</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>银河锋锐软件开发工作室 © 2025 | 实际网站: <a href="https://www.gvsds.com">https://www.gvsds.com</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
// Automatically display the current hostname and detect rule violation
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
|
|
// Display current hostname
|
|
const currentHostElement = document.getElementById('current-host');
|
|
currentHostElement.textContent = window.location.hostname;
|
|
|
|
// Detect likely rule violation (simplified example)
|
|
const violatedRuleElement = document.getElementById('violated-rule');
|
|
const officialDomain = 'www.gvsds.com';
|
|
let rejectReason = '';
|
|
|
|
if (window.location.hostname !== officialDomain) {
|
|
violatedRuleElement.textContent = '1';
|
|
violatedRuleElement.title = '域名白名单规则';
|
|
rejectReason = '访问域名不在白名单中';
|
|
} else if (window.location.protocol !== 'https:') {
|
|
violatedRuleElement.textContent = '3';
|
|
violatedRuleElement.title = 'HTTPS强制规则';
|
|
rejectReason = '非HTTPS安全连接';
|
|
} else {
|
|
violatedRuleElement.textContent = '2';
|
|
violatedRuleElement.title = 'IP4检查'
|
|
rejectReason = '您的IP处于黑名单中';
|
|
}
|
|
|
|
document.getElementById('reject-reason').textContent = rejectReason;
|
|
|
|
// Additional security logging (example)
|
|
console.warn('Security Alert: Unauthorized domain access attempt from', window.location.hostname);
|
|
|
|
// 填充高级信息表格
|
|
fillAdvancedTables();
|
|
});
|
|
|
|
// 可折叠面板功能
|
|
const coll = document.getElementsByClassName("collapsible");
|
|
for (let i = 0; i < coll.length; i++) {
|
|
coll[i].addEventListener("click", function () {
|
|
this.classList.toggle("active");
|
|
const content = this.nextElementSibling;
|
|
if (content.style.maxHeight) {
|
|
content.style.maxHeight = null;
|
|
} else {
|
|
content.style.maxHeight = content.scrollHeight + "px";
|
|
}
|
|
});
|
|
}
|
|
|
|
// 填充高级信息表格
|
|
function fillAdvancedTables() {
|
|
// 请求基本信息
|
|
document.getElementById('request-url').textContent = window.location.href;
|
|
document.getElementById('request-method').textContent = 'GET';
|
|
document.getElementById('request-protocol').textContent = 'HTTP/1.1';
|
|
document.getElementById('request-time').textContent = new Date().toLocaleString();
|
|
|
|
// 请求头表格
|
|
const headersTable = document.getElementById('request-headers-table').getElementsByTagName('tbody')[0];
|
|
const headers = {
|
|
'Host': window.location.hostname,
|
|
'User-Agent': navigator.userAgent,
|
|
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
|
'Accept-Language': navigator.language,
|
|
'Accept-Encoding': 'gzip, deflate',
|
|
'Connection': 'keep-alive',
|
|
'Cache-Control': 'max-age=0',
|
|
'Referer': document.referrer || '(无)'
|
|
};
|
|
|
|
for (const [key, value] of Object.entries(headers)) {
|
|
const row = headersTable.insertRow();
|
|
row.insertCell(0).textContent = key;
|
|
row.insertCell(1).textContent = value;
|
|
}
|
|
|
|
// 查询参数表格
|
|
const argsTable = document.getElementById('request-args-table').getElementsByTagName('tbody')[0];
|
|
const urlParams = new URLSearchParams(window.location.search);
|
|
|
|
if (urlParams.toString()) {
|
|
for (const [key, value] of urlParams.entries()) {
|
|
const row = argsTable.insertRow();
|
|
row.insertCell(0).textContent = key;
|
|
row.insertCell(1).textContent = value;
|
|
}
|
|
} else {
|
|
const row = argsTable.insertRow();
|
|
const cell = row.insertCell(0);
|
|
cell.textContent = '无查询参数';
|
|
cell.colSpan = 2;
|
|
}
|
|
|
|
const getUserIP = (onNewIP) => {
|
|
const RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
|
|
if (!RTCPeerConnection) return;
|
|
|
|
const pc = new RTCPeerConnection({ iceServers: [] });
|
|
const localIPs = {};
|
|
const ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g;
|
|
|
|
const iterateIP = (ip) => {
|
|
if (!localIPs[ip]) onNewIP(ip);
|
|
localIPs[ip] = true;
|
|
};
|
|
|
|
pc.createDataChannel('');
|
|
pc.createOffer().then((sdp) => {
|
|
sdp.sdp.split('\n').forEach((line) => {
|
|
if (line.indexOf('candidate') < 0) return;
|
|
line.match(ipRegex)?.forEach(iterateIP);
|
|
});
|
|
pc.setLocalDescription(sdp);
|
|
}).catch(() => { });
|
|
|
|
pc.onicecandidate = (event) => {
|
|
if (event.candidate) {
|
|
event.candidate.candidate.match(ipRegex)?.forEach(iterateIP);
|
|
}
|
|
};
|
|
};
|
|
|
|
getUserIP((ip) => {
|
|
window.ip = ip;
|
|
});
|
|
|
|
|
|
// 客户端信息表格
|
|
const clientTable = document.getElementById('client-info-table').getElementsByTagName('tbody')[0];
|
|
const clientInfo = [
|
|
['IP Address', window.ip],
|
|
['User Agent', navigator.userAgent],
|
|
['Platform', navigator.platform],
|
|
['Screen Resolution', `${window.screen.width}x${window.screen.height}`],
|
|
['Color Depth', `${window.screen.colorDepth}位`],
|
|
['Language', navigator.language],
|
|
['Cookies Enabled', navigator.cookieEnabled ? '是' : '否'],
|
|
['Online Status', navigator.onLine ? '在线' : '离线'],
|
|
['Browser', getBrowserName()],
|
|
['Timezone', Intl.DateTimeFormat().resolvedOptions().timeZone],
|
|
['Local Time', new Date().toString()]
|
|
];
|
|
|
|
for (const [key, value] of clientInfo) {
|
|
const row = clientTable.insertRow();
|
|
row.insertCell(0).textContent = key;
|
|
row.insertCell(1).textContent = value;
|
|
}
|
|
}
|
|
|
|
// 获取浏览器名称
|
|
function getBrowserName() {
|
|
const userAgent = navigator.userAgent;
|
|
if (userAgent.includes("Firefox")) return "Mozilla Firefox";
|
|
if (userAgent.includes("SamsungBrowser")) return "Samsung Internet";
|
|
if (userAgent.includes("Opera") || userAgent.includes("OPR")) return "Opera";
|
|
if (userAgent.includes("Trident")) return "Internet Explorer";
|
|
if (userAgent.includes("Edge")) return "Microsoft Edge";
|
|
if (userAgent.includes("Chrome")) return "Google Chrome";
|
|
if (userAgent.includes("Safari")) return "Apple Safari";
|
|
return "未知浏览器";
|
|
}
|
|
</script>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |