Merge pull request #33 from rapid7/feature/MSP-9741/smartftp

refactor smartftp post module

MSP-9741 #land
bug/bundler_fix
Trevor Rosen 2014-06-03 10:04:09 -05:00
commit 883976c6a8
1 changed files with 28 additions and 8 deletions

View File

@ -109,14 +109,34 @@ class Metasploit3 < Msf::Post
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: host,
port: port,
service_name: 'ftp',
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: pass,
username: user
}
credential_data.merge!(service_data)
credential_core = create_credential(credential_data)
login_data ={
core: credential_core,
status: Metasploit::Credential::Login::Status::UNTRIED
}
login_data.merge!(service_data)
login = create_credential_login(login_data)
end
end