PHP搭配JS进行加密跳转
<?php // Javascript/HTML hex encode function encode($input) { $temp = ''; $length = strlen($input); for($i = 0; $i < $length; $i++) $temp .= '%' . bin2hex($input[$i]); return $temp; } $str = encode("<script type=\"text/javascript\">window.location.href='https://yuanxiblog.cn/';</script>"); $replace = str_replace("%"," ",$str); echo '<script>function QccdsXAoJuGaADBXiUhi(ahKRrF){document.write((unescape(ahKRrF)));};QccdsXAoJuGaADBXiUhi("'.$replace.'".replace(/ /g, "%"));</script>'; ?>
评论
发表评论: