Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
cgranleese-r7 committed Aug 30, 2024
1 parent 0a9849b commit f7fe38d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion spec/acceptance/command_shell_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/meterpreter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/support/acceptance/command_shell/linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 2 additions & 0 deletions test/modules/post/test/cmd_exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit f7fe38d

Please sign in to comment.