Hi, I'm new here - Regular reader, just not a registered user.

Please can someone help me decode the following? I've been trying for hours now:

<?php if ($setting['seo_on'] == 0){$x0c='includes/awards/achievements_pak1';}else{$x0c=$setting['site_url'].'/includes/awards/achievements_pak1';}echo '<center><table style="border-color:#d7efff;border-width:3px;background:url('.$x0c.'/background.jpg);" border="3" align="center" width="643"><tbody><tr><td><center><img src="'.$x0c.'/achievements_logo.png" style="width:250px;height:50px;border:0" /></a></center><table style="border-color:#;border-width:0px;background-color:#;" border="0" align="center" width="356"><tbody><tr><td>';if($profile['points']>=11){echo "\x20\074img\040\x73\x72c='".$x0c."/l\166l1\056\160n\x67\040'\040\x77\151d\164\x68='6\x30\x70\170';\040\150\x65i\147\150t\x3d'6\x30p\170'\x3b\040\142\157\x72\x64\145\x72='\060'\040\057\x3e";}else{echo "\x3c\x69m\147\040\163\x72c='\040".$x0c."/\x6c\x6f\143\x6b\145d.\160n\147 ' \167\x69\x64\164\150\075'6\x30px'\073\x20\x68\145\151g\x68\x74\075'\x360p\170';\x20\142or\144\145r\x3d'\060'\x20\057\x3e";}echo '<td>';if ($profile['points'] >= 51 && $profile['points'] >= 51) {echo "\x20\x3c\x69\155\x67\x20s\x72c\075' ".$x0c."/l\166l2\056p\x6e\147\x20'\x20\167i\144\164h='60px';\040\x68\x65\x69\x67\150t='\066\x30\160x'\x3b\040\x62\x6f\x72\x64\145\x72\x3d'0'\040/\076";}else{echo "\x20\074im\x67\x20sr\143\x3d'\x20".$x0c."\057lo\x63k\145\x64.p\x6e\147\x20' \167i\x64\x74\x68\075'6\x30\x70\x78'\x3b\040h\145i\147\x68t\x3d'\066\060p\x78'\x3b \x62\157\162\x64e\x72\075'0'\x20/\x3e";}echo '<td>';if ($profile['points'] >= 201 && $profile['points'] >= 201) {echo "\x20\074\x69\x6dg\x20\x73\x72\143\075'\x20".$x0c."\x2fl\166\x6c3\x2e\x70ng\x20'\x20\x77\151\144\x74\x68='6\x30\x70\170'\073 h\x65\x69\x67ht\075'\066\x30\160\x78'\x3b\x20\142or\x64\x65\x72\075'0' \x2f\076";}else{echo "\x20<i\155\x67 \x73\x72\143\x3d'\x20".$x0c."\057\154\157\x63ke\x64\056\160\156\x67\x20' w\151\x64\x74\x68\x3d'\066\060\x70x'\073 he\151\147\150\x74\075'60p\x78';\040\x62\157r\144\145r\x3d'\060'\040\x2f\076";}echo '<td>';if ($profile['points'] >= 401 && $profile['points'] >= 401) {echo " \x3c\151m\x67\040\163\x72\143\x3d' ".$x0c."/\x6cv\154\064\x2e\x70\156\x67\040'\040\x77i\x64\x74\150\x3d'\066\x30\x70\x78'; \150e\x69\x67\150\x74\x3d'\0660px';\x20\142\x6fr\x64e\x72='\060'\040/\076";}else{echo "\x20\074\x69\155\147 \x73\162\x63\x3d'\x20".$x0c."\057l\x6f\143\x6be\144\x2e\x70\156g '\040\x77\x69d\x74\150\x3d'\x36\x30\160x'\x3b\040h\145i\147\x68t\x3d'6\060\160\x78'; \x62\157\x72der='\x30'\x20\057\x3e";}echo '<td>';if ($profile['points'] >= 801 && $profile['points'] >= 801) {echo "\x20\x3ci\x6d\147\x20\163r\x63\x3d'\040".$x0c."\057\x6c\166l\065\056\x70n\x67\040'\x20\x77\x69\x64\x74\150\x3d'6\x30\160\x78'\073 hei\x67\x68t\075'\066\x30\x70x'\073\x20bo\x72d\x65r\x3d'\x30'\040/\x3e";}else{echo " <\x69\155\147\040s\162\143\075'\x20".$x0c."/l\157\x63\153\x65d\x2e\x70ng '\x20wi\x64t\150='\x36\060\160x'\x3b\040\150\145\151\147\150t\x3d'\x360p\170'; b\x6f\x72\144\145\x72='\x30'\x20/>";}echo '</tr></tbody></table><table style="border-color: #; border-width: 0px; background-color: #;" border="0" align="center" width="356"><tbody><tr><td>';if ($profile['plays'] >= 10 && $profile['plays'] >= 10 ) {echo "\040\x3c\151mg \163\x72\143\075'\040".$x0c."\057\160\154\141\x79\16310.p\156g '\040\x77i\144th='6\x30p\170'\073\040\x68\145i\147\150\x74\075'6\x30\160x'\x3b\x20b\x6fr\x64e\x72\075'\060'\x20/>";}else{echo " <\151\155g s\x72\143=' ".$x0c."\057\x6coc\x6b\x65\x64.\x70\156g '\040w\151d\164h\075'\x36\060\160x'\073\x20\x68\x65\x69\x67\x68t='\x360\x70x'\073\x20\142\x6f\162d\145\162\075'\060'\x20/\076";}echo '<td>';if ($profile['plays'] >= 50 && $profile['plays'] >= 50 ) {echo " \x3c\151mg \x73\162c\075' ".$x0c."\x2fp\154a\x79s\065\x30\x2ep\x6eg\040' w\x69d\164h\x3d'\0660p\170'\073\x20\150e\x69\147h\164='\0660\x70\170';\040\x62\157r\x64e\162='0'\040\x2f>";}else{echo "\x20\x3c\x69\x6dg\x20sr\143='\040".$x0c."\057\154\x6f\143\x6b\145d.pn\147\x20'\040w\x69\144t\x68='\0660\x70\x78'\073\x20\150\145\151\x67\150\x74\x3d'6\x30p\170';\x20\142\x6fr\x64e\162\x3d'0'\040/\076";}echo '<td>';if ($profile['plays'] >= 100 && $profile['plays']>=100){echo "\040<i\155\147\x20s\162\x63='\040".$x0c."/\160\x6c\x61\171s\x31\x300\056\160\x6eg '\040w\151\x64th='6\x30\160x'\x3b\040\x68\x65igh\x74='\066\060px'\073\x20\x62\x6fr\144\x65r='\060'\x20\x2f>";}else{echo "\074\x69\155\x67 \163r\143='\040".$x0c."\057\154o\143\x6be\144.pn\x67 ' \x77\151\144\x74h\x3d'\0660\160\170'\073\040\150\x65i\x67\150t\x3d'\x360p\x78'\x3b \142o\162de\x72\075'0'\x20\057>";}echo '<td>';if ($profile['plays'] >= 300 && $profile['plays'] >= 300) {echo "\040<\151\x6d\147\x20src=' ".$x0c."\x2fplays3\x30\x30.\160\156\147\x20'\x20w\x69dt\x68\075'\x36\060px'\073\040\x68\145i\x67\150\164\x3d'\x36\060p\170'\x3b\x20bor\144\x65r='0' \x2f\x3e";}else{echo " \x3c\x69m\147\x20\x73\162c\075'\040".$x0c."\x2f\x6****\145d\x2e\x70\x6eg ' \167\151\x64\x74\150='6\x30\x70x'; \x68e\x69\147\x68\164\x3d'6\060\160\x78'\073\x20\x62or\x64\x65r\x3d'0' \x2f\x3e";}echo '<td>';if ($profile['ratings'] >= 1 && $profile['ratings'] >= 1 ) {echo " \x3c\151m\147\x20s\x72\x63='\040".$x0c."\x2f\162a\164e\061.\160\x6e\147 '\x20w\x69\144\164h\075'\x360\160\170'\x3b\040\x68\x65\151\x67\x68\164\x3d'6\060\x70\x78'\073\x20b\157rd\x65r\075'\x30' \057\076";}else{echo " \x3cim\147 \x73r\x63\075'\x20".$x0c."\057loc\153\x65\x64\x2e\160\156\x67\040' \x77id\x74\x68='6\060\x70x'\x3b\040\x68\145\x69\x67\x68\x74\x3d'\066\x30\x70\x78'\073\040\142\157rd\x65\x72='\060' \x2f>";}echo '</tr></tbody></table><table style="border-color: #; border-width: 0px; background-color: #;" border="0" align="center" width="356"><tbody><tr><td>';if ($profile['ratings']>=25){echo "\x20\x3c\x69mg\x20\163\x72\x63\075'".$x0c."\057\162\x61te\x32\x35\056\x70\x6e\147\x20' \167i\144t\x68\075'6\060\x70\170'; \150\145ig\150\164='\0660px';\040bo\x72d\145\x72\075'\x30'\x20\057\x3e";}else{echo "\040\x3c\x69\x6dg\040s\162\143\x3d'\040".$x0c."\x2f\x6co\x63\153e\144\x2e\160\x6eg\040'\x20w\x69d\x74\150\075'6\060\160\x78';\040he\151g\x68\164='\x360\x70\x78';\040bo\162\144\145\x72\075'\060'\040\057\076";}echo '<td>';if ($profile['ratings'] >= 50 && $profile['ratings'] >= 50 ) {echo "\x20\x3c\151\x6dg s\162\x63\075' ".$x0c."\x2fr\141\x74e\0650\056\160ng\040' wi\x64\x74\x68='\x36\060p\170'\x3b\x20h\x65\151\x67h\x74\x3d'\x36\x30\160\x78'\073 \142\157\x72de\162='\x30'\x20\x2f>";}else{echo "\040\074im\147\040\163r\x63\x3d'\x20".$x0c."/\154oc\153e\x64\x2e\160\x6e\x67\040'\040\167\151\144\x74\150='\0660px';\x20he\151\x67h\164\x3d'\066\x30px';\040\142o\x72d\x65r='0'\040\057\076";}echo '<td>';if ($profile['comments'] >= 1 && $profile['comments'] >= 1) {echo "\040\074\x69\x6d\147\040\x73\x72c\075'\x20".$x0c."/\143\157\155\155en\x74\1631.p\156\x67\x20' width\075'\x36\060\160\x78'\073\x20\150e\151\x67h\x74\075'\x360p\x78'\073 b\157\x72\x64\145\x72\075'0'\040/>";}else{echo "\x3c\x69\x6dg \x73r\x63\x3d'\040".$x0c."/\x6****\x65d.\x70n\x67\x20' w\x69\144th\x3d'\066\x30\x70\170'\x3b he\151\147h\x74\x3d'6\x30\x70\x78'\x3b\040bo\162der='0'\x20/\x3e";}echo '<td>';if ($profile['comments'] >= 10 && $profile['points'] >= 10) {echo " \074im\147 s\162c='\x20".$x0c."/\143\x6fmmen\x74s\061\x30\x2e\160\x6eg\040'\040\x77\x69dt\x68='\066\x30\160x'\073 \x68e\151g\150\164\075'\0660\x70\x78'; \142\157\x72\144er\075'0'\x20\x2f>";}else{echo " \074i\x6d\x67\040sr\x63=' ".$x0c."\x2f\154\157\143ke\144\x2e\160n\x67\x20' wi\x64\164\150\075'6\060\x70\170';\x20\150e\151\147\150\x74='6\x30\160\x78'\073\x20\142\x6f\162\144er\075'\x30'\x20\x2f\x3e";}echo '<td>';if ($profile['comments']>=25) {echo "\040<i\x6dg\040\x73\162\x63\075'\x20".$x0c."/\x63\x6f\x6d\155\145\x6e\x74\1632\065.\x70n\147\x20'\040\167id\x74h\x3d'6\x30\x70x'\x3b he\151gh\x74\075'\x360\x70\x78'\073\x20\x62\x6f\x72\144\x65r\x3d'\x30'\x20\x2f>";}else{echo "\x20<\x69\155\147\040\163r\143\x3d' ".$x0c."\x2fl\157cke\x64\x2e\x70n\x67\x20'\040\167i\144\164\x68\x3d'\066\x30px';\040heig\x68t\075'\0660\160\x78';\040\x62\157\162d\x65\x72\x3d'\060' /\x3e";}echo '</tr><tr><th colspan="5"><br /><script type="text/javascript">document.write(unescape("%3C%73%70%61%6E%20%73%74%79%6C%65%3D%22%66%6F%6E%74%2D%73%69%7A%65%3A%30%2E%39%65%6D%3B%22%3E%41%63%68%69%65%76%65%6D%65%6E%74%73%20%42%79%20%3C%61%20%68%72%65%66%3D%22%68%74%74%70%3A%2F%2F%65%63%73%63%72%69%70%74%73%2E%6F%75%72%63%6F%6F%6C%76%69%6C%6C%61%67%65%2E%63%6F%6D%2F%69%6E%64%65%78%2E%68%74%6D%6C%22%20%73%74%79%6C%65%3D%22%63%6F%6C%6F%72%3A%23%41%30%30%3B%74%65%78%74%2D%64%65%63%6F%72%61%74%69%6F%6E%3A%6E%6F%6E%65%3B%22%3E%45%61%73%74%20%43%6F%61%73%74%20%53%63%72%69%70%74%73%3C%2F%61%3E%3C%2F%73%70%61%6E%3E"));</script></th></tr></tbody></table><br></tr></tbody></table></center><br>';?>

