Refactor ftpnavigator creds

bug/bundler_fix
William Vu 2014-06-11 12:57:45 -05:00
parent 943a4285e4
commit 7147a88968
No known key found for this signature in database
GPG Key ID: E761DCB4C1629024
1 changed files with 26 additions and 14 deletions

View File

@ -67,20 +67,32 @@ class Metasploit3 < Msf::Post
end end
print_good("Host: #{server} Port: #{port} User: #{username} Pass: #{dpass}") print_good("Host: #{server} Port: #{port} User: #{username} Pass: #{dpass}")
if session.db_record service_data = {
source_id = session.db_record.id address: Rex::Socket.getaddress(server),
else port: port,
source_id = nil protocol: "tcp",
end service_name: "ftp",
report_auth_info( workspace_id: myworkspace_id
:host => server, }
:port => port,
:sname => 'ftp', credential_data = {
:source_id => source_id, origin_type: :session,
:source_type => "exploit", session_id: session_db_id,
:user => username, post_reference_name: self.refname,
:pass => dpass username: username,
) private_data: dpass,
private_type: :password
}
credential_core = create_credential(credential_data.merge(service_data))
login_data = {
core: credential_core,
access_level: "User",
status: Metasploit::Credential::Login::Status::UNTRIED
}
create_credential_login(login_data.merge(service_data))
end end
end end