Discuss Scratch

hello_smile
Scratcher
1000+ posts

Obfuscated Code Contest!

wvj wrote:

hello_smile wrote:

Obfuscated? Sure! It won't run on your CPU, so it may as well be!
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();
This code is a joke, please don't run it.
I can still understand what's exactly happening here so this isn't obfuscated
It is a joke! Your CPU will never make it past the first line without OOM kills. Therefore, it seems obfuscated for your CPU.
ScolderCreations
Scratcher
1000+ posts

Obfuscated Code Contest!

Try figuring out what this will report:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true 
hello_smile
Scratcher
1000+ posts

Obfuscated Code Contest!

ScolderCreations wrote:

Try figuring out what this will report:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true 
33, true
AmazingMech2418
Scratcher
1000+ posts

Obfuscated Code Contest!

ScolderCreations wrote:

Try figuring out what this will report:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false = true 
If that's JS, it's invalid. XD
hello_smile
Scratcher
1000+ posts

Obfuscated Code Contest!

AmazingMech2418 wrote:

ScolderCreations wrote:

Try figuring out what this will report:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!false==true 
If that's JS, it's invalid. XD
Yes. Revision inline. I used to get “invalid left-side assignment” all the time. Reports true.
hello_smile
Scratcher
1000+ posts

Obfuscated Code Contest!

goldfish678 wrote:

scratcher7_13 wrote:

Here's mine. It's not as obfuscated as it could be, but here it is anyway:
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;
}
}
}
NOT AS OBFUSCATED AS IT COULD BE?! That's terrific!
I KNOW!
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!

Chiroyce wrote:

Python
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)
hdllo?
NFlex23
Scratcher
1000+ posts

Obfuscated Code Contest!

PkmnQ wrote:

By the way I know how to make python code entirely out of dunder/magic methods
What do you mean by ‘make python code’?
PkmnQ
Scratcher
1000+ posts

Obfuscated Code Contest!

NFlex23 wrote:

PkmnQ wrote:

By the way I know how to make python code entirely out of dunder/magic methods
What do you mean by ‘make python code’?
Sorry that's not quite accurate, let me correct myself:
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!

ScratchCatHELLO wrote:

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)

wvj
Scratcher
1000+ posts

Obfuscated Code Contest!

Bump
ScratchCatHELLO
Scratcher
1000+ posts

Obfuscated Code Contest!

Chiroyce wrote:

ScratchCatHELLO wrote:

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!

PkmnQ wrote:

By the way I know how to make python code entirely out of dunder/magic methods
PkmnQ
Scratcher
1000+ posts

Obfuscated Code Contest!

gilbert_given_189 wrote:

PkmnQ wrote:

By the way I know how to make python code entirely out of dunder/magic methods
Yeaha you're the one who actually inspired me to try that out

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])
doesn't return 198)

Last edited by Geotale (Aug. 9, 2021 21:11:42)

AmazingMech2418
Scratcher
1000+ posts

Obfuscated Code Contest!

Geotale wrote:

($=_=>(_=(_=(___=_)[({}+[]).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])
doesn't return 198)
I don't think this works for any webkit browsers, like Chromium-based or Safari-based browsers.
Chiroyce
Scratcher
1000+ posts

Obfuscated Code Contest!

AmazingMech2418 wrote:

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

Powered by DjangoBB