Many thanks!

    where is it from? why is it 'encoded' in first place?

      dagon;10957960 wrote:

      where is it from? why is it 'encoded' in first place?

      An old project of mine in which I was stupid enough to encode. And with all the hype about HTML5 and CSS3 - I've kinda left anything PHP alone for about 2 years, now I can't remember what it was encoded in, or how I decode it.

      Can anyone help me decode it?

        I would ask how did you get it encoded? I would guess you wrote some code to encoded it originally, so where is that code? I would hope you keep a backup of everything you do.

        Also just looking it over, it appears to be content that was to be displayed I would think there would be an accompanying piece of script that was to decode it when that content was requested. I don't know how it was all setup to work but I am guessing another php file included it and that file may have had the decoding script or it included another php file and it had the decoding script.

        In either case is sounds like you are somehow missing at least 2 critical files for this website you made. :bemused:

        Best of luck, I don't recognize it, and I would guess its a real shot in the dark as to what encoding was used. Maybe someone here will recognize the format but I wouldn't be surprised if a few different types of encoding are similar enough that even a good guess may come up wrong.

          I'm suspicious, its an advertising block, i suspect the actual author put it there to gain revenue from his code. Anyway just running it shows the output. that should be all you need if you wrote it in the first place.

            Looks like, if there is an x after the \, then the value is hex otherwise it is decimal.
            Some letters are not encoded and some I can't figure out.

            \x73\x72c translates to
            src with the c not being encoded
            \x3c\x69m\147 translates to
            <imG with the m not being encoded

            The javascript unescape function there will decipher the URLEncoded stuff for you.

              Write a Reply...