Jump to content

eval(unescape


sventhors

Recommended Posts

Cheers,

I am new to programming and other web design. I am just an artist. Trying to learn.

I bought a code (PHP) for a web site and one of the files had a .js. When I open it up it had…

eval(unescape("%66%75%6E%63%74%

I found a site (http://decoder.lle.me/) to decode it and it said this:

function hp_d11(s){var o="",ar=new Array(),os="",ic=0;for(i=0;i<s.length;i++){c=s.charCodeAt(i);if(c<128)c=c^2;os+=String.fromCharCode©;if(os.length>80){ar[ic++]=os;os=""}}o=ar.join("")+os;return o}

How do I decode it all or how do I decode the rest. It has a lot more code (different from %66%75%6E%63%74% ) which I was not able to decode. What is purpose of this? Also, is there they might have added codecs (probably in php code I guess) or upload max size of images for a site?

Sorry for all the questions and thank you for anyone for answering my questions.

Take Care…

Link to comment
Share on other sites

Post in code brackets using

 
whatever code you want looked at

[/code]

and we can see what it does. Depending on what is in the code, it could be legit. Both javascript and php can use eval statements, but often, when you see something using an eval in php, its usually obfuscated code meant to try and get past filters. Until we see all the source, we have no idea what you have.

function hp_d11(s) {

var o = "",

ar = new Array(),

os = "",

ic = 0;

for (i = 0; i < s.length; i++) {

c = s.charCodeAt(i);

if (c < 128) c = c ^ 2;

os += String.fromCharCode©;

if (os.length > 80) {

ar[ic++] = os;

os = ""

}

}

o = ar.join("") + os;

return o

}

looks like only part of the function. I'm assuming there is more, and somewhere it calls the hp_d11(s) function to do whatever the rest it is it decodes and executes. Edited by digip
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...