嘗試做一個 envchain 的仿品 (2)

在 qdbus 上面試著操作 KWallet 資料,撞了不少牆。參考 [Learning on the Job: Accessing the KDE Wallet from the Cmdline] 這篇,目前還是不曉得怎麼用 qdbus 取出 NetworkManager 儲在裡頭的 Wi-Fi 密碼,當然在 KWallet Manager 裡頭是沒問題的,用

kwallet-query -r "{????????-????-????-????-????????????};802-11-wireless-security" -f "Network Management" kdewallet

也可以取出密碼,但是用 qdbus 就是卡在最後不曉得怎麼把

qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.entryList [handle] "Network Management" "Testing"

得到的 entry 去推出 key-value。無論是用 org.kde.KWallet.readMap 抑或 org.kde.KWallet.readMapList 都得不到我預期的回傳結果,目前只能先猜是我不知道怎麼用這工具的問題。晚一點可能可以來試試用 Ruby 去戳 D-Bus。


已發佈

分類:

作者:

標籤: