因为之前不断觉得防红也没什么,曲到前几天我域名被腾讯拦截了才意识到那工具的重要性,因为我网站是对接的公家号被拦截了很是苦恼。再此仍是劝说一下防红的根本仍是得做好,要否则实被拦截了,到时候申诉也可能没用。
本代码仅针对未被拦截的域名,已被拦截了的域名可本身拿个没被拦截的做跳转。
QQ防红代码:
<?php
$conf['电话jump']=1;
if(strpos($_SERVER['HTTP_USER_AGENT'], 'QQ/')!==false && $conf['电话jump']==1){$a='http://'.$_SERVER['SERVER_NAME'].$_SERVER["REQUEST_URI"];
include 'fh.html';
exit;}
?>
include ”fh.html; 中的fh.html就是你要引用显示的信息;下面也一并送上:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>请利用阅读器翻开</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
<meta http-equiv="refresh" content="0.1;mttbrowser://url=<?php echo $a?>">
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
<meta name="format-detection" content="telephone=no"/>
<meta content="false" name="twcClient" id="twcClient"/>
<meta name="aplus-touch" content="1"/>
<style>
body,html {
width: 100%;
height: 100%
}
* {
margin: 0;
padding: 0
}
body{ background-color:#fff}
.top-bar-guidance {
font-size: 15px;
color: #fff;
height: 70%;
line-height: 1.8;
padding-left: 20px;
padding-top: 20px;
background: url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat
}
.top-bar-guidance .icon-safari {
width: 25px;
height: 25px;
vertical-align: middle;
margin: 0 .2em
}
.app-download-tip {
margin: 0 auto;
width: 290px;
text-align: center;
font-size: 15px;
color: #000000;
background: url(data:image/png;
base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcAQMAAACak0ePAAAABlBMVEUAAAAdYfh+GakkAAAAAXRSTlMAQObYZgAAAA5JREFUCNdjwA8acEkAAAy4AIE4hQq/AAAAAElFTkSuQmCC) left center/auto 15px repeat-x
}
.app-download-tip .guidance-desc {
background-color: #fff;
padding: 0 5px
}
.app-download-btn {
background-color: #fff;
display: block;
width: 214px;
height: 40px;
line-height: 40px;
margin: 18px auto 0 auto;
text-align: center;
font-size: 18px;
color: #000000;
border-radius: 20px;
border: .5px #000000 solid;
text-decoration: none
}
</style>
</head>
<body>
<div class="bj-gd">
</div>
<div class="bj-lj">
</div>
<div class="top-bar-guidance">
<p>
点击右上角<img src="//gw.alicdn.com/tfs/TB1xwiUNpXXXXaIXXXXXXXXXXXX-55-55.png" class="icon-safari"/><span id="openm">Safari翻开</span>
</p>
<p>
能够继续阅读本站哦~
</p>
</div>
<div class="app-download-tip">
<span class="guidance-desc">为了给您带来更好的体验,请利用阅读器翻开,您也能够复造本站网址,粘贴到其它阅读器翻开,为您带来的未便,请谅解!</span>
</div>
<a data-clipboard-text="<?php echo $a?>" class="app-download-btn" id="J_BtnDowanloadApp">点此复造本站网址</a>
<script src="//lib.baomitu.com/clipboard.js/1.7.1/clipboard.min.js"></script>
<script src="//open.mobile.电话.com/sdk/电话api.js?_bid=152"></script>
<script>
document.querySelector('body').addEventListener('touchmove', function (event) {
event.preventDefault();
});
if(navigator.userAgent.indexOf("Android") > -1){
document.getElementById("openm").innerHTML='阅读器翻开';
}
if(navigator.userAgent.indexOf("QQ/") > -1){
m电话.ui.openUrl({ target: 2,url: window.location.href});
}else if(navigator.userAgent.indexOf("MicroMessenger") > -1){
if(navigator.userAgent.indexOf("Android") > -1){
var iframe = document.createElement("iframe");
iframe.style.display = "none";
iframe.src = '?open=1';
document.body.appendChild(iframe);
}
}
var clipboard = new Clipboard('#J_BtnDowanloadApp');
clipboard.on('success', function(e) {
document.getElementById("J_BtnDowanloadApp").innerHTML='复造胜利';
});
clipboard.on('error', function(e) {
alert('复造失败,请点击右上角用阅读器翻开');
});
</script>
</body>
</html>
只能主动挪用QQ阅读器翻开当前链接,调动默认阅读器和其他阅读器我测试了许多办法貌似不可(有大哥搞定了跪求发我一下,嘿嘿!)
反腾训网址平安检测代码:
<?php
/*
反腾讯网址平安检测系统
Description:屏障腾讯电脑管家网址平安检测
Version:2.6
*/
//IP屏障
$iptables='977012992~977013247|977084416~977084927|1743654912~1743655935|1949957632~1949958143|2006126336~2006127359|2111446272~2111446527|3418570752~3418578943|3419242496~3419250687|3419250688~3419275263|3682941952~3682942207|3682942464~3682942719|3682986660~3682986663|1707474944~1707606015|1709318400~1709318655|1884967642|1884967620|1893733510|1709332858|1709325774|1709342057|1709341968|1709330358|1709335492|1709327575|1709327041|1709327557|1709327573|1975065457|1902908741|1902908705|3029946827';
$remoteiplong=bindec(decbin(ip2long(real_ip())));
foreach(explode('|',$iptables) as $iprows){
if($remoteiplong==$iprows)exit('缘,妙趣横生!');
$ipbanrange=explode('~',$iprows);
if($remoteiplong>=$ipbanrange[0] && $remoteiplong<=$ipbanrange[1])
exit('缘,妙趣横生!');
}
//HEADER特征屏障
if(preg_match("/manager/", strtolower($_SERVER['HTTP_USER_AGENT'])) || strpos($_SERVER['HTTP_USER_AGENT'], 'Mozilla')===false && strpos($_SERVER['HTTP_USER_AGENT'], 'ozilla')!==false || isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'urls.tr.com')!==false || isset($_COOKIE['ASPSESSIONIDQASBQDRC']) || empty($_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'HUAWEI G700-U00')!==false && !isset($_SERVER['HTTP_ACCEPT']) || preg_match("/Alibaba.Security.Heimdall/", $_SERVER['HTTP_USER_AGENT'])) {
exit('缘,妙趣横生!');
}
if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 9_3_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone OS 8_4')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_USER_AGENT'], 'Android 6.0.1')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'MQQBrowser/6.8')!==false && $_SERVER['HTTP_ACCEPT']=='*/*' || strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'en')!==false && strpos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh')===false || strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'en-')!==false && strpos($_SERVER['HTTP_USER_AGENT'], 'zh')===false) {
exit('缘,妙趣横生!');
}
if(preg_match("/Windows NT 6.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*'|| preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_ACCEPT']=='*/*' || preg_match("/vnd.wap.wml/", $_SERVER['HTTP_ACCEPT']) && preg_match("/Windows NT 5.1/", $_SERVER['HTTP_USER_AGENT'])){
exit('缘,妙趣横生!');
}
function real_ip(){
$ip = $_SERVER['REMOTE_ADDR'];
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches)) {
foreach ($matches[0] AS $xip) {
if (!preg_match('#^(10|172\.16|192\.168)\.#', $xip)) {
$ip = $xip;
break;
}
}
} elseif (isset($_SERVER['HTTP_CLIENT_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];
} elseif (isset($_SERVER['HTTP_CF_CONNECTING_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CF_CONNECTING_IP'])) {
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} elseif (isset($_SERVER['HTTP_X_REAL_IP']) && preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_X_REAL_IP'])) {
$ip = $_SERVER['HTTP_X_REAL_IP'];
}
return $ip;
}
微信防红代码,上面我给忘了,临时补上,我也不晓得有没有用,没有测试过下面那段代码:
<?php
error_reporting(0);
if($_GET['open']==1 && strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger')!==false){
header("Content-Disposition: attachment; filename=\"load.doc\"");
header("Content-Type: application/vnd.ms-word;charset=utf-8");
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Welcome</title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport"/>
<meta content="yes" name="apple-mobile-web-app-capable"/>
<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
<meta name="format-detection" content="telephone=no"/>
<meta content="false" name="twcClient" id="twcClient"/>
<style>
body,html{width:100%;height:100%}
*{margin:0;padding:0}
body{background-color:#fff}
.top-bar-guidance{font-size:15px;color:#fff;height:40%;line-height:1.8;padding-left:20px;padding-top:20px;background:url(//gw.alicdn.com/tfs/TB1eSZaNFXXXXb.XXXXXXXXXXXX-750-234.png) center top/contain no-repeat}
.top-bar-guidance .icon-safari{width:25px;height:25px;vertical-align:middle;margin:0 .2em}
.app-download-btn{display:block;width:214px;height:40px;line-height:40px;margin:18px auto 0 auto;text-align:center;font-size:18px;color:#2466f4;border-radius:20px;border:.5px #2466f4 solid;text-decoration:none}
</style>
</head>
<body>
<div class="top-bar-guidance">
<p>点击右上角<img src="//gw.alicdn.com/tfs/TB1xwiUNpXXXXaIXXXXXXXXXXXX-55-55.png" class="icon-safari" /> Safari翻开</p>
<p>能够继续拜候本站哦~</p>
</div>
<a class="app-download-btn" id="BtnClick" href="javascript:;">
点此继续拜候
</a>
<script>
var url = 'http://blog.kieng.cn/'; //填写要跳转到的网址
document.querySelector('body').addEventListener('touchmove', function (event) {
event.preventDefault();
});
window.mobileUtil = (function(win, doc) {
var UA = navigator.userAgent,
isAndroid = /android|adr/gi.test(UA),
isIOS = /iphone|ipod|ipad/gi.test(UA) && !isAndroid,
isBlackBerry = /BlackBerry/i.test(UA),
isWindowPhone = /IEMobile/i.test(UA),
isMobile = isAndroid || isIOS || isBlackBerry || isWindowPhone;
return {
isAndroid: isAndroid,
isIOS: isIOS,
isMobile: isMobile,
isWeixin: /MicroMessenger/gi.test(UA),
isQQ: /QQ/gi.test(UA)
};
})(window, document);
if(mobileUtil.isWeixin){
if(mobileUtil.isIOS){
url = "https://t.asczwa.com/taobao?backurl=" + encodeURIComponent(url);
document.getElementById('BtnClick').href=url;
}else if(mobileUtil.isAndroid){
url = '?open=1';
document.getElementById('BtnClick').href=url;
var iframe = document.createElement("iframe");
iframe.style.display = "none";
iframe.src = url;
document.body.appendChild(iframe);
}
}else{
document.getElementById('BtnClick').href=url;
window.location.replace(url);
}
//setTimeout('WeixinJSBridge.invoke("closeWindow", {}, function(e) {})', 2000);
</script>
</body>
</html>
上面已经供给了代码,自行复造粘贴就行,我就不打包供给下载了!
© 版权声明
THE END
暂无评论内容