OCD - Removed un-needed full stop
parent
772bec23a1
commit
524373bb48
|
@ -64,7 +64,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
print_line("#{rhost}:#{rport} - Command: #{datastore['CMD']}\n")
|
||||
print_line("#{rhost}:#{rport} - Output: #{res.body}")
|
||||
else
|
||||
print_error("#{rhost}:#{rport} - Exploit failed.")
|
||||
print_error("#{rhost}:#{rport} - Exploit failed")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -249,7 +249,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
start_time -= datastore['TIME_OFFSET']
|
||||
if start_time < 0
|
||||
if end_time <= datastore['TIME_OFFSET']
|
||||
fail_with(Failure::Unknown, "#{peer} - Exploit failed.")
|
||||
fail_with(Failure::Unknown, "#{peer} - Exploit failed")
|
||||
end
|
||||
start_time = 0
|
||||
end
|
||||
|
|
|
@ -95,7 +95,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
end
|
||||
|
||||
unless res.body =~ /dwr.engine._remoteHandleCallback/
|
||||
fail_with Failure::UnexpectedReply, "#{peer} Export failed."
|
||||
fail_with Failure::UnexpectedReply, "#{peer} Export failed"
|
||||
end
|
||||
|
||||
config_data = res.body.scan(/dwr.engine._remoteHandleCallback\('\d*','\d*',"(.+)"\);/).flatten.first
|
||||
|
|
|
@ -48,7 +48,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
'query' => 'param=com.sap.ctc.util.FileSystemConfig;EXECUTE_CMD;CMDLINE=' + Rex::Text::uri_encode(datastore['CMD'])
|
||||
})
|
||||
if !res or res.code != 200
|
||||
print_error("#{rhost}:#{rport} - Exploit failed.")
|
||||
print_error("#{rhost}:#{rport} - Exploit failed")
|
||||
return
|
||||
end
|
||||
rescue ::Rex::ConnectionError
|
||||
|
@ -61,7 +61,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
print_line("#{rhost}:#{rport} - Command: #{datastore['CMD']}\n")
|
||||
print_line("#{rhost}:#{rport} - Output: #{res.body}")
|
||||
else
|
||||
print_error("#{rhost}:#{rport} - Exploit failed.")
|
||||
print_error("#{rhost}:#{rport} - Exploit failed")
|
||||
vprint_error("#{rhost}:#{rport} - Output: #{res.body}")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -155,7 +155,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
print_status("#{rhost}:#{rport} - Login with the provided credentials...")
|
||||
cookie = login(datastore["USERNAME"], datastore["PASSWORD"])
|
||||
if cookie.nil?
|
||||
print_error("#{rhost}:#{rport} - Login failed.")
|
||||
print_error("#{rhost}:#{rport} - Login failed")
|
||||
else
|
||||
print_good("#{rhost}:#{rport} - Login Successful. Proceeding...")
|
||||
end
|
||||
|
|
|
@ -142,7 +142,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
end
|
||||
|
||||
rescue ::Rex::ConnectionError
|
||||
print_error("Version check Connection failed.")
|
||||
print_error("Version check Connection failed")
|
||||
end
|
||||
|
||||
# This section logs on and retrieves AuthKey token
|
||||
|
|
|
@ -264,7 +264,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
}, datastore['TIMEOUT'].to_i)
|
||||
|
||||
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, ::Rex::ConnectionError
|
||||
print_error("Connection failed.")
|
||||
print_error("Connection failed")
|
||||
end
|
||||
|
||||
res
|
||||
|
|
|
@ -149,7 +149,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
:exploited_at => Time.now.utc
|
||||
)
|
||||
else
|
||||
print_error("#{ip}: File doesn't seem to exist. The upload probably failed.")
|
||||
print_error("#{ip}: File doesn't seem to exist. The upload probably failed")
|
||||
end
|
||||
|
||||
when 'DELETE'
|
||||
|
|
|
@ -138,7 +138,7 @@ class MetasploitModule < Msf::Auxiliary
|
|||
if res && res.body && res.body && res.body.to_s =~ /CFA/
|
||||
print_good("Call forwarded successfully for #{fintnumber}")
|
||||
else
|
||||
print_error("Call forward failed.")
|
||||
print_error("Call forward failed")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -257,7 +257,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
start_time -= datastore['TIME_OFFSET']
|
||||
if start_time < 0
|
||||
if end_time <= datastore['TIME_OFFSET']
|
||||
fail_with(Failure::Unknown, "#{peer} - Exploit failed.")
|
||||
fail_with(Failure::Unknown, "#{peer} - Exploit failed")
|
||||
end
|
||||
start_time = 0
|
||||
end
|
||||
|
|
|
@ -72,8 +72,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
def exploit
|
||||
version = do_login(username,password,database)
|
||||
case version
|
||||
when :noauth; print_error "Authentication failed."; return
|
||||
when :noconn; print_error "Connection failed."; return
|
||||
when :noauth; print_error "Authentication failed"; return
|
||||
when :noconn; print_error "Connection failed"; return
|
||||
else
|
||||
print_status("#{rhost}:#{rport} - #{version}")
|
||||
end
|
||||
|
|
|
@ -107,7 +107,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
def exploit
|
||||
unless datastore['FORCE_EXPLOIT']
|
||||
print_status("Checking if target is vulnerable...")
|
||||
fail_with(Failure::NotVulnerable, "Vulnerability check failed.") if check != Exploit::CheckCode::Vulnerable
|
||||
fail_with(Failure::NotVulnerable, "Vulnerability check failed") if check != Exploit::CheckCode::Vulnerable
|
||||
print_good("Target is vulnerable.")
|
||||
end
|
||||
information_leak
|
||||
|
|
|
@ -125,11 +125,11 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
# with a CUPS filter pointing to /bin/bash
|
||||
res = add_printer(printer_name, cmd)
|
||||
if !res
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not add printer - Connection failed.")
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not add printer - Connection failed")
|
||||
elsif res.body =~ /Set Default Options for #{printer_name}/
|
||||
print_good("Added printer successfully")
|
||||
elsif res.code == 401 || (res.code == 426 && datastore['SSL'])
|
||||
fail_with(Failure::NoAccess, "#{peer} - Could not add printer - Authentication failed.")
|
||||
fail_with(Failure::NoAccess, "#{peer} - Could not add printer - Authentication failed")
|
||||
elsif res.code == 426
|
||||
fail_with(Failure::BadConfig, "#{peer} - Could not add printer - SSL required - set SSL true.")
|
||||
else
|
||||
|
@ -141,11 +141,11 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
# which executes the payload in the environment variables.
|
||||
res = print_test_page(printer_name)
|
||||
if !res
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not add test page to print queue - Connection failed.")
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not add test page to print queue - Connection failed")
|
||||
elsif res.body =~ /Test page sent; job ID is/
|
||||
vprint_good("Added test page to printer queue")
|
||||
elsif res.code == 401 || (res.code == 426 && datastore['SSL'])
|
||||
fail_with(Failure::NoAccess, "#{peer} - Could not add test page to print queue - Authentication failed.")
|
||||
fail_with(Failure::NoAccess, "#{peer} - Could not add test page to print queue - Authentication failed")
|
||||
elsif res.code == 426
|
||||
fail_with(Failure::BadConfig, "#{peer} - Could not add test page to print queue - SSL required - set SSL true.")
|
||||
else
|
||||
|
@ -155,11 +155,11 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
# Delete the printer
|
||||
res = delete_printer(printer_name)
|
||||
if !res
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not delete printer - Connection failed.")
|
||||
fail_with(Failure::Unreachable, "#{peer} - Could not delete printer - Connection failed")
|
||||
elsif res.body =~ /has been deleted successfully/
|
||||
print_good("Deleted printer '#{printer_name}' successfully")
|
||||
elsif res.code == 401 || (res.code == 426 && datastore['SSL'])
|
||||
vprint_warning("Could not delete printer '#{printer_name}' - Authentication failed.")
|
||||
vprint_warning("Could not delete printer '#{printer_name}' - Authentication failed")
|
||||
elsif res.code == 426
|
||||
vprint_warning("Could not delete printer '#{printer_name}' - SSL required - set SSL true.")
|
||||
else
|
||||
|
|
|
@ -63,7 +63,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
send_request_raw({ 'uri' => "/#{page}" }, 5)
|
||||
handler
|
||||
else
|
||||
print_error("Exploit failed.")
|
||||
print_error("Exploit failed")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
def exploit
|
||||
@my_target = pick_target
|
||||
if @my_target.nil?
|
||||
fail_with(Failure::NoTarget, "#{peer} - Automatic targeting failed.")
|
||||
fail_with(Failure::NoTarget, "#{peer} - Automatic targeting failed")
|
||||
else
|
||||
print_status("Selected target #{@my_target.name}")
|
||||
end
|
||||
|
|
|
@ -333,7 +333,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
if r && r.code == 404 && r.body =~ /not exist/
|
||||
print_error("File: #{file_name} does not exist.")
|
||||
elsif r
|
||||
print_error("Received response #{r.code}, exploit probably failed.")
|
||||
print_error("Received response #{r.code}, exploit probably failed")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
})
|
||||
|
||||
if !resp or resp.code != 200
|
||||
fail_with(Failure::UnexpectedReply, "Posting cron failed.")
|
||||
fail_with(Failure::UnexpectedReply, "Posting cron failed")
|
||||
end
|
||||
|
||||
print_status("Waiting for connect-back, this will take up to a minute")
|
||||
|
|
|
@ -231,7 +231,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
# Find the filename of our uploaded shell
|
||||
files = get_my_file(before.body, after.body)
|
||||
if files.empty?
|
||||
print_error("No new file(s) found. The upload probably failed.")
|
||||
print_error("No new file(s) found. The upload probably failed")
|
||||
return
|
||||
else
|
||||
vprint_status("Found these new files: #{files.inspect}")
|
||||
|
|
|
@ -161,7 +161,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
})
|
||||
|
||||
if login_check.body =~ /Welcome to/
|
||||
fail_with(Failure::NoAccess, "Authentication failed.")
|
||||
fail_with(Failure::NoAccess, "Authentication failed")
|
||||
else
|
||||
print_good("Authentication successful")
|
||||
end
|
||||
|
|
|
@ -164,7 +164,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
print_status("Loading payload: #{path}#{b64_version}/#{@php_fname}")
|
||||
send_request_raw({'uri'=>"#{path}#{b64_version}/#{@php_fname}"})
|
||||
if res and res.code == 404
|
||||
print_error("Server returned 404, the upload attempt probably failed.")
|
||||
print_error("Server returned 404, the upload attempt probably failed")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
elsif (response =~ /Disk or network error./)
|
||||
vprint_error("Server is vulnerable but the driver letter doesn't physically exist.")
|
||||
elsif (response =~ /Syntax error in CREATE TABLE statement/)
|
||||
vprint_error("Server is vulnerable and the database exists however the CREATE TABLE command failed.")
|
||||
vprint_error("Server is vulnerable and the database exists however the CREATE TABLE command failed")
|
||||
elsif (response =~ /Table '(\w+)' already exists/)
|
||||
vprint_error("Server is vulnerable and the database exists however the TABLE '#{$1}' already exists!")
|
||||
elsif (response =~ /Syntax error \(missing operator\) in query expression/)
|
||||
|
|
|
@ -79,7 +79,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
res = sock.get_once
|
||||
disconnect
|
||||
if !res
|
||||
vprint_error "Connection failed."
|
||||
vprint_error "Connection failed"
|
||||
Exploit::CheckCode::Unknown
|
||||
elsif res == "\x00\x00\x00\x00"
|
||||
vprint_status "Received reply (#{res.length} bytes)"
|
||||
|
@ -111,7 +111,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
res = sock.get_once
|
||||
disconnect
|
||||
if !res
|
||||
fail_with(Failure::Unknown, "#{peer} - Connection failed.")
|
||||
fail_with(Failure::Unknown, "#{peer} - Connection failed")
|
||||
elsif res == "\x00\x00\x00\x00"
|
||||
print_status "Received reply (#{res.length} bytes)"
|
||||
else
|
||||
|
|
|
@ -65,8 +65,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
|||
def exploit
|
||||
version = do_login(username,password,database)
|
||||
case version
|
||||
when :noauth; print_error "Authentication failed."; return
|
||||
when :noconn; print_error "Connection failed."; return
|
||||
when :noauth; print_error "Authentication failed"; return
|
||||
when :noconn; print_error "Connection failed"; return
|
||||
else
|
||||
print_status("#{rhost}:#{rport} - #{version}")
|
||||
end
|
||||
|
|
|
@ -143,7 +143,7 @@ class MetasploitModule < Msf::Post
|
|||
end
|
||||
end
|
||||
rescue
|
||||
print_error("Cannot open #{path} you probably don't have permission to open the file or parsing failed.")
|
||||
print_error("Cannot open #{path} you probably don't have permission to open the file or parsing failed")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -173,7 +173,7 @@ class MetasploitModule < Msf::Post
|
|||
end
|
||||
end
|
||||
rescue
|
||||
print_status("Cannot open #{path} you probably don't have permission to open the file or parsing failed.")
|
||||
print_status("Cannot open #{path} you probably don't have permission to open the file or parsing failed")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue