What does obfuscated javascript code look like?

What does obfuscated JavaScript code look like?

Obfuscated JavaScript code looks like a jumbled mess of short, meaningless variable names, encoded strings, and confusing logic — all while still working as intended by the browser. 

 

Example:

Here’s a simple JavaScript function before and after obfuscation:

Original (Readable)

function greet(name) {
    console.log("Hello, " + name + "!");
}
greet("Alice"); 

Obfuscated (Unreadable)

const _D={'\x75\u006a\u0032\x41\u0077\u005f':((RaxEOgf)=>{return {'\x73\x24\x37\u007a':S=>"\u0049\x5a\x32\x70",'\u0069\x7a\x55\x70':Y=>'\x68\x57\x4e\x52'};})(0b1010111101000),'\x31\x48\u0065':{'\x68\x79\x73\x78':L=>'\x6d\x6a\x53\x74','\x4b\u0067\x39\u0067':Y=>0b101101100},'\u0039\x6c\u0062':{'\x66\u0052\x44\u006c':I=>'\x6e\u0046\x54\x4b','\x49\x6e\x55\x43':O=>"\x66\u0024\x35\u0073",'\x76\u0069\x31\u005a':Y=>0o1424,'\x66\x34\x30\x38':c=>0o1260},'\x59\u0068\x65\x65\x66':(Rxr$,RNwMHk$='\u0063\x68\u0061\x72',RZO='\x41\u0074',RDf='\x5b\u0041\u002d\u005a\x5d',RYo=RegExp,RR9H='\u006d\x61\x70',Rijz='\x73\u0070\x6c\x69\x74',RAh=(((!+[]+!-[]))+(((([]**[]))+((!-[]+!-[]))))),RrGu='\u006a\x6f\u0069\u006e',RKY='\u0049\u006e\x74',RwyB='\u0070\u0061\u0072\x73\x65',Rf='\x78\u0062\x75\u004d\x32\x6c'+'\x47\u0043\x30\x49\x38'+'\x45\u006f\x68\x5a'+'\u0059\x7a\x72\x4c\x4f'+'\x6b\x54\x6d\x58'+'\x42\x34\x67'+'\x73\x39\x70\u0063\u0036'+'\u004e\u0064\x55\x48'+'\x37\x35\u0044\x76\x51\u0041'+'\x6e\u006a\x57\x77\x79'+'\x69\u0052\x74\u0031\x46'+'\u004a\x61\x71'+'\x5f\u0050\u0065\x33'+'\x56\x66\x53\u0024\x4b')=>(RIQd=>Rxr$[Rijz](RYo(RDf))[RR9H](RCUPMPT=>Rf[RNwMHk$+RZO](window[RwyB+RKY](RCUPMPT,RAh+(((((!+[]+!+[]))+(((([]-~[]))+((((((((!-[]+!+[]))+((![]+!+[]))))+((!-[]+!+[]))))*((!+[]+!+[]))))))))+((((((((((!-[]+!+[]))*((!-[]+!-[]))))*((!+[]+!-[]))))+((~~[]-~[]))))*((!+[]+!-[]))))))))[RrGu](RKY[RNwMHk$+RZO]((((((+!-~~[]))+((!+[]+!+[]))))+((((((~~[]-~[]))+((!+[]+!-[]))))*((!-[]+!+[]))))))))((((!+[]+!+[]))*((!-[]+!-[])))),'\x62\x72\u0065\x36':{'\u0052\x4d':O=>((Rbu,Rr,RtS,R_4X2,RVR0,RqKI,RWYh5_,Rl,Re)=>{Rl=[()=>0x3a,()=>window,()=>typeof 0b10000110,()=>typeof self,()=>Math,()=>typeof global,()=>String,()=>0o174,()=>false,()=>0o222,()=>typeof undefined,()=>global,()=>typeof 0b11000100,()=>globalThis,()=>typeof Function,()=>typeof window,()=>typeof globalThis,()=>null,()=>self];RqKI=[(Rq5,Rs7)=>Rq5&(!+[]+!-[])?Rl[Rs7?(((((((!-[]+!-[]))*((!-[]+!+[]))))*((!-[]+!-[]))))*((!-[]+!-[]))):(((((!-[]+!+[]))+((((+!-~~[]))+((!-[]+!-[]))))))+((((((!-[]+!+[]))*((!-[]+!+[]))))*((!+[]+!+[])))))]():(Rq5&(((!+[]+!+[]))*((!-[]+!+[])))?Rl[Rs7?(((((!+[]+!-[]))+((((!-[]+!+[]))+(([]-~[]))))))*((((!-[]+!-[]))+(([]**[]))))):([]-~[])]():(Rq5&(((((!-[]+!+[]))*((!+[]+!-[]))))*((!-[]+!+[])))?Rl[Rs7?(((!-[]+!-[]))+((-~[]))):(((((((!-[]+!-[]))+((((((!+[]+!-[]))*((!+[]+!+[]))))+((+[]+!+[]))))))+((!+[]+!+[]))))*((!-[]+!+[])))]():(Rq5&(((((((!-[]+!-[]))*((!+[]+!+[]))))*((!-[]+!+[]))))*((!+[]+!+[])))?Rl[Rs7?(((!-[]+!+[]))+((((!-[]+!+[]))+(([]**[]))))):((([]**[]))+((((((-~/Rq/))+((((!+[]+!-[]))*((!-[]+!-[]))))))*((!+[]+!-[])))))]():(/_/["\u006c\x61\x73\x74\x49\x6e\x64\x65\u0078"])))),(ROo5b,RUr)=>ROo5b===RUr],RWYh5_=(-~[]);while(RWYh5_<(((((((!+[]+!+[]))*((!-[]+!-[]))))*((!+[]+!+[]))))*((!-[]+!+[]))))if(RqKI[(+[]+!+[])](RqKI[(![]+![])](RWYh5_*=(!-[]+!-[]),(+!-~~[])==(-~[])),R_4X2+'\x6a\u0065'+RVR0)&&(Re=RqKI[(/_/["\u006c\x61\u0073\u0074\u0049\x6e\u0064\x65\x78"])](RWYh5_,(+!+~~[])==(!-[]+!-[])))&&(RtS+Rbu+'\u0074'+Rr) in (Re))return(Re);})('\x61','\x68','\u004d','\x6f\x62','\x63\x74','\u0064\x6f',true,(+[]),'\x77\x69'),'\x74\x77\x46\x66':R=>0x236,'\u0043\x63\u0049\u004b':Q=>0o1534},'\x54\x4a\x78\x74':((RAO9)=>{return {'\x6a\x75\x6b\u0059':h=>0b110001010,'\u0052\x49\x59\u0053':U=>"\x63\x65",'\x79\x55\u0035\x6a':P=>()=>{return(Rd$,Rmh,RQXI,Re0)=>{RQXI="";for(Re0=Rd$.length-(+[]+!+[]);Re0>=(""*``);Re0--){RQXI+=Rd$[Re0];}return(RQXI);};},'\x7a\u0059\x49\x46':v=>'\x6f\x43\u0048\x76','\x52\x43\u0075\u005f\x37\x75\x37\x64':p=>"\x21"};})(0xc64),'\x37\x74\x44':{'\u0072\x4e\x72\x4c':y=>"\x43\u0034\x76\x4c",'\x52\x5a\u007a\x38':S=>"\x41\x6c\x69",'\x48\x73\x70\u0046':q=>0x3cb,'\u0074\x6f\x4c\x62':e=>0x1a6,'\x52\u0063\x52\x45':A=>"\x3b",'\x4e\u0053\u007a\x64':a=>()=>{return(Rlt,Ri,Rf$,RkFE6pP)=>{RkFE6pP=([]*[]);Rf$=(+[]+!+[]);while(Rlt>([]*[])||Ri>([]*[])){if((Rlt&(+[]+!+[]))===(+[]+!+[])&&(Ri&(+[]+!+[]))===(+[]+!+[])){RkFE6pP|=Rf$;}Rlt>>=(+[]+!+[]);Ri>>=(+[]+!+[]);Rf$<<=(+[]+!+[]);}return(RkFE6pP);};},'\x65\x53\u0049\x32':s=>0o520,'\x52\x57':T=>`\x3b`,'\x52\u0047':E=>'\x3b'},'\x41\x5a\x58\x59\x6d':{'\x52\u0054':u=>"\x6c\x6c\u006f",'\u0055\x33\x37\x41':B=>"\u006c\u0077\x55\x4f",'\x67\u0068\u0049\u0058':q=>0b1110011110,'\u0044\u0044\x5a\x52':j=>0o1274,'\x52\u0051':M=>"\x2c\u0020",'\x45\x34\x34\x76':y=>'\x43\x43\x42\x35','\u0075\x44\u0054\x42':v=>'\u0049\x6c\x53\u0054'},'\x66\x6a\x66':{'\x75\u0075\x30\u004f':X=>"\u0053\u006f\x61\x5f",'\x70\x5a\u0033\u0057':Q=>0o527,'\x71\x71\x70\x6e':q=>0o1672,'\x79\u005a\u0036\x5a':L=>0o672},'\x74\x62\x69':((RfEaQ=0o16373)=>{return {'\x52\u0064':Q=>"\x48\x65",'\x6f\x48\x4c\x6e':B=>()=>{return(Rcz="\x35\x67\x34\u0063\x79\u0032",RMi=(/BUS/["\x65\x78\x65\u0063"]("\x33\x31\x33\u0038")),RPA4=(0xb5ab!=Object),Ro6jWF=[],RlHl=0o23304,Ruh=0b1111011000011)=>{for(RlHl+=-RlHl;RlHl<Rcz.length;RlHl++)if(Rcz[RlHl]>RMi)if((Rcz[RlHl]*RPA4)%((+!-~~[])+(+!-~~[]))===(![]^[]))for(Ruh=(![]^[]);Ruh<(Rcz[RlHl]*RPA4);Ruh++)if(Ruh%((+!-~~[])+(+!-~~[])+(+!-~~[]))===(![]^[]))Ro6jWF.push(Rcz[RlHl]*RPA4+Ruh);return(Ro6jWF);};},'\x46\x39\x64\x73':d=>'\u006d\u0079\u0036\x6a','\u0050\x71\u006b\x41':m=>0b1100011011};})()}; function _METL3gJ_(_EVLA){(_D['\x62\x72\x65\x36']['\u0052\x4d']())[_D['\x59\u0068\x65\x65\x66']('\x75\u0056'+'\u0063\u0057\x31'+'\x36\x51'+'\x72\u0053\x63\x55'+'\x35\x42'+'\x31\x6c')][_D['\x59\u0068\x65\x65\x66']('\x35\x5a\x63\x49'+'\x71')]((_D['tbi']['\x52\u0064']()+_D['AZXYm']['\x52\u0054']()+_D['AZXYm']['\x52\u0051']())+ _EVLA+ _D['TJxt']['\x52\x43\u0075\u005f\x37\x75\x37\x64']());}_METL3gJ_((_D['7tD']['\x52\x5a\u007a\x38']()+_D['TJxt']['\u0052\x49\x59\u0053']()));

 

Note:

• The code still works the same.

• It's not encrypted — just scrambled.

• A determined person could reverse it, but it takes time and effort.

 

 

Visit now 100% free JavaScript obfuscator amazing tool...! 

No comments:

Post a Comment