There are many websites to decode and encode javascript. But the actual thing is we should know in which formate the current code is present.
Blogger template designers put Three types of code in the template.
- Hex code.
- Packed code.
- Mixed code.
1. Hex code
Ex: var _NDQTuH= "\x65\x76\x61\x6c\x28\x66\x75\x6e\x63\x74\x69\x29\x0a";eval(_NDQTuH);
This is a dummy code shown for example.
Decoding
To Decode this type of hex code we can search google for hex decoder. We get the results like
http://ddecode.com/hexdecoder/
2. Packed code
Ex: eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(0(){4 1="5 6 7 8";0 2(3){9(3)}2(1)})();',10,10,'function|b|something|a|var|some|sample|packed|code|alert'.split('|'),0,{}))
This is not a dummy text you will find some when unpacked.
Decoding
To decode this type of packed code we can search google for javascript unpacker. We will get results like
https://lelinhtinh.github.io/de4js/
3. Mixed code
This is the most common code type used in many blogger templates. The thing in this is first they pack the code and then they encode with hex. Some of the developers even use JsObfuscator and compress it.
Decoding
- If it is in Hex formate then decode using Hex decoder.
- Now you will get packed code.
Ex: var _NDQTuH= eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(0(){4 1="5 6 7 8";0 2(3){9(3)}2(1)})();',10,10,'function|b|something|a|var|some|sample|packed|code|alert'.split('|'),0,{})); eval(_NDQTuH); - Now decode the code between the = and ; using packed decode. i.e., remove the var in starting up to = and remove from the eval in the last.
Ex: eval(function(p,a,c,k,e,r){e=String;if(!''.replace(/^/,String)){while(c--)r[c]=k[c]||c;k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(0(){4 1="5 6 7 8";0 2(3){9(3)}2(1)})();',10,10,'function|b|something|a|var|some|sample|packed|code|alert'.split('|'),0,{}))
This is worked for some blogger templates.
0 Comments