From ba6548db7571ff3058dd66428fbfe1aa65d23b29 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Thu, 16 Apr 2015 21:44:56 +0200 Subject: [PATCH] be consistent about naming --- modules/exploits/linux/http/astium_sqli_upload.rb | 8 ++++---- .../linux/http/dlink_command_php_exec_noauth.rb | 4 ++-- .../linux/http/raidsonic_nas_ib5220_exec_noauth.rb | 14 +++++++------- .../multi/http/hyperic_hq_script_console.rb | 2 +- .../multi/http/manageengine_auth_upload.rb | 6 +++--- .../multi/http/opmanager_socialit_file_upload.rb | 2 +- modules/exploits/multi/misc/java_jdwp_debugger.rb | 8 ++++---- .../windows/http/desktopcentral_file_upload.rb | 2 +- .../windows/http/kaseya_uploadimage_file_upload.rb | 2 +- .../exploits/windows/http/trackit_file_upload.rb | 2 +- modules/exploits/windows/local/bypassuac.rb | 2 +- .../exploits/windows/local/bypassuac_injection.rb | 4 ++-- modules/exploits/windows/local/ikeext_service.rb | 10 +++++----- modules/exploits/windows/local/run_as.rb | 4 ++-- modules/exploits/windows/smb/psexec_psh.rb | 2 +- modules/post/osx/capture/keylog_recorder.rb | 2 +- .../gather/credentials/mssql_local_hashdump.rb | 10 +++++----- modules/post/windows/gather/file_from_raw_ntfs.rb | 4 ++-- .../post/windows/manage/mssql_local_auth_bypass.rb | 6 +++--- modules/post/windows/manage/run_as.rb | 2 +- 20 files changed, 48 insertions(+), 48 deletions(-) diff --git a/modules/exploits/linux/http/astium_sqli_upload.rb b/modules/exploits/linux/http/astium_sqli_upload.rb index 1eee4373bb..a721d59af2 100644 --- a/modules/exploits/linux/http/astium_sqli_upload.rb +++ b/modules/exploits/linux/http/astium_sqli_upload.rb @@ -86,7 +86,7 @@ class Metasploit3 < Msf::Exploit::Remote redirect = URI(res.headers['Location']) print_status("#{peer} - Location is [ #{redirect} ]") else - fail_with(Exploit::Failure::Unknown, "#{peer} - Access to login page failed!") + fail_with(Failure::Unknown, "#{peer} - Access to login page failed!") end @@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Remote }) if not res or res.code != 200 - fail_with(Exploit::Failure::Unknown, "#{peer} - Redirect failed!") + fail_with(Failure::Unknown, "#{peer} - Redirect failed!") end @@ -121,7 +121,7 @@ class Metasploit3 < Msf::Exploit::Remote }) if not res or res.code != 302 - fail_with(Exploit::Failure::Unknown, "#{peer} - Login bypass was not succesful!") + fail_with(Failure::Unknown, "#{peer} - Login bypass was not succesful!") end # Random filename @@ -163,7 +163,7 @@ class Metasploit3 < Msf::Exploit::Remote # If the server returns 200 and the body contains our payload name, # we assume we uploaded the malicious file successfully if not res or res.code != 200 or res.body !~ /#{payload_name}/ - fail_with(Exploit::Failure::Unknown, "#{peer} - File wasn't uploaded, aborting!") + fail_with(Failure::Unknown, "#{peer} - File wasn't uploaded, aborting!") end register_file_for_cleanup("/usr/local/astium/web/html/upload/#{payload_name}") diff --git a/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb b/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb index 21d0facf14..c31dcce01a 100644 --- a/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb +++ b/modules/exploits/linux/http/dlink_command_php_exec_noauth.rb @@ -99,7 +99,7 @@ class Metasploit3 < Msf::Exploit::Remote prompt = negotiate_telnet(sock) if prompt.nil? sock.close - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a telnet session") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a telnet session") else print_good("#{rhost}:#{rport} - Telnet session successfully established... trying to connect") end @@ -113,7 +113,7 @@ class Metasploit3 < Msf::Exploit::Remote end end rescue ::Timeout::Error - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a Msf session") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a Msf session") end end diff --git a/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb b/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb index 829a161777..d6a748c00f 100644 --- a/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb +++ b/modules/exploits/linux/http/raidsonic_nas_ib5220_exec_noauth.rb @@ -83,7 +83,7 @@ class Metasploit3 < Msf::Exploit::Remote res = request(cmd) #no server header or something that we could use to get sure the command is executed if (!res or res.code != 200 or res.body !~ /#{RESPONSE_PATTERN}/) - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") end #second request @@ -95,7 +95,7 @@ class Metasploit3 < Msf::Exploit::Remote res = request(cmd) #no server header or something that we could use to get sure the command is executed if (!res or res.code != 200 or res.body !~ /#{RESPONSE_PATTERN}/) - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") end register_file_for_cleanup("/tmp/#{inetd_cfg}") @@ -107,7 +107,7 @@ class Metasploit3 < Msf::Exploit::Remote res = request(cmd) #no server header or something that we could use to get sure the command is executed if (!res or res.code != 200 or res.body !~ /#{RESPONSE_PATTERN}/) - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") end #fourth request @@ -119,7 +119,7 @@ class Metasploit3 < Msf::Exploit::Remote res = request(cmd) #no server header or something that we could use to get sure the command is executed if (!res or res.code != 200 or res.body !~ /#{RESPONSE_PATTERN}/) - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to execute payload") end print_status("#{rhost}:#{rport} - Trying to establish a telnet connection...") @@ -127,7 +127,7 @@ class Metasploit3 < Msf::Exploit::Remote sock = Rex::Socket.create_tcp({ 'PeerHost' => rhost, 'PeerPort' => telnet_port.to_i, 'Context' => ctx }) if sock.nil? - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Backdoor service has not been spawned!!!") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Backdoor service has not been spawned!!!") end add_socket(sock) @@ -136,7 +136,7 @@ class Metasploit3 < Msf::Exploit::Remote prompt = negotiate_telnet(sock) if prompt.nil? sock.close - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a telnet session") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Unable to establish a telnet session") else print_good("#{rhost}:#{rport} - Telnet session successfully established...") end @@ -173,7 +173,7 @@ class Metasploit3 < Msf::Exploit::Remote }) return res rescue ::Rex::ConnectionError - fail_with(Exploit::Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice") + fail_with(Failure::Unknown, "#{rhost}:#{rport} - Could not connect to the webservice") end end diff --git a/modules/exploits/multi/http/hyperic_hq_script_console.rb b/modules/exploits/multi/http/hyperic_hq_script_console.rb index cd4f1a1eb7..fd832713a3 100644 --- a/modules/exploits/multi/http/hyperic_hq_script_console.rb +++ b/modules/exploits/multi/http/hyperic_hq_script_console.rb @@ -151,7 +151,7 @@ class Metasploit3 < Msf::Exploit::Remote if res and res.code == 200 and res.body =~ /Executed/ vprint_good("#{peer} - Command executed successfully") else - fail_with(Exploit::Failure::Unknown, "#{peer} - Failed to execute the command.") + fail_with(Failure::Unknown, "#{peer} - Failed to execute the command.") end # version 4.6.6 returns a new CSRF nonce in the response if res.body =~ /org\.apache\.catalina\.filters\.CSRF_NONCE=([A-F\d]+)/ diff --git a/modules/exploits/multi/http/manageengine_auth_upload.rb b/modules/exploits/multi/http/manageengine_auth_upload.rb index 5280c8f0a3..5d5a78982d 100644 --- a/modules/exploits/multi/http/manageengine_auth_upload.rb +++ b/modules/exploits/multi/http/manageengine_auth_upload.rb @@ -377,7 +377,7 @@ class Metasploit3 < Msf::Exploit::Remote end if cookie.nil? - fail_with(Exploit::Failure::Unknown, "#{peer} - Failed to authenticate") + fail_with(Failure::Unknown, "#{peer} - Failed to authenticate") end # First we generate the WAR with the payload... @@ -406,7 +406,7 @@ class Metasploit3 < Msf::Exploit::Remote print_status("#{peer} - Uploading bogus file...") res = send_multipart_request(cookie, rand_text_alphanumeric(4 + rand(32 - 4)), rand_text_alphanumeric(4 + rand(32 - 4))) if res && res.code != 200 - fail_with(Exploit::Failure::Unknown, "#{peer} - Bogus file upload failed") + fail_with(Failure::Unknown, "#{peer} - Bogus file upload failed") end end @@ -416,7 +416,7 @@ class Metasploit3 < Msf::Exploit::Remote if res && res.code == 200 print_status("#{peer} - Upload appears to have been successful") else - fail_with(Exploit::Failure::Unknown, "#{peer} - EAR upload failed") + fail_with(Failure::Unknown, "#{peer} - EAR upload failed") end 10.times do diff --git a/modules/exploits/multi/http/opmanager_socialit_file_upload.rb b/modules/exploits/multi/http/opmanager_socialit_file_upload.rb index 088130385f..88ca6d81f7 100644 --- a/modules/exploits/multi/http/opmanager_socialit_file_upload.rb +++ b/modules/exploits/multi/http/opmanager_socialit_file_upload.rb @@ -122,7 +122,7 @@ class Metasploit3 < Msf::Exploit::Remote " seconds for deployment") sleep(datastore['SLEEP']) else - fail_with(Exploit::Failure::Unknown, "#{peer} - WAR upload failed") + fail_with(Failure::Unknown, "#{peer} - WAR upload failed") end print_status("#{peer} - Executing payload, wait for session...") diff --git a/modules/exploits/multi/misc/java_jdwp_debugger.rb b/modules/exploits/multi/misc/java_jdwp_debugger.rb index 0f07258835..5a13314c87 100644 --- a/modules/exploits/multi/misc/java_jdwp_debugger.rb +++ b/modules/exploits/multi/misc/java_jdwp_debugger.rb @@ -496,7 +496,7 @@ class Metasploit3 < Msf::Exploit::Remote sock.put(create_packet(THREADSTATUS_SIG, format(@vars["objectid_size"], thread_id))) buf = read_reply(datastore['BREAK_TIMEOUT']) unless buf - fail_with(Exploit::Failure::Unknown, "No network response") + fail_with(Failure::Unknown, "No network response") end status, suspend_status = buf.unpack('NN') @@ -513,7 +513,7 @@ class Metasploit3 < Msf::Exploit::Remote response = read_reply(datastore['BREAK_TIMEOUT']) unless response - fail_with(Exploit::Failure::Unknown, "No network response") + fail_with(Failure::Unknown, "No network response") end response @@ -529,7 +529,7 @@ class Metasploit3 < Msf::Exploit::Remote response = read_reply unless response - fail_with(Exploit::Failure::Unknown, "No network response") + fail_with(Failure::Unknown, "No network response") end response @@ -549,7 +549,7 @@ class Metasploit3 < Msf::Exploit::Remote sock.put(create_packet(EVENTSET_SIG, data)) response = read_reply unless response - fail_with(Exploit::Failure::Unknown, "#{peer} - No network response") + fail_with(Failure::Unknown, "#{peer} - No network response") end return response.unpack('N')[0] end diff --git a/modules/exploits/windows/http/desktopcentral_file_upload.rb b/modules/exploits/windows/http/desktopcentral_file_upload.rb index 9a1324960a..fc0722815c 100644 --- a/modules/exploits/windows/http/desktopcentral_file_upload.rb +++ b/modules/exploits/windows/http/desktopcentral_file_upload.rb @@ -122,7 +122,7 @@ class Metasploit3 < Msf::Exploit::Remote register_files_for_cleanup(exe_filename) register_files_for_cleanup("..\\webapps\\DesktopCentral\\#{dropper_filename}") else - fail_with(Exploit::Failure::Unknown, "#{peer} - JSP upload failed") + fail_with(Failure::Unknown, "#{peer} - JSP upload failed") end print_status("#{peer} - Executing payload") diff --git a/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb b/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb index 12a48ce262..0beec4acd5 100644 --- a/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb +++ b/modules/exploits/windows/http/kaseya_uploadimage_file_upload.rb @@ -66,7 +66,7 @@ class Metasploit3 < Msf::Exploit::Remote }) unless res and res.code == 500 and res.headers and res.headers.include?('Set-Cookie') - fail_with(Exploit::Failure::Unknown, "#{peer} - Failed to get cookie") + fail_with(Failure::Unknown, "#{peer} - Failed to get cookie") end cookie = res.get_cookies diff --git a/modules/exploits/windows/http/trackit_file_upload.rb b/modules/exploits/windows/http/trackit_file_upload.rb index 07eeec0cba..8be2a9fcc9 100644 --- a/modules/exploits/windows/http/trackit_file_upload.rb +++ b/modules/exploits/windows/http/trackit_file_upload.rb @@ -530,7 +530,7 @@ class Metasploit3 < Msf::Exploit::Remote end end if not res or res.code != 200 - fail_with(Exploit::Failure::Unknown, "#{peer} - Could not execute payload" + (res ? ", got HTTP code #{res.code.to_s}": "")) + fail_with(Failure::Unknown, "#{peer} - Could not execute payload" + (res ? ", got HTTP code #{res.code.to_s}": "")) end handler diff --git a/modules/exploits/windows/local/bypassuac.rb b/modules/exploits/windows/local/bypassuac.rb index 046c600212..fdaa48cd3a 100644 --- a/modules/exploits/windows/local/bypassuac.rb +++ b/modules/exploits/windows/local/bypassuac.rb @@ -171,7 +171,7 @@ class Metasploit3 < Msf::Exploit::Local print_status 'UAC is Enabled, checking level...' else if is_in_admin_group? - fail_with(Exploit::Failure::Unknown, 'UAC is disabled and we are in the admin group so something has gone wrong...') + fail_with(Failure::Unknown, 'UAC is disabled and we are in the admin group so something has gone wrong...') else fail_with(Exploit::Failure::NoAccess, 'Not in admins group, cannot escalate with this module') end diff --git a/modules/exploits/windows/local/bypassuac_injection.rb b/modules/exploits/windows/local/bypassuac_injection.rb index b2003f93b8..6ed7c49c34 100644 --- a/modules/exploits/windows/local/bypassuac_injection.rb +++ b/modules/exploits/windows/local/bypassuac_injection.rb @@ -179,7 +179,7 @@ class Metasploit3 < Msf::Exploit::Local pid = cmd_exec_get_pid(cmd) unless pid - fail_with(Exploit::Failure::Unknown, 'Spawning Process failed...') + fail_with(Failure::Unknown, 'Spawning Process failed...') end pid @@ -194,7 +194,7 @@ class Metasploit3 < Msf::Exploit::Local register_file_for_cleanup(payload_filepath) rescue Rex::Post::Meterpreter::RequestError => e fail_with( - Exploit::Failure::Unknown, + Failure::Unknown, "Error uploading file #{payload_filepath}: #{e.class} #{e}" ) end diff --git a/modules/exploits/windows/local/ikeext_service.rb b/modules/exploits/windows/local/ikeext_service.rb index 01803bb100..e8d5b726df 100644 --- a/modules/exploits/windows/local/ikeext_service.rb +++ b/modules/exploits/windows/local/ikeext_service.rb @@ -199,10 +199,10 @@ class Metasploit3 < Msf::Exploit::Local vprint_error("Error while using get_imperstoken: #{e}") end - fail_with(Exploit::Failure::Unknown, "Unable to retrieve token.") unless @token + fail_with(Failure::Unknown, "Unable to retrieve token.") unless @token if is_system? - fail_with(Exploit::Failure::Unknown, "Current user is already SYSTEM, aborting.") + fail_with(Failure::Unknown, "Current user is already SYSTEM, aborting.") end print_status("Checking service exists...") @@ -247,7 +247,7 @@ class Metasploit3 < Msf::Exploit::Local register_file_for_cleanup(@dll_file_path) rescue Rex::Post::Meterpreter::RequestError => e # Can't write the file, can't go on - fail_with(Exploit::Failure::Unknown, e.message) + fail_with(Failure::Unknown, e.message) end # @@ -266,10 +266,10 @@ class Metasploit3 < Msf::Exploit::Local select(nil,nil,nil,1) end else - fail_with(Exploit::Failure::Unknown, "Unable to start service, use exploit -j to run as a background job and wait for a reboot...") + fail_with(Failure::Unknown, "Unable to start service, use exploit -j to run as a background job and wait for a reboot...") end else - fail_with(Exploit::Failure::Unknown, "Unable to start service, and it does not auto start, cleaning up...") + fail_with(Failure::Unknown, "Unable to start service, and it does not auto start, cleaning up...") end end end diff --git a/modules/exploits/windows/local/run_as.rb b/modules/exploits/windows/local/run_as.rb index e0eea52220..33223e8640 100644 --- a/modules/exploits/windows/local/run_as.rb +++ b/modules/exploits/windows/local/run_as.rb @@ -95,7 +95,7 @@ class Metasploit3 < Msf::Exploit::Local 'PAGE_EXECUTE_READWRITE') address = virtual_alloc['return'] - fail_with(Exploit::Failure::Unknown, "Unable to allocate memory in target process: #{virtual_alloc['ErrorMessage']}") if address == 0 + fail_with(Failure::Unknown, "Unable to allocate memory in target process: #{virtual_alloc['ErrorMessage']}") if address == 0 write_memory = session.railgun.kernel32.WriteProcessMemory(process_handle, address, @@ -103,7 +103,7 @@ class Metasploit3 < Msf::Exploit::Local raw.length, 4) - fail_with(Exploit::Failure::Unknown, + fail_with(Failure::Unknown, "Unable to write memory in target process @ 0x#{address.to_s(16)}: #{write_memory['ErrorMessage']}") unless write_memory['return'] create_remote_thread = session.railgun.kernel32.CreateRemoteThread(process_handle, diff --git a/modules/exploits/windows/smb/psexec_psh.rb b/modules/exploits/windows/smb/psexec_psh.rb index 4c395acfb0..c89080b652 100644 --- a/modules/exploits/windows/smb/psexec_psh.rb +++ b/modules/exploits/windows/smb/psexec_psh.rb @@ -86,7 +86,7 @@ class Metasploit3 < Msf::Exploit::Remote begin return psexec(command) rescue StandardError => exec_command_error - fail_with(Exploit::Failure::Unknown, "#{peer} - Unable to execute specified command: #{exec_command_error}") + fail_with(Failure::Unknown, "#{peer} - Unable to execute specified command: #{exec_command_error}") ensure disconnect end diff --git a/modules/post/osx/capture/keylog_recorder.rb b/modules/post/osx/capture/keylog_recorder.rb index 12da6d02d1..2f7e3c1710 100644 --- a/modules/post/osx/capture/keylog_recorder.rb +++ b/modules/post/osx/capture/keylog_recorder.rb @@ -70,7 +70,7 @@ class Metasploit3 < Msf::Post print_status "Ruby process executing with pid #{rpid.to_i}" rpid.to_i else - fail_with(Exploit::Failure::Unknown, "Ruby keylogger command failed with error #{rpid}") + fail_with(Failure::Unknown, "Ruby keylogger command failed with error #{rpid}") end end diff --git a/modules/post/windows/gather/credentials/mssql_local_hashdump.rb b/modules/post/windows/gather/credentials/mssql_local_hashdump.rb index 784f6134cc..f1d00c5d0b 100644 --- a/modules/post/windows/gather/credentials/mssql_local_hashdump.rb +++ b/modules/post/windows/gather/credentials/mssql_local_hashdump.rb @@ -48,15 +48,15 @@ class Metasploit3 < Msf::Post # Identify available native SQL client get_sql_client - fail_with(Exploit::Failure::Unknown, 'Unable to identify a SQL client') unless @sql_client + fail_with(Failure::Unknown, 'Unable to identify a SQL client') unless @sql_client # Get LocalSystem privileges system_status = get_system - fail_with(Exploit::Failure::Unknown, 'Unable to get SYSTEM') unless system_status + fail_with(Failure::Unknown, 'Unable to get SYSTEM') unless system_status begin service = check_for_sqlserver(instance) - fail_with(Exploit::Failure::Unknown, 'Unable to identify MSSQL Service') unless service + fail_with(Failure::Unknown, 'Unable to identify MSSQL Service') unless service print_status("Identified service '#{service[:display]}', PID: #{service[:pid]}") instance_name = service[:display].gsub('SQL Server (','').gsub(')','').lstrip.rstrip @@ -107,7 +107,7 @@ class Metasploit3 < Msf::Post hash_type = "mssql12" query = mssql_2k5_password_hashes else - fail_with(Exploit::Failure::Unknown, "Unable to determine MSSQL Version") + fail_with(Failure::Unknown, "Unable to determine MSSQL Version") end print_status("Attempting to get password hashes...") @@ -120,7 +120,7 @@ class Metasploit3 < Msf::Post store_hashes(hash_array, hash_type) else - fail_with(Exploit::Failure::Unknown, "Unable to retrieve hashes") + fail_with(Failure::Unknown, "Unable to retrieve hashes") end end diff --git a/modules/post/windows/gather/file_from_raw_ntfs.rb b/modules/post/windows/gather/file_from_raw_ntfs.rb index 0b7d5f027a..1e91274296 100644 --- a/modules/post/windows/gather/file_from_raw_ntfs.rb +++ b/modules/post/windows/gather/file_from_raw_ntfs.rb @@ -55,7 +55,7 @@ class Metasploit3 < Msf::Post ) else fail_with( - Exploit::Failure::Unknown, + Failure::Unknown, "Unknown error locating #{file_path}. Windows Error Code: #{r['GetLastError']} - #{r['ErrorMessage']}" ) end @@ -72,7 +72,7 @@ class Metasploit3 < Msf::Post if r['GetLastError'] != ERROR::SUCCESS fail_with( - Exploit::Failure::Unknown, + Failure::Unknown, "Error opening #{drive}. Windows Error Code: #{r['GetLastError']} - #{r['ErrorMessage']}") end diff --git a/modules/post/windows/manage/mssql_local_auth_bypass.rb b/modules/post/windows/manage/mssql_local_auth_bypass.rb index 8b3d2f9c77..c65dc9cb89 100644 --- a/modules/post/windows/manage/mssql_local_auth_bypass.rb +++ b/modules/post/windows/manage/mssql_local_auth_bypass.rb @@ -51,14 +51,14 @@ class Metasploit3 < Msf::Post # Identify available native SQL client get_sql_client - fail_with(Exploit::Failure::Unknown, 'Unable to identify a SQL client') unless @sql_client + fail_with(Failure::Unknown, 'Unable to identify a SQL client') unless @sql_client # Get LocalSystem privileges system_status = get_system - fail_with(Exploit::Failure::Unknown, 'Unable to get SYSTEM') unless system_status + fail_with(Failure::Unknown, 'Unable to get SYSTEM') unless system_status begin service = check_for_sqlserver(instance) - fail_with(Exploit::Failure::Unknown, 'Unable to identify MSSQL Service') unless service + fail_with(Failure::Unknown, 'Unable to identify MSSQL Service') unless service print_status("Identified service '#{service[:display]}', PID: #{service[:pid]}") instance_name = service[:display].gsub('SQL Server (','').gsub(')','').lstrip.rstrip diff --git a/modules/post/windows/manage/run_as.rb b/modules/post/windows/manage/run_as.rb index 6d0e91b431..36137acf65 100644 --- a/modules/post/windows/manage/run_as.rb +++ b/modules/post/windows/manage/run_as.rb @@ -85,7 +85,7 @@ class Metasploit3 < Msf::Post if setpass print_status("Setting user password") - fail_with(Exploit::Failure::Unknown, 'Error resetting password') unless reset_pass(user, password) + fail_with(Failure::Unknown, 'Error resetting password') unless reset_pass(user, password) end system_temp = get_env('WINDIR') << '\\Temp'