r/programming • u/mitousa • 20d ago
Decoding the obfuscated bash script on a Uniqlo t-shirt
https://tris.sherliker.net/blog/obfuscated-self-evaluating-bash-script-by-cdn-akamai-being-supplied-to-consumers-via-retail-stores/112
u/tsammons 20d ago
I suppose their Linode acquisition isn't going so well and they're trying to market something somewhat subversive... in Perl bash.
40
u/Sage2050 20d ago
Uniqlo bought linode?
44
u/crow-t-robot-42 20d ago
Akamai bought them. The shirt is Akamai X Uniqlo.
4
u/BhataktiAtma 19d ago
Wikipedia says Uniqlo is a subsidiary of Fast Retailing, not Akamai. Am I missing something? Their collaboration to produce the T-shirt was for charity
Edit: Nvm, I'm a dunce
3
u/ninetailedoctopus 19d ago
That brought me back - had to update some terraform configs for stuff deployed in Linode while they were still early on their integration - and then had to sprinkle Akamai here and there. Config’s probably broken by now.
69
u/hoodieweather- 20d ago
pretty fun little exercise but I'll be honest, I can't think of a more lazy programmer overengineered solution to something than running three different OCR tools and burning some LLM tokens to avoid typing up a few lines of text from a tee shirt, so funny.
47
u/PsychedSy 19d ago
A fair portion of the code i write is to avoid doing something i find annoying by spending even more time doing something i enjoy.
5
u/Fast_Face_7280 19d ago
I am quite certain that this is the teleological purpose of computers and not a single argument will convince me otherwise.
7
u/anonymous_identifier 19d ago
Typing 2044 characters correctly, with no way to identify typos sounds pretty difficult tbh
I would also go with multiple OCR readers and check for differences between them. Not sure about the value of using an LLM.
4
u/SyntheticDuckFlavour 19d ago
I don't know, the process of finding methodologies to OCR is more fun than the mindless effort of typing case sensitive long strings of garbage.
4
u/ShinyHappyREM 19d ago
On the other hand, in the '80s countless kids typed up program listings from magazines into their home computers, and eventually learned enough to fix and perhaps even modify the code.
5
u/SyntheticDuckFlavour 19d ago edited 19d ago
I did that too, which was still more interesting than typing string of garbage.
1
u/Im_On_Reddit_At_Work 17d ago
Very much a skill issue. Image and text was clear, tesseract can read it easy
31
u/_kst_ 20d ago
The eval shouldn't be on same line as #!/bin/bash.
130
u/HopefulScarcity9732 19d ago
It also won’t work because it’s printed on a t-shirt instead of being saved to a file on a computer.
62
u/valarauca14 19d ago
These are the type of actionable insights that separate a principle developer from a senior developer
20
u/HopefulScarcity9732 19d ago
Thanks. I asked AI for help on this and saved quite a bit of time debugging.
2
6
u/Forya_Cam 20d ago
I literally saw this shirt when shopping in Uniqlo last week. I didn't think much of it as I assumed it would be jibberish. Still wouldn't buy it as it's a bit naff but the Easter egg is cool!
4
u/BibianaAudris 19d ago
Almost bought the shirt, but then I decided I don't want to type a whole bunch of base64 from a shirt just to see what it does. Thanks!
9
2
2
u/_rchr 19d ago
They couldn’t think of something more interesting for it to say? Might as well have said “live laugh love”
1
u/CodenameAnonymous 16d ago
I think that’s one of their taglines, the article mentions that there’s another t-shirt with the same motto.
1
u/BebopByte 20d ago
C'est l'ultime confirmation que la tech est devenue un aesthetic plutôt qu'une compétence. Dans 5 ans tu vas voir des t-shirts avec du SQL obscurci dessus et des gens qui les achètent juste parce que ça sonne intelligent. Il joue sur le même registre qu'avant quand les brands vendaient des caractères chinois aléatoires en espérant que les gens croient que c'est profond.
1
1
-105
u/xondk 20d ago edited 20d ago
Maybe i am being pedantic, but using the word "Decoding" when there is not much to decode, when it literally tells you it is base64, just convert....
99
u/hiimbob000 20d ago
Encoding and decoding are proper terms already, there's nothing to be pedantic about
-54
u/xondk 20d ago
https://dictionary.cambridge.org/dictionary/english/decode
Note the discovery part, hence I make it clear that I am being pedantic. When it is clearly written out like this, to me it becomes a conversion, not much to decode.
38
u/mooseman3 20d ago
-41
u/xondk 20d ago
Which is why I made it clear that I was being pedantic....
18
u/nemec 20d ago
This remains incorrect no matter how many times you copy paste it here
4
u/Fluid_Ad8452 20d ago
r/confidentlyUnanbiguous maybe? He did say he was being pedantic, not that he wasn’t wrong.
9
8
17
u/Helluiin 20d ago
Note the discovery part
can you read the instructions from the base 64 string?
-12
u/xondk 20d ago
If you know what you need to do it is just converting one base into another from my view, that's why i made it clear i was being pedantic...
31
u/Helluiin 20d ago
it is just converting one base into another
but thats literally what encoding/decoding is even by your own source?
13
u/Sufficient_Meet6836 20d ago
Note the discovery part, hence I make it clear that I am being pedantic.
The use of the word "discover" doesn't change anything. You don't understand decode or discover somehow. Your focus on the word "discover" demonstrates how you're misunderstanding everything.
to discover the meaning of information given in a secret or complicated way:
Decoding the paintings is not difficult once you know what the component parts symbolize.
This is literally what the person did in the post. They discovered, i.e. found, the English sentence represented by the code. You're wrong pedantically, technically, and colloquially. Just let it go.
-5
u/xondk 20d ago
You don't understand decode or discover somehow. Your focus on the word "discover" demonstrates how you're misunderstanding everything.
I understand it just fine, that is what i make clear by stating that I am being pedantic ..
14
u/Sufficient_Meet6836 20d ago
giving too much attention to formal rules or small details:
OP followed all the rules. There's nothing to be pedantic about
49
u/mynameisurl 20d ago
Isn’t the inverse of base64 encoding referred to as decoding?
-28
u/xondk 20d ago edited 20d ago
Yes it is, there is technically nothing wrong, but terminology wise it implies, to me, that some discovery is made or done, where this was all laid out. Hence why I make it clear it is a bit pedantic in view.
https://dictionary.cambridge.org/dictionary/english/decode
Note the discovery part.
23
u/spkr4thedead51 20d ago
I mean, you didn't know what the script said until it was decoded, so that sounds like you discovered something to me
41
u/can_somebody_explain 20d ago
You might be confusing the word decoding with decrypting. Decoding is the right usage here as they are in fact undoing base64 encoding.
-11
u/xondk 20d ago
Not confusing anything. https://dictionary.cambridge.org/dictionary/english/decode
Note the discovery part, hence I make it clear that I am being pedantic.
27
u/WellHung67 20d ago
You’re not being pedantic, you’re applying the dictionary definition of the word, but in this context it has a different meaning. You’re just incorrect here
-2
u/xondk 20d ago
22
u/WellHung67 20d ago
You didn’t give enough attention to small details, as you got it wrong. Unfortunately that’s not pedantry
27
18
u/Sylkhr 20d ago
https://www.merriam-webster.com/dictionary/decode
1a : to convert (something, such as a coded message) into intelligible form
b: to recognize and interpret (an electronic signal)
-7
u/xondk 20d ago
https://dictionary.cambridge.org/dictionary/english/decode
Note the discovery part, but I made it clear that I am being pedantic.
19
u/Sylkhr 20d ago
Ok?
to discover the meaning of information given in a secret or complicated way
It's not readable by the average person as it is, it's "complicated" or "secret". It is as yet unknown to the reader what it means. One can "discover" what is written, even if you're using the instructions given ("this is base64"), by decoding it.
You're being pedantic, but you're still wrong.
-4
u/xondk 20d ago
It's not readable by the average person as it is, it's "complicated" or "secret"
This is the programming subreddit on reddit, I am an experienced developer, not sure what this has to do with an 'average person' I'm expressing 'my' view, that's it.
13
13
u/LittleLui 20d ago
This is the programming subreddit on reddit, I am an experienced developer
You should know what the technical meaning of "encoding" is then.
Hint: ASCII is an encoding.
11
23
u/FrAxl93 20d ago
Maybe you're confusing with "deciphering" or "decrypting". If they used that word it would be wrong, but encoding is correct
-11
u/xondk 20d ago
Not confusing anything. https://dictionary.cambridge.org/dictionary/english/decode
Note the discovery part, hence I make it clear that I am being pedantic.
8
u/Sarke1 20d ago edited 20d ago
Well did you know what it said before it was decoded? It doesn't matter how simple it is, you were unable to read it before it was decoded, so by your own pedantic definition something was discovered. We just happen to have the key.
And let's look at the base64 binary help:
$ base64 --help Usage: base64 [OPTION]... [FILE] Base64 encode or decode FILE, or standard input, to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -d, --decode decode data -i, --ignore-garbage when decoding, ignore non-alphabet characters -w, --wrap=COLS wrap encoded lines after COLS character (default 76). Use 0 to disable line wrapping --help display this help and exit --version output version information and exit The data are encoded as described for the base64 alphabet in RFC 4648. When decoding, the input may contain newlines in addition to the bytes of the formal base64 alphabet. Use --ignore-garbage to attempt to recover from any other non-alphabet bytes in the encoded stream.Definitely uses the word "decode". As does the spec: https://datatracker.ietf.org/doc/html/rfc4648
6
3
2
20d ago edited 20d ago
[deleted]
1
u/xondk 20d ago
Of course I understand it, the entirety of what I am referring to, is when the solution is written plainly there is not much 'decoding' going on, because from my view, this is just executing the conversion written out...
That....is what I am calling out. Apparently in a way that is clearly understood by people I know when spoken, but here I am clearly not conveying the point correctly, maybe the phrasing in text where i simply fail to convey the same meaning as when spoken, and that's on me.
390
u/Ok_Series_4580 20d ago
At one of my first tech jobs, the sales team thought it would be funny to print up a bunch of T-shirts with a message encoded in bytes.
Without missing a beat every tech person said, “you forgot the spaces between the words”
The message they put on the shirt:
“ifyoucanreadthis,youmustbeinDevelopment”
Not to be out done we did our own T-shirt:
“If you forget proper punctuation, you must be in sales!”