diff --git a/spec/acceptance/command_shell_spec.rb b/spec/acceptance/command_shell_spec.rb index 63c0a985f9d0..e4533ba18777 100644 --- a/spec/acceptance/command_shell_spec.rb +++ b/spec/acceptance/command_shell_spec.rb @@ -4,12 +4,12 @@ RSpec.describe 'CommandShell' do include_context 'wait_for_expect' - # Tests to ensure that CMD/Powershell/Linux is consistent across all implementations/operation systems + # Tests to ensure that CMD/Powershell/unix is consistent across all implementations/operation systems COMMAND_SHELL_PAYLOADS = Acceptance::Session.with_session_name_merged( { - powershell: Acceptance::Session::POWERSHELL, - cmd: Acceptance::Session::CMD, - linux: Acceptance::Session::LINUX + powershell: Acceptance::CommandShell::PowerShell::TESTS, + cmd: Acceptance::CommandShell::PowerShell::TESTS, + unix: Acceptance::CommandShell::Unix::TESTS, } ) diff --git a/spec/acceptance/meterpreter_spec.rb b/spec/acceptance/meterpreter_spec.rb index 3bca9b2d9128..256950087e4c 100644 --- a/spec/acceptance/meterpreter_spec.rb +++ b/spec/acceptance/meterpreter_spec.rb @@ -7,11 +7,11 @@ # Tests to ensure that Meterpreter is consistent across all implementations/operation systems METERPRETER_PAYLOADS = Acceptance::Session.with_session_name_merged( { - python: Acceptance::Session::PYTHON_METERPRETER, - php: Acceptance::Session::PHP_METERPRETER, - java: Acceptance::Session::JAVA_METERPRETER, - mettle: Acceptance::Session::METTLE_METERPRETER, - windows_meterpreter: Acceptance::Session::WINDOWS_METERPRETER + python: Acceptance::Meterpreter::Python::TESTS, + php: Acceptance::Meterpreter::Php::TESTS, + java: Acceptance::Meterpreter::Java::TESTS, + mettle: Acceptance::Meterpreter::Mettle::TESTS, + windows_meterpreter: Acceptance::Meterpreter::WindowsMeterpreter::TESTS } ) diff --git a/spec/acceptance_spec_helper.rb b/spec/acceptance_spec_helper.rb index b4df9dff8081..7d5ca1e38224 100644 --- a/spec/acceptance_spec_helper.rb +++ b/spec/acceptance_spec_helper.rb @@ -5,7 +5,8 @@ acceptance_support_glob = File.expand_path(File.join(File.dirname(__FILE__), 'support', 'acceptance', '**', '*.rb')) shared_contexts_glob = File.expand_path(File.join(File.dirname(__FILE__), 'support', 'shared', 'contexts', '**', '*.rb')) -Dir[acceptance_support_glob, shared_contexts_glob].each do |f| +Dir[acceptance_support_glob, shared_contexts_glob].sort.each do |f| + puts f require f end diff --git a/spec/support/acceptance/command_shell.rb b/spec/support/acceptance/command_shell.rb new file mode 100644 index 000000000000..0eaaa419b417 --- /dev/null +++ b/spec/support/acceptance/command_shell.rb @@ -0,0 +1,2 @@ +module Acceptance::CommandShell +end diff --git a/spec/support/acceptance/command_shell/cmd.rb b/spec/support/acceptance/command_shell/cmd.rb index 8f9fca7f68cf..4fd0c537cddf 100644 --- a/spec/support/acceptance/command_shell/cmd.rb +++ b/spec/support/acceptance/command_shell/cmd.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - CMD = { +module Acceptance::CommandShell::Cmd + TESTS = { payloads: [ { name: 'windows/x64/shell_reverse_tcp', diff --git a/spec/support/acceptance/command_shell/powershell.rb b/spec/support/acceptance/command_shell/powershell.rb index f941057eccd4..2c79df934451 100644 --- a/spec/support/acceptance/command_shell/powershell.rb +++ b/spec/support/acceptance/command_shell/powershell.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - POWERSHELL = { +module Acceptance::CommandShell::PowerShell + TESTS = { payloads: [ { name: 'cmd/windows/powershell_reverse_tcp', diff --git a/spec/support/acceptance/command_shell/linux.rb b/spec/support/acceptance/command_shell/unix.rb similarity index 98% rename from spec/support/acceptance/command_shell/linux.rb rename to spec/support/acceptance/command_shell/unix.rb index 3eb40744ec55..14df6375c581 100644 --- a/spec/support/acceptance/command_shell/linux.rb +++ b/spec/support/acceptance/command_shell/unix.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - LINUX = { +module Acceptance::CommandShell::Unix + TESTS = { payloads: [ { name: "cmd/unix/reverse_bash", diff --git a/spec/support/acceptance/meterpreter.rb b/spec/support/acceptance/meterpreter.rb new file mode 100644 index 000000000000..40e324b99545 --- /dev/null +++ b/spec/support/acceptance/meterpreter.rb @@ -0,0 +1,2 @@ +module Acceptance::Meterpreter +end diff --git a/spec/support/acceptance/session/java.rb b/spec/support/acceptance/meterpreter/java.rb similarity index 99% rename from spec/support/acceptance/session/java.rb rename to spec/support/acceptance/meterpreter/java.rb index 029ce6e672f0..4571c99d41c3 100644 --- a/spec/support/acceptance/session/java.rb +++ b/spec/support/acceptance/meterpreter/java.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - JAVA_METERPRETER = { +module Acceptance::Meterpreter::Java + TESTS = { payloads: [ { name: "java/meterpreter/reverse_tcp", diff --git a/spec/support/acceptance/session/mettle.rb b/spec/support/acceptance/meterpreter/mettle.rb similarity index 99% rename from spec/support/acceptance/session/mettle.rb rename to spec/support/acceptance/meterpreter/mettle.rb index 182a0d370610..516751227721 100644 --- a/spec/support/acceptance/session/mettle.rb +++ b/spec/support/acceptance/meterpreter/mettle.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - METTLE_METERPRETER = { +module Acceptance::Meterpreter::Mettle + TESTS = { payloads: [ { name: "linux/x64/meterpreter/reverse_tcp", diff --git a/spec/support/acceptance/session/php.rb b/spec/support/acceptance/meterpreter/php.rb similarity index 99% rename from spec/support/acceptance/session/php.rb rename to spec/support/acceptance/meterpreter/php.rb index 0cc3fb666858..fa10a7b33275 100644 --- a/spec/support/acceptance/session/php.rb +++ b/spec/support/acceptance/meterpreter/php.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - PHP_METERPRETER = { +module Acceptance::Meterpreter::Php + TESTS = { payloads: [ { name: "php/meterpreter_reverse_tcp", diff --git a/spec/support/acceptance/session/python.rb b/spec/support/acceptance/meterpreter/python.rb similarity index 99% rename from spec/support/acceptance/session/python.rb rename to spec/support/acceptance/meterpreter/python.rb index eb2870c0eb7c..c92f0a097d84 100644 --- a/spec/support/acceptance/session/python.rb +++ b/spec/support/acceptance/meterpreter/python.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - PYTHON_METERPRETER = { +module Acceptance::Meterpreter::Python + TESTS = { payloads: [ { name: "python/meterpreter_reverse_tcp", diff --git a/spec/support/acceptance/session/windows_meterpreter.rb b/spec/support/acceptance/meterpreter/windows_meterpreter.rb similarity index 99% rename from spec/support/acceptance/session/windows_meterpreter.rb rename to spec/support/acceptance/meterpreter/windows_meterpreter.rb index 7784ab66d2fa..44e1929cd971 100644 --- a/spec/support/acceptance/session/windows_meterpreter.rb +++ b/spec/support/acceptance/meterpreter/windows_meterpreter.rb @@ -1,5 +1,5 @@ -module Acceptance::Session - WINDOWS_METERPRETER = { +module Acceptance::Meterpreter::WindowsMeterpreter + TESTS = { payloads: [ { name: "windows/meterpreter/reverse_tcp",