Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Extracting passwords from KWallet

by walto (Pilgrim)
on Jan 22, 2011 at 07:31 UTC ( #883666=note: print w/ replies, xml ) Need Help??


in reply to Extracting passwords from KWallet

I am using kubuntu 10.10 which uses perl5 (revision 5 version 10 subversion 1). To run the script I had to add

use feature qw(say);

to run it using say instead of print.

I am not sure when say was implemented in perl. To run it on perl versions lower than 5.10. I would recommend to replace say with print.

Running your script gives me an empty string for User ID and Password when I replace MyFolder with 'Network Management' and User ID and Password with my credentials.


Comment on Re: Extracting passwords from KWallet
Download Code
Re^2: Extracting passwords from KWallet
by Tanktalus (Canon) on Jan 24, 2011 at 16:02 UTC

    Actually, we could really change the "use 5.12" to "use 5.10" - I was merely using that line to show everyone what version I was using to develop/test this. Since I also now have the Net::DBUS code working under 5.8.8, then, other than the 'say' lines, this definitely works in earlier-than-5.12 versions of perl.

    Be sure when you're using this that you're looking for Passwords and not Maps. As mentioned originally, this does not work with "Maps" in kwallet (though I've opened a bug against KWallet for their unfortunate maps-to-wire format). That is a definite deficiency, and an Excersise For The Reader(TM).

    Note that in the original script, the userid/password strings are key names, not credentials. The whole point is to fetch credentials, not know them. So, what keys in your "Network Management" folder in KWallet exist under the "Passwords" group? When you open up the folder in KWallet, this should show up:

    [ ] Network Management | +-- Binary Data +-- Maps V-- Passwords | +-- key +-- Unknown
    You have to use "key", not "walto" or "12345" (which, of course, is the password to my luggage).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://883666]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2014-10-21 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (96 votes), past polls