datastore cleanup according to sinn3r
parent
65d15df9f9
commit
6c8ee443c8
|
@ -100,6 +100,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
|
||||
def exploit
|
||||
@previous_basic_auth_user = datastore['BasicAuthUser']
|
||||
@previous_basic_auth_pass = datastore['BasicAuthPass']
|
||||
datastore['BasicAuthUser'] = datastore['USERNAME']
|
||||
datastore['BasicAuthPass'] = datastore['PASSWORD']
|
||||
|
||||
|
@ -344,4 +346,9 @@ EOT
|
|||
end
|
||||
res
|
||||
end
|
||||
|
||||
def cleanup
|
||||
datastore['BasicAuthUser'] = @previous_basic_auth_user
|
||||
datastore['BasicAuthPass'] = @previous_basic_auth_pass
|
||||
end
|
||||
end
|
||||
|
|
|
@ -69,7 +69,6 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
|
||||
p = payload
|
||||
if datastore['SHELL'] == 'automatic'
|
||||
@original_shell_value = datastore['SHELL']
|
||||
if not (plat = detect_platform())
|
||||
fail_with(Exploit::Failure::NoTarget, 'Unable to detect platform!')
|
||||
end
|
||||
|
@ -228,8 +227,4 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
nil
|
||||
end
|
||||
|
||||
def cleanup
|
||||
datastore['SHELL'] = @original_shell_value unless @original_shell_value.nil?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue