Skip to content

Instantly share code, notes, and snippets.

@sangyye
Created February 27, 2011 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sangyye/846244 to your computer and use it in GitHub Desktop.
Save sangyye/846244 to your computer and use it in GitHub Desktop.
read out all pidgin accounts with passwords
#!/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