Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ソースコードのソースコードを読みたい
Search
tosio
February 09, 2024
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ソースコードのソースコードを読みたい
テテミート #7 2023/2/9
tosio
February 09, 2024
More Decks by tosio
See All by tosio
Gmailに届け
tosiooooooo
0
140
断頭台の大魔族がつながりレシピをお勧めしてくれるLINEbot
tosiooooooo
0
1.1k
Featured
See All Featured
BBQ
matthewcrist
89
10k
How STYLIGHT went responsive
nonsquared
100
6.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
570
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
4 Signs Your Business is Dying
shpigford
187
23k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
500
The Language of Interfaces
destraynor
162
27k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Faster Mobile Websites
deanohume
310
32k
Bash Introduction
62gerente
615
220k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
260
Transcript
ソースコードの ソースコードを読みたい Medley.inc Yuji Tamai
ソースコードという日本酒を買った
隠しメッセージ!
隠しメッセージ読んでみたい・・・ けど、写経はあまりに大変そう・・・ OCRでなんとかならんかな
ChatGPT4が使えると評判のBing Copilotでやってみた
全然ダメだった
AWS Rekognition使ってみた もっとダメだった
他に画像からテキスト起こすやつないかな・・・ Googleドライブでいけるらしい
Googleドライブに画像あげてGoogleドキュメントで開くだけ
結構いい感じ!
console.log(String.fromCodePoint([!![]+!![]+!![]+!![]+!![]+!![]+, [],+!![],+!![].].join("")),String.fromCodePoint([+!!,+!!],~~[]].join(""),String.fromCode ("")),String.fromCodePoint([+!![],+!![],!![]+!![]+!![]+!![],].join(""),String.fromCode []+!![]+!![]+!![]+!![]+!![]+!![],].join("")),String.fromCodePoint([+!![],+!![], ([+!![],+!![],+!![]+!![]+!![]+!![]+!![]+!![]+!![],].join("")),String.fromCode ("")),String.fromCodePoint([!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+ ("")),String.fromCodePoint([+!![],+!![],+!![]+!![]+!![]+!![]+!![]+!![],].join(String.fromCode [],].join("")),String.fromCodePoint([+!![],+!![],+""[],].join("")),String.fromCode ("")),String.fromCodePoint([+!![],+!![],+!![]+!![]+!![]+!![]+!![],].join("")),String.fromCode ("")),)console.log(String.fromCodePoint([!![]+!![]+!![]+!![]+!![]
("")),String.fromCodePoint([+!![],+!![],+!![] なにこれ?
「+!![]」って何? JavaScriptでは、`+!![]`は次のように解釈されます: 1. `[]`は空の配列を表します。 2. `!`は論理否定演算子で、オペランドをブール値に変換し、その逆を返します。したがって、 `![]`は`false`を返します(なぜなら、空の配列は真と評価されます)。 3. 2つ目の`!`は、先ほどの`false`を再度否定し、`true`を返します。したがって、`!![]`は`true`を 返します。
4. 最後に、`+`は単項プラス演算子で、オペランドを数値に変換します。ブール値の`true`は数 値の`1`に変換されます。 したがって、`+!![]`は`1`を返します。このようなテクニックは、 JavaScriptの型変換の特性を利用したもので、しばしば難読化や圧縮のために使用されます。 🙂
試しに一部出してみた console.log(String.fromCodePoint([+!![],+!![],!![]+!![]+!![]+!![]+!![],].join(""))); => s console.log(String.fromCodePoint([1,1,1+1+1+1+1,].join(""))); console.log(String.fromCodePoint([1,1,5,].join(""))); => s
なぜ「s」が出るの? `String.fromCodePoint([1,1,5].join(""))`が"s"になる理由は、`String.fromCodePoint`メ ソッドがUnicodeのコードポイントを文字列に変換するからです。 まず、`[1,1,5].join("")`は配列の要素を連結して`"115"`という文字列を作ります。 次に、`String.fromCodePoint("115")`は、`"115"`を数値に変換し、その数値に対応する Unicodeの文字を返します。 Unicodeのコードポイント`115`は、小文字の`s`に対応しています。 したがって、`String.fromCodePoint([1,1,5].join(""))`は`s`を返します。🙂
そして隠しメッセージとは!!! 絶賛解析中です!!! 登壇に間に合いませんでした
曲面の文字列の解析大変 • Googleドキュメントでも文字起こし精度は7〜8割くらい • 元の文字が”[+!![],+!![],+!![]+!![]+!![]+!![]+!![]+!![]+!![],]”みたいなのばっかりだ から、より間違えられやすい • 曲面を3箇所から撮影してうまくつなぎ合わせればいけるかなと思ったけど、1 枚目の時点で面倒で途中で挫折 •
パノラマ撮影機能を使って結構いい感じに1枚の画像にできたけど、それでも 間違い探しが大変 • 間違え正すくらいなら、全部手で打った方が多分早い
解析完了したら 口頭で お知らせします!!! また何かのイベントでお会いしましょう
ご清聴ありがとうございました