Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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.

Replies are listed 'Best First'.
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?
[Corion]: Last day at $work before 3 weeks of vacation (well, not that I'd be really travelling, but no-work-time ;) )
[robby_dobby]: marto: yeah, I'd eventually visit Glasgow some day - just to visit the home town of GHC :-)
[robby_dobby]: Corion: Oh, that's awesome! Your timing is perfect enough to see all hell break loose when you get back at work :P
[marto]: well, let me know in advance, I'll buy you a pint :)
[Corion]: robby_dobby: No, I'm returning in the second workweek of January. The main hectic parts are in the first days after the start of the new year
[robby_dobby]: marto: and, I'm not sure I'd be around here long enough for YAPC::EU
[marto]: Corion nice, what are you plans for Christmas?
[robby_dobby]: Corion: Nice, you just won't be around to deal with the mess - enjoy your vacation :-)
[robby_dobby]: marto: Sure, will do. Thanks!
[Corion]: marto: No great plans - I'll meet with my sister, my brother and my mother, but that's all :)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2017-12-15 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (431 votes). Check out past polls.

    Notices?