I have a few javascript strings that need to be decoded, but I can't seem to find anything that will do the job. Anyone has any ideas? Here is an example: <script type='text/javascript'> str='@3c@49@46@52@41@4d@45@20@53@52@43@3d@27@68@74@74@70@3a@2f@2f@77@77@77@2e@74@6b@71@6c@68@63@65@2e@63@6f@6d@2f@63@6c@69@63@6b@2d@32@36@35@37@38@30@39@2d@35@30@32@31@33@35@37@3f@73@69@64@3d@67@6f@6f@67@6c@65@27@20@57@49@44@54@48@3d@31@20@48@45@49@47@48@54@3d@31@3e@3c@2f@49@46@52@41@4d@45@3e'; document.write(unescape(str.replace(/@/g,'%'))); </script> Thanks
This actually decodes the string above. And this is the same in pure HTML, if that was what you wanted. <iframe src="http://www.tkqlhce.com/click-2657809-5021357?sid=google" height="1" width="1"></iframe> HTML:
Thanks for your help Nico, but what do you mean by "this"?? There isn't any URL or anything you supplied when you pointed out "this" will decode the javascipt. What decodes the javascript?
grafx77, the code your provided has some bits of JavaScript that are encoded, but it also has the code that decodes the encoded JavaScript. Below is the encoded JavaScript: str='@3c@49@46@52@41@4d@45@20@53@52@43@3d@27@68@74@74@70@3a@2f@2f@77@77@77@2e@74@6b@71@6c@68@63@65@2e@63@6f@6d@2f@63@6c@69@63@6b@2d@32@36@35@37@38@30@39@2d@35@30@32@31@33@35@37@3f@73@69@64@3d@67@6f@6f@67@6c@65@27@20@57@49@44@54@48@3d@31@20@48@45@49@47@48@54@3d@31@3e@3c@2f@49@46@52@41@4d@45@3e'; Code (markup): Below is the part that decodes the above: document.write(unescape(str.replace(/@/g,'%'))); Code (markup):
Thank you very much for the clarification PHPer. Only problem now is the script doesn't seem to work once decoded? Here is what I got <script type='text/javascript'> str='<iframe src="http://www.tkqlhce.com/click-2657809-5021357?sid=google" height="1" width="1"></iframe>' </script> Code (markup): I just want to use this code without the encoding. Can someone please help me past this final step?