more fixes
parent
8c12361bda
commit
8c5890d506
|
@ -64,11 +64,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
gdb_pc, gdb_arch = gdb_data.values_at(:pc, :arch)
|
||||
|
||||
unless payload.arch.include? gdb_arch
|
||||
fail_with(
|
||||
Msf::Exploit::Failure::BadConfig,
|
||||
"The payload architecture is incorrect: "+
|
||||
"the payload is #{payload.arch.first}, but #{gdb_arch} was detected from gdb."
|
||||
)
|
||||
fail_with(Failure::BadConfig, "The payload architecture is incorrect: the payload is #{payload.arch.first}, but #{gdb_arch} was detected from gdb.")
|
||||
end
|
||||
|
||||
print_status "Writing payload at #{gdb_pc}..."
|
||||
|
|
|
@ -142,7 +142,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
@uri.path << "/" if @uri.path[-1, 1] != "/"
|
||||
print_status('Checking access to the script console')
|
||||
res = send_request_cgi({'uri' => "#{@uri.path}script"})
|
||||
fail_with(Failure::Unknown) if not res
|
||||
fail_with(Failure::Unknown, 'No Response received') if not res
|
||||
|
||||
@cookie = nil
|
||||
@crumb = nil
|
||||
|
@ -166,7 +166,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
@cookie = "#{sessionid}"
|
||||
|
||||
res = send_request_cgi({'uri' => "#{@uri.path}script", 'cookie' => @cookie})
|
||||
fail_with(Failure::Unknown) unless res and res.code == 200
|
||||
fail_with(Failure::UnexpectedReply, 'Unexpected reply from server') unless res and res.code == 200
|
||||
else
|
||||
print_status('No authentication required, skipping login...')
|
||||
end
|
||||
|
|
|
@ -119,7 +119,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
end
|
||||
|
||||
if not self.ssh_socket
|
||||
fail_with(Failure::Unknown)
|
||||
fail_with(Failure::Unknown, 'Failed to start SSH socket')
|
||||
end
|
||||
return
|
||||
end
|
||||
|
|
|
@ -172,10 +172,7 @@ class Metasploit3 < Msf::Exploit::Local
|
|||
" -setdate 01:01:1970 -settime 00:00"
|
||||
)
|
||||
if not cmd_exec("#{SYSTEMSETUP_PATH} -getdate").match("1/1/1970")
|
||||
fail_with(
|
||||
Exploit::Failure::NoAccess,
|
||||
"Date and time preference pane appears to be locked. By default, this pane is unlocked upon login."
|
||||
)
|
||||
fail_with(Failure::NoAccess, "Date and time preference pane appears to be locked. By default, this pane is unlocked upon login.")
|
||||
else
|
||||
@clock_changed = true
|
||||
end
|
||||
|
|
|
@ -80,9 +80,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
elsif datastore['HTTP::chunked'] == true
|
||||
b = /chunked Transfer-Encoding forbidden/.match(res.body)
|
||||
if b
|
||||
fail_with(Failure::Unknown, 'Target PHP installation does not support chunked encoding. ' +
|
||||
'Support for chunked encoded requests was added to PHP on 12/15/2005. ' +
|
||||
'Try disabling HTTP::chunked and trying again.')
|
||||
fail_with(Failure::Unknown, 'Target PHP installation does not support chunked encoding. Support for chunked encoded requests was added to PHP on 12/15/2005. Try disabling HTTP::chunked and trying again.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -85,9 +85,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
elsif datastore['HTTP::chunked'] == true
|
||||
b = /chunked Transfer-Encoding forbidden/.match(res.body)
|
||||
if b
|
||||
fail_with(Failure::BadConfig, 'Target PHP installation does not support chunked encoding. ' +
|
||||
'Support for chunked encoded requests was added to PHP on 12/15/2005. ' +
|
||||
'Try disabling HTTP::chunked and trying again.')
|
||||
fail_with(Failure::BadConfig, 'Target PHP installation does not support chunked encoding. Support for chunked encoded requests was added to PHP on 12/15/2005. Try disabling HTTP::chunked and trying again.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -172,11 +172,11 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
res = request('ls -a .')
|
||||
|
||||
unless res and res.code == 200
|
||||
fail_with(Failure::Unknown - "#{peer} - Unknown response, check the target")
|
||||
fail_with(Failure::Unknown, "#{peer} - Unknown response, check the target")
|
||||
end
|
||||
|
||||
if res.body =~ /Invalid Username\/Password/
|
||||
fail_with(Failure::NoAccess - "#{peer} - Invalid VICIdial credentials, check USERNAME and PASSWORD")
|
||||
fail_with(Failure::NoAccess, "#{peer} - Invalid VICIdial credentials, check USERNAME and PASSWORD")
|
||||
end
|
||||
|
||||
if res.body =~ /Invalid session_name/
|
||||
|
|
Loading…
Reference in New Issue