use store_valid_credential instead

GSoC/Meterpreter_Web_Console
h00die 2018-10-16 14:01:49 -04:00
parent f399b59ae4
commit 4a06fe1d4b
1 changed files with 1 additions and 26 deletions

View File

@ -59,32 +59,7 @@ class MetasploitModule < Msf::Auxiliary
if res and res.body and res.body =~ /Cisco (Internetwork Operating System|IOS) Software/
print_good("#{rhost}:#{rport} Successfully authenticated to this device")
service_data = {
address: rhost,
port: rport,
service_name: 'http',
protocol: 'tcp',
workspace_id: myworkspace_id
}
credential_data = {
module_fullname: self.fullname,
origin_type: :service,
private_data: datastore['HttpPassword'],
private_type: :password,
username: datastore['HttpUsername']
}
credential_data.merge!(service_data)
credential_core = create_credential(credential_data)
login_data = {
core: credential_core,
last_attempted_at: DateTime.now,
status: Metasploit::Model::Login::Status::SUCCESSFUL
}
login_data.merge!(service_data)
create_credential_login(login_data)
store_valid_credential(user: datastore['HttpUsername'], private: datastore['HttpPassword'])
# Report a vulnerability only if no password was specified
if datastore['HttpPassword'].to_s.length == 0