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
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue