@@ -295,7 +295,7 @@ jobs:
295
295
os :
296
296
- macos-13
297
297
ruby :
298
- - 3.0.6
298
+ - 3.2.5
299
299
300
300
name : ${{ matrix.os }}
301
301
steps :
@@ -368,9 +368,9 @@ jobs:
368
368
os :
369
369
- windows-2022
370
370
ruby :
371
- - 3.0.6
371
+ - 3.2.5
372
372
373
- name : ${{ matrix.os }}
373
+ name : ${{ matrix.os }} compilation
374
374
steps :
375
375
# https://github.com/actions/runner-images/issues/5143
376
376
# https://github.com/actions/runner-images/issues/9701
@@ -393,6 +393,12 @@ jobs:
393
393
submodules : true
394
394
path : metasploit-omnibus
395
395
396
+ - name : Update bundler version
397
+ # Github actions with Ruby requires Bundler 2.2.18+
398
+ # https://github.com/ruby/setup-ruby/tree/d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c#windows
399
+ run : |
400
+ (Get-Content metasploit-omnibus\Gemfile.lock).Replace(' 2.2.33', ' 2.5.10') | Set-Content metasploit-omnibus\Gemfile.lock
401
+
396
402
- name : Setup Ruby
397
403
env :
398
404
BUNDLE_FORCE_RUBY_PLATFORM : true
@@ -404,7 +410,7 @@ jobs:
404
410
working-directory : metasploit-omnibus
405
411
# Github actions with Ruby requires Bundler 2.2.18+
406
412
# https://github.com/ruby/setup-ruby/tree/d2b39ad0b52eca07d23f3aa14fdf2a3fcc1f411c#windows
407
- bundler : 2.2.33
413
+ bundler : 2.5.10
408
414
409
415
# If you need to build a custom version of pcaprub:
410
416
# - name: Checkout pcaprub
@@ -445,41 +451,6 @@ jobs:
445
451
rem and the ridk.cmd Ruby installer will forcibly kill the msys2 process before attempting to install ruby
446
452
ruby bin/omnibus build metasploit-framework
447
453
448
- # Currently hangs on Github actions - but passes locally, potential cause within the debug.log file:
449
- #
450
- # Info 1603.The file C:\Windows\system32\vcruntime140_1.dll is being held in use. Close that application and retry.
451
- #
452
- # - name: Test artifact
453
- # shell: pwsh
454
- # run: |
455
- # Set-PSDebug -Trace 1
456
- # echo "Testing artifact"
457
-
458
- # Remove-Item c:\metasploit-framework -Recurse -ErrorAction Ignore
459
-
460
- # dir metasploit-omnibus\pkg
461
-
462
- # echo '' > debug.log
463
- # $artifact = (Get-ChildItem -Path "metasploit-omnibus/pkg/*.msi")[0].Name
464
- # $install_process = Start-Process msiexec.exe -ArgumentList "/i metasploit-omnibus\pkg\$artifact /quiet /qn /l*v debug.log" -NoNewWindow -PassThru
465
- # $log_process = Start-Process "powershell" "Get-Content -Path debug.log -Wait" -NoNewWindow -PassThru
466
- # $install_process.WaitForExit()
467
- # $log_process.Kill()
468
- # echo "finished install"
469
-
470
- # c:\metasploit-framework\bin\msfconsole -qx 'setg variable test; version; exit'
471
- # c:\metasploit-framework\bin\msfvenom -p windows/meterpreter/reverse_tcp -f exe -o test.exe
472
- # c:\metasploit-framework\bin\msfd -h
473
- # c:\metasploit-framework\bin\msfrpc -h
474
- # c:\metasploit-framework\bin\msfrpcd -h
475
- # c:\metasploit-framework\bin\msfdb -h
476
- # c:\metasploit-framework\bin\msfbinscan -h
477
- # c:\metasploit-framework\bin\msfrop -h
478
- # c:\metasploit-framework\bin\msfelfscan -h
479
- # c:\metasploit-framework\bin\msfmachscan -h
480
- # c:\metasploit-framework\bin\msfpescan -h
481
- # c:\metasploit-framework\bin\msfupdate
482
-
483
454
- name : Upload artifact
484
455
uses : actions/upload-artifact@v4
485
456
with :
@@ -490,3 +461,91 @@ jobs:
490
461
metasploit-omnibus/pkg/*.msi
491
462
metasploit-omnibus/pkg/*.deb
492
463
retention-days : 1
464
+
465
+ # Ensure we can install the Windows installer on a fresh environment without any pre-existing dependencies.
466
+ # Additionally, running on the previous windows builder is not currently possible, as it currently hangs on
467
+ # on Github actions - but passes locally. The potential cause is logged to the debug.log file:
468
+ #
469
+ # Info 1603.The file C:\Windows\system32\vcruntime140_1.dll is being held in use. Close that application and retry.
470
+ #
471
+ windows_testing :
472
+ needs : windows
473
+ runs-on : ${{ matrix.os }}
474
+ timeout-minutes : 180
475
+
476
+ strategy :
477
+ fail-fast : false
478
+ matrix :
479
+ os :
480
+ - windows-2022
481
+
482
+ name : ${{ matrix.os }} testing
483
+ steps :
484
+
485
+ - uses : actions/download-artifact@v4
486
+ name : Download Windows arifacts
487
+ id : download_windows_artifacts
488
+ with :
489
+ name : metasploit-windows-installers
490
+ path : metasploit-omnibus
491
+
492
+ - name : Install artifact
493
+ shell : pwsh
494
+ run : |
495
+ Set-PSDebug -Trace 1
496
+ echo "Testing artifact"
497
+
498
+ echo '' > debug.log
499
+ $artifact = (Get-ChildItem -Path "metasploit-omnibus/*.msi")[0].Name
500
+ $install_process = Start-Process msiexec.exe -ArgumentList "/i metasploit-omnibus\$artifact /quiet /qn /l*v debug.log" -NoNewWindow -PassThru
501
+ $install_process_handle = $install_process.Handle # cache proc.Handle - https://stackoverflow.com/questions/10262231/obtaining-exitcode-using-start-process-and-waitforexit-instead-of-wait
502
+ $log_process = Start-Process "powershell" "Get-Content -Path debug.log -Wait" -NoNewWindow -PassThru
503
+ $install_process.WaitForExit()
504
+ $log_process.Kill()
505
+ echo "finished install"
506
+ Exit $install_process.ExitCode
507
+
508
+ - shell : pwsh
509
+ run : |
510
+ d:\metasploit-framework\bin\msfvenom -p windows/meterpreter/reverse_tcp -f exe -o test.exe
511
+ Exit $LASTEXITCODE
512
+ - shell : pwsh
513
+ run : |
514
+ d:\metasploit-framework\bin\msfd -h
515
+ Exit $LASTEXITCODE
516
+ - shell : pwsh
517
+ run : |
518
+ d:\metasploit-framework\bin\msfrpc -h
519
+ Exit $LASTEXITCODE
520
+ - shell : pwsh
521
+ run : |
522
+ d:\metasploit-framework\bin\msfrpcd -h
523
+ Exit $LASTEXITCODE
524
+ - shell : pwsh
525
+ run : |
526
+ d:\metasploit-framework\bin\msfdb -h
527
+ Exit $LASTEXITCODE
528
+ - shell : pwsh
529
+ run : |
530
+ d:\metasploit-framework\bin\msfbinscan -h
531
+ Exit $LASTEXITCODE
532
+ - shell : pwsh
533
+ run : |
534
+ d:\metasploit-framework\bin\msfrop -h
535
+ Exit $LASTEXITCODE
536
+ - shell : pwsh
537
+ run : |
538
+ d:\metasploit-framework\bin\msfelfscan -h
539
+ Exit $LASTEXITCODE
540
+ - shell : pwsh
541
+ run : |
542
+ d:\metasploit-framework\bin\msfmachscan -h
543
+ Exit $LASTEXITCODE
544
+ - shell : pwsh
545
+ run : |
546
+ d:\metasploit-framework\bin\msfpescan -h
547
+ Exit $LASTEXITCODE
548
+ - shell : pwsh
549
+ run : |
550
+ d:\metasploit-framework\bin\msfconsole -qx 'setg variable test; version; exit'
551
+ Exit $LASTEXITCODE
0 commit comments