我有这段代码:
eval(str_rot13('shapgvba purpx_sbbgre(){tybony $nz_bcgvba;$y=\'<n uers="uggc://jjj.penmlkugzy.pbz" gnetrg="_oynax">CFQ gb UGZY PFF</n>\';$s=GRZCYNGRCNGU.\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub($nz_bcgvba[\'phfgbz\'][\'cevinpl\']);qvr;}}purpx_sbbgre();'));
对其进行解码
这成为了这段代码:
<?php function check_footer() {
global $am_option;
$l = '<a href="http://www.crazyxhtml.com" target="_blank">PSD to HTML CSS</a>';
$f = TEMPLATEPATH . '/footer.php';
$fd = fopen($f, 'r');
$c = fread($fd, filesize($f));
fclose($fd);
if (strpos($c, $l) == 0) {
echo ($am_option['custom']['privacy']);
die;
}
}
function check_footer() {
global $am_option;
$l = '<a href="http://www.crazyxhtml.com" target="_blank">PSD to HTML CSS</a>';
$f = TEMPLATEPATH . '/footer.php';
$fd = fopen($f, 'r');
$c = fread($fd, filesize($f));
fclose($fd);
if (strpos($c, $l) == 0) {
echo ($am_option['custom']['privacy']);
die;
}
}
check_footer();
有人可以帮助我如何编码这个?我的意思是我改变了一些事情,但不知道如何编码类似的语言/代码。
提前谢谢。
答案 0 :(得分:2)
Rot13只是将ascii字母移动了13个字符。由于ASCII字母表中有26个字母,这意味着再次将它们移动13个字符将反转操作。由于操作完全忽略了非ascii字母,因此rot13的反转再次变为rot13,如下所示:
> $x='shapgvba purpx_sbbgre(){tybony $nz_bcgvba;$y=\'<n uers="uggc://jjj.penmlkugzy.pbz" gnetrg="_oynax">CFQ gb UGZY PFF</n>\';$s=GRZCYNGRCNGU.\'/sbbgre.cuc\';$sq=sbcra($s,\'e\');$p=sernq($sq,svyrfvmr($s));spybfr($sq);vs(fgecbf($p,$y)==0){rpub($nz_bcgvba[\'phfgbz\'][\'cevinpl\']);qvr;}}purpx_sbbgre();';
> var_dump($x === str_rot13(str_rot13($x)));
bool(true)