Report credentials
* Even when we are not associating them to hosts * It's a post module so maybe we cannot solve some namesbug/bundler_fix
parent
b3b37c7c9f
commit
54de805b7a
|
@ -41,6 +41,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
creds.each do |cred|
|
||||
cred_table << cred
|
||||
report_credential(cred[3], cred[4])
|
||||
end
|
||||
|
||||
print_line(cred_table.to_s)
|
||||
|
@ -169,4 +170,19 @@ class Metasploit3 < Msf::Post
|
|||
vprint_error("No settings found in #{file}") if settings.empty?
|
||||
settings
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue