Get Skype 8 conversationId for Skype Bot sending message

user-pic
Vote 0 Votes

Skype 8 因為取消了 /get name 指令, 無法很方便取得 conversationId
資料也從 SQLite 改成 LevelDB, 無法透過讀取 main.db 來取得

寫了個 BAT 檔每秒去抓 Log 中最後一個 conversationId
裡面有用到 strings 及 tail, 需安裝 StringsWindows Server 2003 Resource Kit Tools
執行這個 BAT, 送個訊息到對話窗, 就可以馬上看到該對話窗的 conversationId
conversationId 的格式是 19:[0-9a-f]{32}@thread.skype

@ECHO OFF
cd "%AppData%\Microsoft\Skype for Desktop\IndexedDB\file__0.indexeddb.leveldb"
FOR /F "tokens=*" %%g IN ('dir/b *.log') do (SET LOG=%%g)
:recheck
strings %LOG% | findstr @thread.skype > %TEMP%\findstr.thread.skype
tail -1 %TEMP%\findstr.thread.skype
ping -n 2 127.0.0.1 > NUL
goto recheck

About this Entry

This page contains a single entry by Pank published on January 17, 2019 10:34 AM.

rclone was the previous entry in this blog.

Block LINE server addresses is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives