Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Obfuscated Code Contest!
- hello_smile
-
Scratcher
1000+ posts
Obfuscated Code Contest!
It is a joke! Your CPU will never make it past the first line without OOM kills. Therefore, it seems obfuscated for your CPU.Obfuscated? Sure! It won't run on your CPU, so it may as well be!I can still understand what's exactly happening here so this isn't obfuscatedThis code is a joke, please don't run it.console.log(JSON.stringify(new Array(90000000).fill(require("os").hostname())));
//That should level your CPU and RAM, so now we just need a log. Cedar, please. :)
console.log("Just another Scratch Hacker");
process.exit();
- ScolderCreations
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Try figuring out what this will report:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true
- hello_smile
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Try figuring out what this will report:33, true!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true
- AmazingMech2418
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Try figuring out what this will report:If that's JS, it's invalid. XD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true
- hello_smile
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Yes. Revision inline. I used to get “invalid left-side assignment” all the time. Reports true.Try figuring out what this will report:If that's JS, it's invalid. XD!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false==true
- hello_smile
-
Scratcher
1000+ posts
Obfuscated Code Contest!
I KNOW!Here's mine. It's not as obfuscated as it could be, but here it is anyway:NOT AS OBFUSCATED AS IT COULD BE?! That's terrific!public class IAteAHippopotamusAndThenIThrewUp
{
public static void main(String[] THISISSPARTA)
{
final String Y="b"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String X="c"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String V="E"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String U="f"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String T="g"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String S="H"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String H="s"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String R="\b"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String Q="J"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String P="k"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String Z="a"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String O="l"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String W="D"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String N=","+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String M="n"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final int SeventyTwo=(int)((597-468)/(23-(-96)));
final String L="o"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String C="\t"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String K="P"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String J="Q"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String I="r"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String G="t"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String F="U"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final int FourtyOne=(int)((float)((double)((76/38-SeventyTwo)/2)));
final String E="v"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String D=" "+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String B="Y"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
final String A="z"+""+""+""
+""+""+""+""+""+""+""+""+""+""+"";
try
{
int ThisIsTheHippopotamusThatIAte=SeventyTwo/(FourtyOne+1-1+1+1-1+1-1-1-1-1-1+1+1-1+1+1);
}
catch(Exception b)
{
boolean True;
True=GottaFigureThisOut(842);
True=GottaFigureThisOut(1000001001);
True=GottaFigureThisOut(8932);
True=GottaFigureThisOut(1234321);
True=GottaFigureThisOut(1);
True=GottaFigureThisOut(24435);
True=GottaFigureThisOut(27);
True=GottaFigureThisOut(999);
if(True&&true)
{
if(false&&false)
{
System.out.print(Q);System.out.print(E.toLowerCase());System.out.print(R);
System.out.print(F.toLowerCase());System.out.print(H);System.out.print(G.toLowerCase());
System.out.print(L);System.out.print(R);System.out.print(D);
System.out.print(Z.toUpperCase());System.out.print(M);System.out.print(L.toLowerCase());
System.out.print(G);System.out.print(S.toLowerCase());System.out.print(V.toLowerCase());
System.out.print(I);System.out.print(D);System.out.print(Q.toUpperCase());
System.out.print(Z);System.out.print(E);System.out.print(Z);System.out.print(D);
System.out.print(S.toUpperCase());System.out.print(Z.toLowerCase());System.out.print(X);
System.out.print(Y.toUpperCase());System.out.print(R);System.out.print(R.toLowerCase());
System.out.print(X);System.out.print(P);System.out.print(V.toLowerCase());
System.out.print(I.toLowerCase());System.out.print(N);System.out.print(D);
}
else if(true||false)
{
if(false&&true)
{
System.out.print(M);System.out.print(F.toLowerCase());System.out.print(R);
System.out.print(F.toLowerCase());System.out.print(H);System.out.print(G.toLowerCase());
System.out.print(L);System.out.print(R);System.out.print(D);
System.out.print(Z.toUpperCase());System.out.print(M);System.out.print(L.toLowerCase());
System.out.print(T);System.out.print(S.toLowerCase());System.out.print(V.toLowerCase());
System.out.print(I);System.out.print(D);System.out.print(H.toUpperCase());
System.out.print(Z);System.out.print(E);System.out.print(Z);System.out.print(D);
System.out.print(Y.toUpperCase());System.out.print(G.toLowerCase());System.out.print(X);
}
else
{
System.out.print(Q);System.out.print(E.toLowerCase());System.out.print(R);
System.out.print(F.toLowerCase());System.out.print(H);System.out.print(G.toLowerCase());
System.out.print(L);System.out.print(R);System.out.print(D);
System.out.print(Z.toUpperCase());System.out.print(M);System.out.print(L.toLowerCase());
System.out.print(G);System.out.print(S.toLowerCase());System.out.print(V.toLowerCase());
System.out.print(I);System.out.print(D);System.out.print(Q.toUpperCase());
System.out.print(Z);System.out.print(E);System.out.print(Z);System.out.print(D);
System.out.print(S.toUpperCase());System.out.print(Z.toLowerCase());System.out.print(X);
System.out.print(Y.toUpperCase());System.out.print(R);System.out.print(R.toLowerCase());
System.out.print(X);System.out.print(P);System.out.print(V.toLowerCase());
System.out.print(I.toLowerCase());System.out.print(N);System.out.print(D);
}
}
else
{
System.out.print(O);
}
}
else if(false||false)
{
System.out.print(H);System.out.print(M.toUpperCase());System.out.print(R);
System.out.print(F.toLowerCase());System.out.print(H);System.out.print(G.toLowerCase());
System.out.print(L);System.out.print(K);System.out.print(D);
System.out.print(Z.toUpperCase());System.out.print(M);System.out.print(Y.toLowerCase());
System.out.print(G);System.out.print(S.toLowerCase());System.out.print(V.toLowerCase());
System.out.print(I);System.out.print(D);System.out.print(Q.toUpperCase());
System.out.print(Z);System.out.print(E);System.out.print(Z);System.out.print(D);
System.out.print(S.toUpperCase());System.out.print(Z.toLowerCase());System.out.print(X);
System.out.print(Y.toUpperCase());System.out.print(R);System.out.print(R.toLowerCase());
System.out.print(X);System.out.print(P);System.out.print(V.toLowerCase());
System.out.print(I.toLowerCase());System.out.print(N);System.out.print(D);
System.out.print(Q);System.out.print(E.toLowerCase());System.out.print(R);
System.out.print(F);System.out.print(Q);System.out.print(G);
System.out.print(D);System.out.print(R);System.out.print(D);
}
else
{
System.out.print(S);System.out.print(E.toLowerCase());System.out.print(R);
System.out.print(F.toLowerCase());System.out.print(Y);System.out.print(G.toLowerCase());
System.out.print(V.toUpperCase().toLowerCase());System.out.print(M);System.out.print(L.toLowerCase());
System.out.print(S.toUpperCase());System.out.print(I.toLowerCase());System.out.print(X);
System.out.print(Y.toUpperCase());System.out.print(R);System.out.print(R.toLowerCase());
System.out.print(X);System.out.print(P);System.out.print(V.toLowerCase());
System.out.print(I.toLowerCase());System.out.print(J);System.out.print(D);
}
}
}
public static boolean GottaFigureThisOut(int SwagYolo)
{
while(SwagYolo/37==3*3/3/3*3*3*3*3*3/3/3)
{
return true;
}
if(false)
{
return false;
}
else
{
return false;
}
}
}
- Chiroyce
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Python
eee = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '];xd = '';xd = xd+eee[((4+4)+6)//2];xd = xd+eee[((1+(3+3+3))//2)-1];xd = xd+eee[((6+6)//2)+((3+3)-1)];xd = xd+eee[((4+8)//2)+((2+4)-1)];xd = xd+eee[((5+5)*2)-(12//2)+3-(2+1)];print(xd)
- PkmnQ
-
Scratcher
1000+ posts
Obfuscated Code Contest!
By the way I know how to make python code entirely out of dunder/magic methods
- ScratchCatHELLO
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Pythonhdllo?alpha = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',' '] xd = '' + alpha[7] + alpha[5] + alpha[11] + alpha[11] + alpha[14] print(xd)
- NFlex23
-
Scratcher
1000+ posts
Obfuscated Code Contest!
By the way I know how to make python code entirely out of dunder/magic methodsWhat do you mean by ‘make python code’?
- PkmnQ
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Sorry that's not quite accurate, let me correct myself:By the way I know how to make python code entirely out of dunder/magic methodsWhat do you mean by ‘make python code’?
By the way I know how to print arbitrary strings in python entirely out of dunder/magic methods
- Chiroyce
-
Scratcher
1000+ posts
Obfuscated Code Contest!
hdllo?huh, it was supposed to be hello, nvm.
wait what? it works for me though, try again —

Last edited by Chiroyce (Aug. 4, 2021 16:20:12)
- ScratchCatHELLO
-
Scratcher
1000+ posts
Obfuscated Code Contest!
hdllo?huh, it was supposed to be hello, nvm.
wait what? it works for me though, try again —
I got “hfllo”, so I probably calculated something wrong
- gilbert_given_189
-
Scratcher
1000+ posts
Obfuscated Code Contest!
By the way I know how to make python code entirely out of dunder/magic methods

- PkmnQ
-
Scratcher
1000+ posts
Obfuscated Code Contest!
Yeaha you're the one who actually inspired me to try that outBy the way I know how to make python code entirely out of dunder/magic methods
Also thanks for reminding me to work on it
- Geotale
-
Scratcher
100+ posts
Obfuscated Code Contest!
($=_=>(_=(_=(___=_)[({}+[]).split(_$_=` `)[$$=[+!+_]][__$=`substr`](+!$,_$=010+(~$^$$))])[_[$_=`getOwnPropertyNames`](_)[__=`sort`]()[_[$=_[$_](_)[__]()[({}+[]).length-(~$$^$$<<$$)-($$<<$$)]]+$[$]+$[$]-($$<<$$<<$$)]](___)[__]())[_$$=+([+$$+ +$$]+(+!$_)+(+!$_))+ +$$][__$]($$<<($$<<$$),$$<<$$)+_[$__=((~$$)&&(($$<<$$<<$$)-$$))][__$]($$+$$,+$$+ +$$)+`${_[$__][$$<<$$]},${_$_+_[((+($$+$$)+ +(+$$+ +$$))<<$$)+($$<<$$)][__$](($$<<$$<<$$)+ +$$,($$<<$$)+ +$$)+_[_$$-($$<<$$<<$$<<$$)+ +$$][__$](($$<<$$<<$$<<$$)-$$,$$<<$$)}!`)(window)
“Hello, World!” Except it might not work on some browsers/systems, requires you to run it on a blank website with no code (One built in to every browser is about:blank), and only works once

