0

I had this code:

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();'));

I used to decode it with http://www.unphp.net/

Which became this code:

<?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();

Can someone help me how can I encode this back? I mean I changed somethings but dont know how to encode in similar language/code.

Thank you in advance.

0

1 Answer 1

2

Rot13 just shifts ascii letters 13 characters. Since there are 26 letters in the ASCII alphabet, this means shifting them 13 characters again will reverse the operation. Since non-ascii-letters will be ignored by the operation altogether, the reverse of rot13 is just rot13 again, as you can see below:

> $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)
Sign up to request clarification or add additional context in comments.

5 Comments

no you understand not correctly, I want same code but changed only domain names, can you help me?
Get the decoded version, change the domain names, then do str_rot13 on the changed string.
If you change any encoded text after decoding the text, you simply apply rot13 again. Then you can replace the existing rot13 text with your text, and it will update.
so how can I rot13 again?
By use of the str_rot13 function you already know and love.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.