Report credentials

* Even when we are not associating them to hosts
* It's a post module so maybe we cannot solve some names
bug/bundler_fix
jvazquez-r7 2014-11-17 12:49:18 -06:00
parent b3b37c7c9f
commit 54de805b7a
1 changed files with 16 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class Metasploit3 < Msf::Post
creds.each do |cred| creds.each do |cred|
cred_table << cred cred_table << cred
report_credential(cred[3], cred[4])
end end
print_line(cred_table.to_s) print_line(cred_table.to_s)
@ -169,4 +170,19 @@ class Metasploit3 < Msf::Post
vprint_error("No settings found in #{file}") if settings.empty? vprint_error("No settings found in #{file}") if settings.empty?
settings settings
end end
def report_credential(user, pass)
credential_data = {
workspace_id: myworkspace_id,
origin_type: :session,
session_id: session_db_id,
post_reference_name: self.refname,
username: user,
private_data: pass,
private_type: :password
}
create_credential(credential_data)
end
end end