From 24747e18e3716caa4c9023a544b8333995c37653 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Mon, 30 Jan 2012 18:19:17 -0400 Subject: [PATCH] The directory path for the accounts.xml was not set properly for windows systems --- modules/post/multi/gather/pidgin_cred.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/post/multi/gather/pidgin_cred.rb b/modules/post/multi/gather/pidgin_cred.rb index b44a3a6378..88716eda4d 100644 --- a/modules/post/multi/gather/pidgin_cred.rb +++ b/modules/post/multi/gather/pidgin_cred.rb @@ -54,6 +54,7 @@ class Metasploit3 < Msf::Post @platform = :osx paths = enum_users_unix when /win/ + @platform = :win profiles = grab_user_profiles() profiles.each do |user| next if user['AppData'] == nil @@ -111,14 +112,22 @@ class Metasploit3 < Msf::Post def check_pidgin(purpledir) + path = "" print_status("Checking for Pidgin profile in: #{purpledir}") session.fs.dir.foreach(purpledir) do |dir| if dir =~ /\.purple/ - print_status("Found #{purpledir}#{dir}") - return "#{purpledir}#{dir}" + if @platform == :win + print_status("Found #{purpledir}\\#{dir}") + path = "#{purpledir}\\#{dir}" + else + print_status("Found #{purpledir}/#{dir}") + path = "#{purpledir}/#{dir}" + end + return path end end return nil + endreturn nil end def get_pidgin_creds(paths)