Top
Best
New

Posted by speerer 9 hours ago

Decoding the obfuscated bash script on a Uniqlo t-shirt(tris.sherliker.net)
1084 points | 182 commentspage 2
forinti 5 hours ago|
This reminds me of a T-shirt I once saw that read:

          perl -e '
     "$a="etbjxntqrdke";
  $a=~s/(.)/chr(ord($1)+1)/eg;
        print "$a\n;"'
It's cursing. Don't run it if it might offend you.

Upon seeing this, I decided to golf and came up with a shorter version:

  perl -e "print chr 1+ ord for split //,'etbjxntqrdke'"
librasteve 5 hours ago|
or

  raku -e 'say "etbjxntqrdke".comb.map({chr .ord + 1}).join'
lizmat 3 hours ago||
or

raku -e 'say "etbjxntqrdke".comb.map(*.succ).join'

qiqitori 7 hours ago||
I once wrote a tool that helps with finding mistakes in OCR'd fixed width text, https://blog.qiqitori.com/2023/03/ocring-hex-dumps-or-other-...

Basically it just clusters same characters and asks the human to find the problems, which is easy when you're looking at a series of pictures like ssssss5sss.

The UI is kinda least-effort. Should ask a modern AI agent to make it look nice and intuitive, sometime maybe.

raffael_de 5 hours ago||
while base64 can be considered obfuscation in this context and its inverse as decoding I can't help but feel this title is overselling and catering to a rather cyber-cheesy marketing campaign at that.
ape4 5 hours ago||
Yeah, its a bit of a cheat. The best obfuscated C programs have the source looking like a Christmas tree (or something) and then play an xmas song (or whatever)
raffael_de 5 hours ago||
the base64 thing they did feels like a cheap version of that green-obscure-symbols-raining-on-a-terminal animation in The Matrix. should have gone with "Hack the Planet" instead ...
cb321 4 hours ago||
That Matrix visual was actually specifically mentioned as an inspiration in the video by the designer being linked to/discussed elsethread (e.g. https://news.ycombinator.com/item?id=48830326 )
duggan 2 hours ago||
I do like these sorts of things; decoded a less exciting one from a bottle of wine I found in 2019. Significantly more eye-watering without OCR: https://xcancel.com/duggan/status/1130920846304993282
9dev 4 hours ago||
Huh! I was sure the copy-text-from-image feature in MacOS would handle this flawlessly. But the best run I managed produced the following:

    base64: stdin: (null): error decoding base64 input stream
    #!/bin/bash
    
    # Congratulations! You found thu eastur ugg!#B��O��
    # おめでとう��M�ぇM�す!隣C��わM�サ�#ライ����見でM�������!O��
    
    # Define thu tuxt to anima|e
    text="♥PEACE♥FOR♥ALOB��PEACE♵FOR♵ALL♵PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥PEACE♵FOR♵ALL♥"
    
    # Get termb�al dmmensions
    cols=$(tput cols)
    linus=$(tput lines)
pacofonix 4 hours ago||
For a non English locale that use comma instead of dot for decimals (in my case, Spanish), this script is partially crashing. Run using something like `chmod +x shirt.sh; LC_NUMERIC=C ./shirt.sh`.
sixtyj 6 hours ago||
> Interesting. I told my wife "that’s basically how people ship viruses’ and bought it.

It’s a movie plot.

thenthenthen 3 hours ago||
My japanese friends say: yes because uniqlo is a science company not a clothing company
NikxDa 4 hours ago||
Super cool, especially that the code is annotated!

In case the author is reading: The decorative feather images are between 2MB to almost 5MB in size. Compression might be in order to save users time and bandwidth, and make the site look less broken while the images are partially loaded :)

cb321 6 hours ago|
For anyone that cares, this is a slightly less stupid Python version:

    #!/usr/bin/env python3
    from os   import environ; E = environ.get
    from math import sin
    from time import sleep
    text = "♥PEACE♥FOR♥ALL" # The text to sine-scroll animate
    nText  = len(text)      # Number of utf8 chars
    freq   = 0.2            # Frequency scaling factor
    color0 = 12             # xt256 Color cube segment 12..<208
    color1 = 208; nColor = color1 - color0
    (w, h) = (int(E("COLUMNS", 80)), int(E("LINES", 24)))
    t = 0
    while True:
        x = (w/2) + (w/4)*sin(t*freq)           # x pos via sine value
        x = max(0, min(w - 1, int(x + 0.5)))    # bound to tty width
        color = color0 + ((nColor*t)//h)%nColor # cycle colors
        ch = text[t%nText]  # Get char & Use xterm-256 color escs
        print("%*s\033[38;5;%sm%s\033[m\n" % (x, "", color, ch))
        t += 1
        sleep(0.1)   # original used bc shell outs to rate-limit
As mentioned in https://news.ycombinator.com/item?id=48830634 , the heart symbols did not otherwise even work for my bash and some have commented on liking the screen saver.
conductr 3 hours ago||
You should base64 it and sell tshirts
More comments...