Merge branch 'feature/MSP-9734/ftpx' into staging/electro-release

bug/bundler_fix
James Lee 2014-06-13 15:36:43 -05:00
commit 8be602e487
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
1 changed files with 26 additions and 13 deletions

View File

@ -72,19 +72,32 @@ class Metasploit3 < Msf::Post
print_good("#{session.sock.peerhost}:#{port} (#{host}) - '#{user}:#{pass}'")
# save results to the db
if session.db_record
source_id = session.db_record.id
else
source_id = nil
end
report_auth_info(
:host => host,
:port => port,
:source_id => source_id,
:source_type => "exploit",
:user => user,
:pass => pass
)
service_data = {
address: Rex::Socket.getaddress(host),
port: port,
protocol: "tcp",
service_name: "ftp",
workspace_id: myworkspace_id
}
credential_data = {
origin_type: :session,
session_id: session_db_id,
post_reference_name: self.refname,
username: user,
private_data: pass,
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