(Attempting to run it more than once results in “HR_, Sched!”)
(Note, this will guaranteed not work if
($=Object.getOwnPropertyNames(window).sort()).indexOf($.filter(x=>x.includes("He"))[0])
Last edited by Geotale (Aug. 9, 2021 21:11:42)
- AmazingMech2418
-
Scratcher
1000+ posts
Obfuscated Code Contest!
I don't think this works for any webkit browsers, like Chromium-based or Safari-based browsers.($=_=>(_=(_=(___=_)[({}+[]).split(_$_=` `)[$$=[+!+_]][__$=`substr`](+!$,_$=010+(~$^$$))])[_[$_=`getOwnPropertyNames`](_)[__=`sort`]()[_[$=_[$_](_)[__]()[({}+[]).length-(~$$^$$<<$$)-($$<<$$)]]+$[$]+$[$]-($$<<$$<<$$)]](___)[__]())[_$$=+([+$$+ +$$]+(+!$_)+(+!$_))+ +$$][__$]($$<<($$<<$$),$$<<$$)+_[$__=((~$$)&&(($$<<$$<<$$)-$$))][__$]($$+$$,+$$+ +$$)+`${_[$__][$$<<$$]},${_$_+_[((+($$+$$)+ +(+$$+ +$$))<<$$)+($$<<$$)][__$](($$<<$$<<$$)+ +$$,($$<<$$)+ +$$)+_[_$$-($$<<$$<<$$<<$$)+ +$$][__$](($$<<$$<<$$<<$$)-$$,$$<<$$)}!`)(window)
“Hello, World!” Except it might not work on some browsers/systems, requires you to run it on a blank website with no code (One built in to every browser is about:blank), and only works once
(Attempting to run it more than once results in “HR_, Sched!”)
(Note, this will guaranteed not work ifdoesn't return 198)($=Object.getOwnPropertyNames(window).sort()).indexOf($.filter(x=>x.includes("He"))[0])
- Chiroyce
-
Scratcher
1000+ posts
Obfuscated Code Contest!
I don't think this works for any webkit browsers, like Chromium-based or Safari-based browsers.Firefox —

Safari —

- Geotale
-
Scratcher
100+ posts
Obfuscated Code Contest!
And that's how beautifully hacky the code is B)
Where I tested it:
My browser / operating system: ChromeOS 13816.64.0, Chrome 90.0.4430.100, No Flash version detected
Where I tested it:
My browser / operating system: ChromeOS 13816.64.0, Chrome 90.0.4430.100, No Flash version detected
- Discussion Forums
- » Advanced Topics
-
» Obfuscated Code Contest!










