refactor smartftp post module
refactor the smartftp credential post module to use Metasploit::Credentialbug/bundler_fix
parent
34004908bb
commit
9eb42cb80f
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue