從「Did you lose your AirPods? (alexyancey.com)」這邊看到的,原文是「Did you lose your AirPods?」。
如同標題提到的,作者朋友撿到 AirPods,接上 iPhone 後能得到的資訊除了序號以外只有失主的電話末四碼了,不知道怎麼聯絡失主。
接下來作者開始想辦法,先假設失主是在同一個州,這樣電話的區碼 (前三碼) 就會一樣了,中間三碼的排列組合就只剩下 1000 組 (作者寫 999):
I started with the assumption that the owner lived near me in the Portland metropolitan area. With that, I restricted the search to our local area code*. Sure, they could be from out of town, but hey, let's give it a shot.
接著是透過公開的資料庫查有哪些電話號碼是有效,而且屬於行動網路的,這樣就降到 232 組:
Next, I narrowed it down by central office code (commonly called prefix) (those three digits after the area code). Most of Portland’s are assigned, but only 26% to wireless carriers. Also, 000-199 are reserved codes that aren't available for telcos. I lied earlier, sorry.
再接著,既然是 Apple 生態系的,作者決定用 iMessage Lookup API 去掃,這樣就剩下 84 組:
It's a safe bet that the owner has an iPhone with iMessage turned on. We can use this assumption to narrow down the list further by filtering out any non-iMessage phone numbers. I ran a check using this API. (The API is probably used for shady stuff, but my intentions were pure.)
最後是透過 MacBook 直接打 iMessage 出去問,就不用花錢透過簡訊聯絡:
With the list whittled down, I avoided Twilio entirely by using a script on my MacBook to send iMessages in bulk. Now we wait.
最後真的找到失主並且順利還給對方了:
回頭看裡面用到的兩個小技巧 (公開資料庫的查詢與 iMessage 的查詢),有蠻濃厚的 OSINT 味道,還蠻有趣的...