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
0
110
ソースコードのソースコードを読みたい
テテミート #7 2023/2/9
tosio
February 09, 2024
Tweet
Share
More Decks by tosio
See All by tosio
Gmailに届け
tosiooooooo
0
25
断頭台の大魔族がつながりレシピをお勧めしてくれるLINEbot
tosiooooooo
0
880
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6k
Gamification - CAS2011
davidbonilla
77
4.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Agile that works and the tools we love
rasmusluckow
325
20k
Visualization
eitanlees
137
14k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
KATA
mclloyd
16
12k
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枚の画像にできたけど、それでも 間違い探しが大変 • 間違え正すくらいなら、全部手で打った方が多分早い
解析完了したら 口頭で お知らせします!!! また何かのイベントでお会いしましょう
ご清聴ありがとうございました