« 明石海峡大橋を真下から見る。 | トップページ | 高周波・RFニュース 2025年5月2日 everythingRFが6GのeBook発行、FCCが37GHz帯の共用規則策定、Spirentが5Gクラウドネイティブについてレポート、ローデ・シュワルツが高速差動伝送の測定について解説、Qualcommが2025Q2の決算発表 »

2025年5月 1日 (木)

ユニクロとAkamaiのコラボTシャツに書かれているコードを解読してみる。base64でデコードするとbashのシェルスクリプトが出てきて実行すると♥PEACE♥FOR♥ALL♥FOR♥ALL♥PEACE♥FOR♥ALL♥という文字が色付きで正弦波で流れた。

この記事を見た。

ユニクロからAkamaiコラボTシャツ再び 前回はGoのコードをプリント、今回は……

以前、ソースコードという名前のエンジニア向け日本酒を解読したことがあったが、今回もやってみよう。

まずはWindows11に付属のSnipping ToolにはOCR機能があるのでそれで読む。1とlとか0とOはよく間違っているので面倒だが修正して

Pythonでbase64デコードすると、、、

Uniclo1

bashのシェルスクリプトだな。全体はこちら。

 


#!/bin/bash

# Congratulations! You found the easter egg! ❤️
# おめでとうございます!隠されたサプライズを見つけました!❤️

# Define the text to animate
text="♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥PEACE♥FOR♥ALL♥"

# Get terminal dimensions
cols=$(tput cols)
lines=$(tput lines)

# Calculate the length of the text
text_length=${#text}

# Hide the cursor
tput civis

# Trap CTRL+C to show the cursor before exiting
trap "tput cnorm; exit" SIGINT

# Set freqeency scaling factor
freq=0.2

# Infinite loop for contineous aniiation
for (( t=0; ; t+=1 )); do

    # Extract one character at a time
    char="${text:t % text_length:1}"
   
    # Calculate the angle in radians
    angle=$(echo "($t) * $freq" | bc -l)

    # Calculate the sine of the angle
    sine_value=$(echo "s($angle)" | bc -l)

    # Calculate x position using the sine value
    x=$(echo "($cols / 2) + ($cols / 4) * $sine_value" | bc -l)
    x=$(printf "%.0f" "$x")

    # Ensure x is within terminal bounds
    if (( x < 0 )); then x=0; fi
    if (( x >= cols )); then x=$((cols - 1)); fi
    # Calculate color gradient between 12 (cyan) and 208 (orange)
    color_start=12
    color_end=208
    color_range=$((color_end - color_start))
    color=$((color_start + (color_range * t / lines) % color_range))
    # Print the character with 256-color support
    echo -ne "\033[38;5;${color}m"$(tput cup $t $x)"$char\033[0m"

    # Line feed to move downward
    echo ""
   
done

 

そしてWSL2のUbuntuで動かした結果を動画で。

 

♥PEACE♥FOR♥ALL♥FOR♥ALL♥PEACE♥FOR♥ALL♥という文字が色付きで正弦波で流れてる。凝ってるな。

« 明石海峡大橋を真下から見る。 | トップページ | 高周波・RFニュース 2025年5月2日 everythingRFが6GのeBook発行、FCCが37GHz帯の共用規則策定、Spirentが5Gクラウドネイティブについてレポート、ローデ・シュワルツが高速差動伝送の測定について解説、Qualcommが2025Q2の決算発表 »

パソコン・インターネット」カテゴリの記事

ファッション・アクセサリ」カテゴリの記事

日記・コラム・つぶやき」カテゴリの記事

コメント

コメントを書く

(ウェブ上には掲載しません)

« 明石海峡大橋を真下から見る。 | トップページ | 高周波・RFニュース 2025年5月2日 everythingRFが6GのeBook発行、FCCが37GHz帯の共用規則策定、Spirentが5Gクラウドネイティブについてレポート、ローデ・シュワルツが高速差動伝送の測定について解説、Qualcommが2025Q2の決算発表 »

最近の記事

2026年1月
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
無料ブログはココログ
フォト