Skip to content

Commit

Permalink
Experimentation hax
Browse files Browse the repository at this point in the history
CI tests go burrrrr
  • Loading branch information
zeroSteiner committed Dec 5, 2024
1 parent 6274d04 commit 647d113
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/shared_meterpreter_acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ jobs:
java_meterpreter_compilation:
name: Compile Java Meterpreter
runs-on: ubuntu-latest
if: ${{ inputs.build_metasploit_payloads }}
#if: ${{ inputs.build_metasploit_payloads }}

steps:
- name: Checkout metasploit-payloads
uses: actions/checkout@v4
with:
repository: rapid7/metasploit-payloads
repository: zeroSteiner/metasploit-payloads
path: metasploit-payloads
ref: ${{ inputs.metasploit_payloads_commit }}
ref: fix/met/java/symlinks

- name: Build Java and Android payloads
run: |
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
with:
repository: zeroSteiner/metasploit-framework
path: metasploit-framework
ref: ${{ inputs.metasploit_framework_commit }}
ref: fix/met/java-win-symlink-tests

- name: Setup Ruby
env:
Expand Down Expand Up @@ -246,9 +246,9 @@ jobs:
if: ${{ inputs.build_metasploit_payloads && matrix.meterpreter.name != 'mettle' }}
uses: actions/checkout@v4
with:
repository: rapid7/metasploit-payloads
repository: zeroSteiner/metasploit-payloads
path: metasploit-payloads
ref: ${{ inputs.metasploit_payloads_commit }}
ref: fix/met/java/symlinks

- name: Get metasploit-payloads version
if: ${{ inputs.build_metasploit_payloads && matrix.meterpreter.name != 'mettle' }}
Expand Down
74 changes: 64 additions & 10 deletions spec/support/acceptance/session/java.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ module Acceptance::Session
reason: "Windows only test"
}
],
:windows
[
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]
],
skipped: false,
lines: {
Expand Down Expand Up @@ -75,7 +81,13 @@ module Acceptance::Session
},
{
name: "post/test/cmd_exec",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand All @@ -91,7 +103,13 @@ module Acceptance::Session
},
{
name: "post/test/extapi",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand Down Expand Up @@ -123,7 +141,13 @@ module Acceptance::Session
},
{
name: "post/test/get_env",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand All @@ -139,7 +163,13 @@ module Acceptance::Session
},
{
name: "post/test/meterpreter",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand All @@ -155,7 +185,13 @@ module Acceptance::Session
},
{
name: "post/test/railgun",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand All @@ -171,7 +207,13 @@ module Acceptance::Session
},
{
name: "post/test/railgun_reverse_lookups",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand Down Expand Up @@ -202,7 +244,13 @@ module Acceptance::Session
reason: "Windows only test"
}
],
:windows
[
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]
],
skipped: false,
lines: {
Expand All @@ -222,7 +270,13 @@ module Acceptance::Session
},
{
name: "post/test/search",
platforms: [:linux, :osx, :windows],
platforms: [:linux, :osx, [
:windows,
{
skip: true,
reason: "Skip while experimenting"
}
]],
skipped: false,
lines: {
linux: {
Expand All @@ -245,7 +299,7 @@ module Acceptance::Session
:windows,
{
skip: true,
reason: "Unix only test"
reason: "Skip while experimenting"
}
]
],
Expand Down
4 changes: 4 additions & 0 deletions test/modules/post/test/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def test_dir
unless (session.platform == 'windows') || (session.platform != 'windows' && command_exists?('ln'))
print_warning('skipping link related checks because the target is incompatible')
else
print_status('*' * 50)
print_status("CWD (cmd): #{cmd_exec("cmd.exe /c echo %cd%")}")
print_status("CWD (met): #{session.fs.dir.getwd}")
print_status('*' * 50)
it 'should delete a symbolic link target' do
# TODO: Fix this functionality
if session.platform.eql?('windows') && session.type.eql?('shell')
Expand Down

0 comments on commit 647d113

Please sign in to comment.