一、核心功能重构:极简传参,开箱即用
✅ 移除加密冗余逻辑 :摒弃Base64/XOR解密、hand/key等复杂参数,仅需标准url参数即可传参,调用方式极简(?url=目标链接)
✅ 自动协议补全 :智能识别目标链接,无HTTP/HTTPS协议时自动补全https://,避免因协议缺失导致的访问失败
✅ 保留核心安全能力 :域名安全DNS检测、网站TDK信息拉取能力,兼顾简洁性与实用性
✅ 智能跳转规则:危险域名强制手动确认访问,安全/可疑域名倒计时自动跳转,同时保留手动跳转按钮,兼顾便捷性与安全性
二、视觉全面升级:黑客终端风格,沉浸式扫描体验
✅ 经典黑客视觉体系 :黑底绿字终端配色,搭配青色域名高亮,完美还原黑客工具视觉风格,辨识度拉满
✅ 多重动态特效加持 :全屏扫描线滚动+黑客帝国字符雨背景,双特效叠加打造沉浸式安全扫描氛围,视觉冲击力强
✅ 渐进式扫描动画 :扫描日志逐行渐入+进度条平滑加载,模拟真实安全检测流程,提升页面交互体验
✅ 动态视觉反馈:倒计时数字闪烁、按钮hover光晕、状态徽章配色区分,每一步操作都有明确视觉反馈,交互更友好
三、交互体验优化:简洁直观,适配全场景
✅ 清晰的状态区分 :四种域名状态,通过专属配色+徽章文案直观展示,风险等级一眼识别
✅ 完善的错误处理 :针对缺失参数、无效URL、接口请求失败等场景,给出明确的终端式错误提示,问题定位更高效
✅ 全响应式适配 :完美兼容电脑、手机、平板等全尺寸设备,移动端自动适配按钮布局与内容展示,无适配死角
✅ 轻量无依赖:所有特效、逻辑均基于原生CSS+JS实现,无任何外部框架/插件,页面加载速度快,部署无门槛
四、工程化设计:稳定可靠,易扩展
✅ 标准化HTTP头配置 :配置Cache-Control、X-Frame-Options等安全响应头,提升页面安全性与缓存性能
✅ 禁止搜索引擎收录 :内置robots元标签,避免跳转页被搜索引擎抓取,保证站点收录规范性
✅ 模块化代码结构 :工具函数、业务逻辑、配置项分离,代码注释清晰,后续二次开发/功能扩展更便捷
✅ 鲁棒性兼容处理:针对域名解析失败、接口返回异常等边界场景做兼容,页面运行更稳定,无白屏/卡死问题
index.php
php
<?php
/**
* index.php - 黑客风格安全跳转页
* 移除加密逻辑,直接使用标准URL参数,自动补全HTTP协议,黑客扫描视觉特效
*/
header('Cache-Control: public, max-age=3600, s-maxage=86400');
header('Content-Type: text/html; charset=utf-8');
header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: SAMEORIGIN');
?><!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta name="robots" content="noindex, nofollow, noarchive">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
<title>安全扫描中 - 即将跳转</title>
<meta name="description" content="正在扫描目标网站,即将跳转至目标链接,请勿访问陌生危险链接。">
<link rel="canonical" href="https://<?php echo htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); ?>">
<style>
/* 黑客风格核心样式 */
*{margin:0;padding:0;box-sizing:border-box;}
body{
font-family: 'Courier New', Courier, monospace;
background: #000;
color: #0f0;
min-height: 100vh;
padding: 20px;
overflow-x: hidden;
position: relative;
}
/* 扫描线背景特效 */
body::before{
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(
transparent 0%,
rgba(0, 255, 0, 0.1) 5%,
transparent 10%
);
background-size: 100% 20px;
animation: scanLine 0.2s linear infinite;
pointer-events: none;
z-index: 1;
}
@keyframes scanLine {
0% { background-position: 0 0; }
100% { background-position: 0 20px; }
}
/* 字符雨背景特效 */
.matrix-bg{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
opacity: 0.2;
pointer-events: none;
}
.container{
max-width: 800px;
margin: 0 auto;
background: rgba(0, 0, 0, 0.85);
border: 2px solid #0f0;
padding: 30px;
border-radius: 8px;
position: relative;
z-index: 2;
box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}
/* 头部扫描图标 */
.scan-icon{
text-align: center;
font-size: 48px;
margin-bottom: 20px;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%,100% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.8; }
}
/* 标题样式 */
h1{
font-size: 24px;
text-align: center;
margin-bottom: 10px;
text-transform: uppercase;
letter-spacing: 2px;
position: relative;
}
h1::after{
content: '';
display: block;
width: 50%;
height: 1px;
background: #0f0;
margin: 10px auto;
animation: lineGrow 2s ease-in-out infinite;
}
@keyframes lineGrow {
0%,100% { width: 30%; }
50% { width: 70%; }
}
.sub-title{
text-align: center;
font-size: 14px;
color: #090;
margin-bottom: 30px;
line-height: 1.5;
}
/* 错误提示 */
.error{
background: rgba(255, 0, 0, 0.1);
border: 1px solid #f00;
color: #f00;
padding: 15px;
margin-bottom: 20px;
border-radius: 4px;
display: none;
}
/* 扫描进度区域 */
.scan-progress{
margin: 20px 0;
border: 1px solid #0f0;
padding: 15px;
border-radius: 4px;
}
.progress-bar{
height: 10px;
background: #000;
border: 1px solid #0f0;
margin: 10px 0;
overflow: hidden;
}
.progress-fill{
height: 100%;
background: #0f0;
width: 0%;
animation: progress 3s linear forwards;
}
@keyframes progress {
0% { width: 0%; }
100% { width: 100%; }
}
.scan-logs{
font-size: 13px;
line-height: 1.6;
height: 150px;
overflow: hidden;
position: relative;
}
.log-line{
margin: 5px 0;
opacity: 0;
animation: logFadeIn 0.5s ease forwards;
}
@keyframes logFadeIn {
from { opacity: 0; transform: translateX(-10px); }
to { opacity: 1; transform: translateX(0); }
}
/* 目标信息区域 */
.target-info{
border: 1px solid #0f0;
padding: 15px;
margin: 20px 0;
border-radius: 4px;
}
.target-info h3{
font-size: 16px;
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 10px;
}
.target-info p{
font-size: 14px;
margin: 5px 0;
word-break: break-all;
}
.target-info .domain{
color: #0ff;
font-weight: bold;
}
/* 安全状态徽章 */
.status-badge{
display: inline-block;
padding: 5px 10px;
border-radius: 3px;
font-size: 12px;
margin: 10px 0;
}
.status-safe{
background: rgba(0, 255, 0, 0.1);
border: 1px solid #0f0;
color: #0f0;
}
.status-suspicious{
background: rgba(255, 255, 0, 0.1);
border: 1px solid #ff0;
color: #ff0;
}
.status-danger{
background: rgba(255, 0, 0, 0.1);
border: 1px solid #f00;
color: #f00;
}
.status-unknown{
background: rgba(128, 128, 128, 0.1);
border: 1px solid #888;
color: #888;
}
/* 倒计时区域 */
.countdown{
text-align: center;
margin: 20px 0;
font-size: 36px;
font-weight: bold;
color: #0f0;
animation: blink 1s step-end infinite;
}
@keyframes blink {
0%,100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* 按钮样式 */
.btn-group{
display: flex;
gap: 10px;
margin-top: 20px;
}
.btn{
flex: 1;
padding: 12px;
border: 1px solid #0f0;
background: transparent;
color: #0f0;
font-family: 'Courier New', Courier, monospace;
font-size: 14px;
cursor: pointer;
border-radius: 4px;
transition: all 0.3s ease;
}
.btn:hover{
background: rgba(0, 255, 0, 0.2);
box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}
.btn-danger{
border-color: #f00;
color: #f00;
}
.btn-danger:hover{
background: rgba(255, 0, 0, 0.2);
box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
.btn-secondary{
border-color: #888;
color: #888;
}
.btn-secondary:hover{
background: rgba(128, 128, 128, 0.2);
box-shadow: 0 0 10px rgba(128, 128, 128, 0.5);
}
/* 免责声明 */
.disclaimer{
font-size: 12px;
color: #090;
margin-top: 30px;
padding-top: 15px;
border-top: 1px dashed #0f0;
line-height: 1.5;
}
/* 骨架屏/加载状态 */
.skeleton{
opacity: 0.7;
}
.skeleton-line{
height: 16px;
background: linear-gradient(90deg, #000 25%, #030 50%, #000 75%);
background-size: 200% 100%;
animation: shimmer 1.5s infinite;
border-radius: 2px;
margin: 8px 0;
}
@keyframes shimmer {
0% { background-position: 200% 0; }
100% { background-position: -200% 0; }
}
/* 响应式适配 */
@media(max-width: 600px){
.container{
padding: 20px;
}
.btn-group{
flex-direction: column;
}
.scan-logs{
height: 120px;
}
}
</style>
</head>
<body>
<!-- 字符雨背景 -->
<div class="matrix-bg" id="matrixBg"></div>
<div class="container">
<div class="scan-icon">🔍</div>
<h1>NETWORK SECURITY SCAN</h1>
<p class="sub-title">网络扫描系统 | 正在验证目标链接 | 请勿访问未知危险链接</p>
<div id="errorBox" class="error"></div>
<!-- 扫描进度 -->
<div class="scan-progress">
<div class="log-line" style="animation-delay: 0s;">[INIT] 初始化安全扫描引擎...</div>
<div class="log-line" style="animation-delay: 0.5s;">[CONNECT] 连接到安全数据库...</div>
<div class="progress-bar">
<div class="progress-fill"></div>
</div>
<div id="scanLogs" class="scan-logs">
<div class="log-line" style="animation-delay: 1s;">[SCAN] 解析目标URL地址...</div>
<div class="log-line" style="animation-delay: 1.5s;">[CHECK] 验证域名合法性...</div>
<div class="log-line" style="animation-delay: 2s;">[ANALYZE] 分析网站安全状态...</div>
<div class="log-line" style="animation-delay: 2.5s;">[COMPLETE] 扫描完成,生成报告...</div>
</div>
</div>
<!-- 目标信息区域 -->
<div class="target-info">
<h3>🎯 目标信息</h3>
<div id="targetSkeleton" class="skeleton">
<div class="skeleton-line" style="width: 80%;"></div>
<div class="skeleton-line" style="width: 60%;"></div>
<div class="skeleton-line" style="width: 90%;"></div>
</div>
<div id="targetContent" style="display: none;">
<p><strong>域名:</strong> <span id="domain" class="domain"></span></p>
<p><strong>标题:</strong> <span id="title"></span></p>
<p><strong>状态:</strong> <span id="statusBadge" class="status-badge"></span></p>
</div>
</div>
<!-- 倒计时区域 -->
<div id="countdownBox" class="countdown" style="display: none;">
<span id="countdownNum">3</span>
</div>
<!-- 按钮区域 -->
<div class="btn-group">
<button id="goBtn" class="btn" style="display: none;" onclick="jump(false)">继续访问</button>
<button id="backBtn" class="btn btn-secondary" style="display: none;" onclick="history.back()">返回上一页</button>
</div>
<!-- 免责声明 -->
<div class="disclaimer">
<strong>免责声明:</strong>本扫描仅基于公开数据源提供技术参考,不代表域名本身的合法性、安全性,亦不构成任何形式的评价或承诺。访问前请自行核实域名资质,相关风险由访问者自行承担。
</div>
</div>
<script>
// ============ 核心配置 ============
const CFG = {
countdown: 3, // 自动跳转倒计时
api: {
tdk: 'https://api.afmax.cn/so/tdk/index.php?r=',
safety: 'https://api.afmax.cn/so/safety/index.php?j=',
ico: 'https://api.afmax.cn/so/ico/index.php?r='
}
};
let targetUrl = '';
let countdownTimer = null;
// ============ 工具函数 ============
// 补全URL协议(自动添加https)
function completeUrlProtocol(url) {
if (!url) return null;
// 如果没有协议,自动补全https
if (!/^https?:\/\//i.test(url)) {
url = 'https://' + url;
}
return url;
}
// 显示错误信息
function showError(msg) {
document.getElementById('errorBox').textContent = `[ERROR] ${msg}`;
document.getElementById('errorBox').style.display = 'block';
document.getElementById('targetSkeleton').style.display = 'none';
document.getElementById('backBtn').style.display = 'block';
}
// 跳转逻辑
function jump(isAuto = false) {
if (!targetUrl) return;
// 异常链接需要确认
const isDanger = document.getElementById('goBtn')?.classList.contains('btn-danger');
if (isDanger && !isAuto) {
if (confirm('[WARAttention] 该网站安全DNS异常返回,请自行分析目标网站的安全性!\n\n是否确认继续访问?')) {
location.href = targetUrl;
}
return;
}
// 自动跳转或非危险链接直接跳转
location.href = targetUrl;
}
// 初始化字符雨背景
function initMatrixBg() {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
const matrixBg = document.getElementById('matrixBg');
// 设置canvas尺寸
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
matrixBg.appendChild(canvas);
// 字符雨配置
const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=[]{}|;:,.<>?';
const columns = Math.floor(canvas.width / 20);
const drops = [];
// 初始化雨滴位置
for (let i = 0; i < columns; i++) {
drops[i] = Math.random() * -100;
}
// 绘制字符雨
function drawMatrix() {
// 半透明背景,营造拖影效果
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.fillStyle = '#0f0';
ctx.font = '15px Courier New';
for (let i = 0; i < drops.length; i++) {
const text = chars[Math.floor(Math.random() * chars.length)];
ctx.fillText(text, i * 20, drops[i] * 20);
// 重置雨滴位置
if (drops[i] * 20 > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
}
}
setInterval(drawMatrix, 35);
// 窗口大小适配
window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
});
}
// ============ 页面加载逻辑 ============
window.onload = function() {
// 初始化字符雨背景
initMatrixBg();
// 获取URL参数
const params = new URLSearchParams(location.search);
const rawUrl = params.get('url');
// 校验URL参数
if (!rawUrl) {
return showError('缺少目标链接参数 (url)');
}
// 补全URL协议
targetUrl = completeUrlProtocol(rawUrl);
if (!targetUrl) {
return showError('无效的URL格式');
}
// 解析域名
let domain = '未知域名';
try {
domain = new URL(targetUrl).hostname;
} catch (e) {
domain = targetUrl.replace(/^https?:\/\//, '').split('/')[0];
}
// 同时请求TDK和安全检测数据
Promise.all([
// 获取网站TDK信息
fetch(`${CFG.api.tdk}${encodeURIComponent(targetUrl)}`)
.then(r => r.ok ? r.json() : null)
.catch(() => null),
// 获取安全检测信息
fetch(`${CFG.api.safety}${encodeURIComponent(domain)}`)
.then(r => r.ok ? r.json() : null)
.catch(() => null)
]).then(([tdkData, safetyData]) => {
// 隐藏骨架屏,显示内容
document.getElementById('targetSkeleton').style.display = 'none';
document.getElementById('targetContent').style.display = 'block';
// 填充域名信息
document.getElementById('domain').textContent = domain;
// 填充网站标题
const tdk = tdkData || {};
document.getElementById('title').textContent = tdk.title || tdk.keywords?.split(',')[0] || domain;
// 处理安全状态
const safety = safetyData?.summary || {};
const status = safety.overall_status || 'unknown';
const statusMsg = safety.overall_message || '检测结果未知';
const statusBadge = document.getElementById('statusBadge');
// 设置状态徽章样式和文本
switch(status) {
case 'safe':
statusBadge.className = 'status-badge status-safe';
statusBadge.textContent = `[SAFE] ${statusMsg}`;
break;
case 'suspicious':
statusBadge.className = 'status-badge status-suspicious';
statusBadge.textContent = `[LOOK OUT] ${statusMsg}`;
break;
case 'dangerous':
statusBadge.className = 'status-badge status-danger';
statusBadge.textContent = `[Attention] ${statusMsg}`;
break;
default:
statusBadge.className = 'status-badge status-unknown';
statusBadge.textContent = `[UNKNOWN] ${statusMsg}`;
}
// 显示返回按钮
document.getElementById('backBtn').style.display = 'block';
// 处理跳转逻辑
const goBtn = document.getElementById('goBtn');
const countdownBox = document.getElementById('countdownBox');
const countdownNum = document.getElementById('countdownNum');
// 危险链接显示确认按钮,不自动跳转
if (status === 'dangerous') {
goBtn.style.display = 'block';
goBtn.classList.add('btn-danger');
goBtn.textContent = '[⚠] 确认访问站点';
} else {
// 非危险链接显示倒计时并自动跳转
countdownBox.style.display = 'block';
let count = CFG.countdown;
countdownTimer = setInterval(() => {
count--;
countdownNum.textContent = count;
if (count <= 0) {
clearInterval(countdownTimer);
jump(true);
}
}, 1000);
// 同时显示手动跳转按钮
goBtn.style.display = 'block';
goBtn.textContent = '[▶] 立即访问';
}
}).catch((err) => {
showError(`安全DNS扫描失败: ${err.message || '未知错误'}`);
console.error('扫描失败:', err);
});
};
// 页面卸载时清除定时器
window.onbeforeunload = function() {
if (countdownTimer) clearInterval(countdownTimer);
};
</script>
</body>
</html>
复制粘贴上去即可
直接通过 URL 参数传递目标链接即可,例如:
https://你的域名/index.php?url=www.baidu.com
或带完整协议:
https://你的域名/index.php?url=https://www.baidu.com
如果你是用go.php这个名字,(这个可以自定义的。你粘贴到哪个文件名字就是那个。目录也是,不用规矩那么多)