Accessing the KDE Wallet from the command line kde 5 version


I was trying to read some password ON KDE5 from google-chrome through kwallet and it was a bit a pain with qdbusviewer , actually i can’t get it right now,but i found  luckly an old blog entry for kwallet 4 so … here it is a simply scheme to create write and read password for my silly application kde-service-menu-nowardev-scanner

#create a wallet folder kde-service-menu-storage
qdbus org.kde.kwalletd5 /modules/kwalletd5 createFolder "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "kde-service-menu-nowardev-scanner" 
#write an entry for password 
qdbus org.kde.kwalletd5 /modules/kwalletd5 writeEntry "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" test 1 "kde-service-menu-nowardev-scanner" 
#write the pasword
qdbus org.kde.kwalletd5 /modules/kwalletd5 writePassword "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" "silly" "kde-service-menu-nowardev-scanner"
#list the folders
 qdbus org.kde.kwalletd5 /modules/kwalletd5 folderList "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-nowardev-scanner"
#read the entry
qdbus org.kde.kwalletd5 /modules/kwalletd5 entryList "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "kde-service-menu-nowardev-scanner"
#read the password 
 qdbus org.kde.kwalletd5 /modules/kwalletd5 readPassword "$(qdbus org.kde.kwalletd5 /modules/kwalletd5 org.kde.KWallet.open kdewallet 0 "kde-service-menu-nowardev-scanner")" "kde-service-menu-storage" "mymail@gmail.com" "kde-service-menu-nowardev-scanner"
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: