Live data from Hacker News

Decoding the obfuscated bash script on a Uniqlo t-shirt

tris.sherliker.net

31–40 of 253 posts

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#31

P ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found E ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found Very wow. Shame they assumed everyone has "bc"...

Why would that be a shame? "bc" is a mandatory POSIX command, while /bin/bash isn't (/bin/sh is the standard).

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#32
post #8

Earlier quoted context omitted.

Definitely LLM. No humans write that many comments.

Honestly it's a bit of a shame. I checked and they could've shortened their base64 payload by 304 chars by removing all comments except the top two congratulatory ones, or by 524 if they removed those too.

Would they still get the highlighted "PEACE FOR ALL" text throughout the shortened string? It looks like the length, and presence of those characters, was an explicit design choice.

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#33
post #5

Why does the shirt have an obfuscated bash script on the back?

Uniqlo frequently does collaborations. This was one with a tech company

It's at least the second one that Akamai's done, although I like this newest one the most.

The old one was: https://www.uniqlo.com/us/en/products/E459561-000/00

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#34

P ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found E ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found Very wow. Shame they assumed everyone has "bc"...

You are fun.

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#35
post #19
post #9

I thought it was funny that the author used a variety of OCR tools with mixed success before spending a lot of time manually fixing up the output from the best one, rather than just typing it in

Took me almost 2 minutes for 4 lines (and I missed a character in one of them!). I would opt for OCR too, obviously so I'm prepared for the next bash t-shirt I'd come across...

I think this is a case where two people can successfully complete the task manually faster than one attempting to automate it. Get a ruler, read five centimetres of characters to your colleague, have them type it in as you go, then repeat that five centimetres back to you. Correct as you go. Format your string with the same line-breaks as the t-shirt, and remove them at the end, so you can be sure you've got the correct length on each row. Trial-and-error adjust the five-cm distance depending on your success rate as you go along

All in, you should have a non-corrupted string in 10-15 min.

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#36
post #31

P ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found E ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found Very wow. Shame they assumed everyone has "bc"...

Why would that be a shame? "bc" is a mandatory POSIX command, while /bin/bash isn't (/bin/sh is the standard).

[deleted]

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#37
post #8

Earlier quoted context omitted.

Definitely LLM. No humans write that many comments.

Honestly it's a bit of a shame. I checked and they could've shortened their base64 payload by 304 chars by removing all comments except the top two congratulatory ones, or by 524 if they removed those too.

Maybe they added the comments to get a longer payload for the sake of the shirt's design.

The comments can be more cute/awe inspiring for people who aren't as familiar with bash but like solving puzzles as well.

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#38
post #23

P ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found E ./cool.sh: line 31: bc: command not found ./cool.sh: line 34: bc: command not found ./cool.sh: line 37: bc: command not found Very wow. Shame they assumed everyone has "bc"...

Which distro are you running? Perchance did you run the shell script in alpine Linux (docker)?

it doesn't seem to be installed on my endeavouros laptop

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#39
post #2

OCRing this is a nightmare and is a good benchmark to any self-proclaimed good OCR/vision model. I think though it could likely be easily OCR'd if you give the image to any decent agentic harness with a good vision model, e.g. newest Claude/GPT ones, and tell them to split the image per lines, and then just OCR each line individually. I wonder if the script itself was written by an LLM before obfuscation? There seem…

I don't think it was written by an LLM, some things stand out: The congratulations text is both in English and Japanese. Contains a single heart emoji. There was an intention to have a cyan to orange gradient, but the range starts in an ANSI block, ends halfway through the 256 color block and 256 terminal colors are not arranged like a gradient at all. There's no sleep at the end of the loop where I feel like an LLM…

Human here. I added a sleep 0.5 at the end, it's too fast to read otherwise. Makes for a nice terminal screensaver!

Re: Decoding the obfuscated bash script on a Uniqlo t-shirt

#40
post #30
post #8

Earlier quoted context omitted.

Definitely LLM. No humans write that many comments.

> No humans write that many comments. Especially in a case like this, I would definitely write a lot of comments to aid in understanding, thus increasing trust so people would try it out and tinker with it.

Plus the main point of this code is to have people look at it, the function is secondary to being an easter egg.
Post reply on HN