diff --git a/spec/acceptance/command_shell_spec.rb b/spec/acceptance/command_shell_spec.rb index 6fe6b1e1057d8..46436afd5d740 100644 --- a/spec/acceptance/command_shell_spec.rb +++ b/spec/acceptance/command_shell_spec.rb @@ -411,7 +411,7 @@ def get_file_attachment_contents(path) validated_lines.each do |test_line| test_line = Acceptance::CommandShell.uncolorize(test_line) - expect(test_line).to_not include('FAILED', '[-] FAILED', '[-] Exception', '[-] '), "Unexpected error: #{test_line}" + expect(test_line).to_not include('FAILED', '[-] '), "Unexpected error: #{test_line}" end # Assert all expected lines are present diff --git a/spec/acceptance/meterpreter_spec.rb b/spec/acceptance/meterpreter_spec.rb index 0dfcdc5cc308d..3fdd74696e338 100644 --- a/spec/acceptance/meterpreter_spec.rb +++ b/spec/acceptance/meterpreter_spec.rb @@ -408,7 +408,7 @@ def get_file_attachment_contents(path) validated_lines.each do |test_line| test_line = Acceptance::Meterpreter.uncolorize(test_line) - expect(test_line).to_not include('FAILED', '[-] FAILED', '[-] Exception', '[-] '), "Unexpected error: #{test_line}" + expect(test_line).to_not include('FAILED', '[-] '), "Unexpected error: #{test_line}" end # Assert all expected lines are present diff --git a/spec/support/acceptance/command_shell/linux.rb b/spec/support/acceptance/command_shell/linux.rb index cd80bd4e20c35..98c6924b5945d 100644 --- a/spec/support/acceptance/command_shell/linux.rb +++ b/spec/support/acceptance/command_shell/linux.rb @@ -3,10 +3,10 @@ module Acceptance::CommandShell payloads: [ { name: "cmd/unix/reverse_bash", - extension: "", + extension: ".sh", platforms: [:linux], executable: true, - execute_cmd: ["${payload_path}"], + execute_cmd: ["sh ${payload_path}"], generate_options: { '-f': "raw" }, diff --git a/test/modules/post/test/cmd_exec.rb b/test/modules/post/test/cmd_exec.rb index 0d339310634c6..bf0dcd7a60e7b 100644 --- a/test/modules/post/test/cmd_exec.rb +++ b/test/modules/post/test/cmd_exec.rb @@ -38,6 +38,8 @@ def show_args_binary { path: 'show_args.exe', cmd: "#{pwd}\\show_args.exe" } elsif session.platform == 'windows' && session.type == 'shell' { path: 'show_args.exe', cmd: 'show_args.exe' } + elsif session.platform == 'windows' && session.arch == 'php' + { path: 'show_args.exe', cmd: '.\\show_args.exe' } elsif session.platform == 'windows' { path: 'show_args.exe', cmd: './show_args.exe' } elsif session.type == 'meterpreter' && session.arch == 'java'