Created
February 27, 2011 15:11
-
-
Save sangyye/846244 to your computer and use it in GitHub Desktop.
read out all pidgin accounts with passwords
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'xmlsimple' | |
f = File.open(ENV['HOME'] + "/.purple/accounts.xml", "r") | |
data = XmlSimple.xml_in(f.read()) | |
f.close() | |
data['account'].each do |item| | |
puts item['protocol'][0].split('-')[-1] | |
if item['name'] | |
puts "\tName: " + "\t" + item['name'][0] | |
end | |
if item['password'] | |
puts "\tPass: " + "\t" + item['password'][0] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment