refactor smartftp post module

refactor the smartftp credential post module to use
Metasploit::Credential
bug/bundler_fix
David Maloney 2014-06-02 11:48:45 -05:00
parent 34004908bb
commit 9eb42cb80f
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 28 additions and 8 deletions

View File

@ -109,14 +109,34 @@ class Metasploit3 < Msf::Post
else else
source_id = nil source_id = nil
end end
report_auth_info( service_data = {
:host => host, address: host,
:port => port, port: port,
:source_id => source_id, service_name: 'ftp',
:source_type => "exploit", protocol: 'tcp',
:user => user, workspace_id: myworkspace_id
:pass => pass }
)
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
end end