@@ -370,7 +370,7 @@ jobs:
370
370
ruby :
371
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
@@ -451,41 +451,6 @@ jobs:
451
451
rem and the ridk.cmd Ruby installer will forcibly kill the msys2 process before attempting to install ruby
452
452
ruby bin/omnibus build metasploit-framework
453
453
454
- # Currently hangs on Github actions - but passes locally, potential cause within the debug.log file:
455
- #
456
- # Info 1603.The file C:\Windows\system32\vcruntime140_1.dll is being held in use. Close that application and retry.
457
- #
458
- # - name: Test artifact
459
- # shell: pwsh
460
- # run: |
461
- # Set-PSDebug -Trace 1
462
- # echo "Testing artifact"
463
-
464
- # Remove-Item c:\metasploit-framework -Recurse -ErrorAction Ignore
465
-
466
- # dir metasploit-omnibus\pkg
467
-
468
- # echo '' > debug.log
469
- # $artifact = (Get-ChildItem -Path "metasploit-omnibus/pkg/*.msi")[0].Name
470
- # $install_process = Start-Process msiexec.exe -ArgumentList "/i metasploit-omnibus\pkg\$artifact /quiet /qn /l*v debug.log" -NoNewWindow -PassThru
471
- # $log_process = Start-Process "powershell" "Get-Content -Path debug.log -Wait" -NoNewWindow -PassThru
472
- # $install_process.WaitForExit()
473
- # $log_process.Kill()
474
- # echo "finished install"
475
-
476
- # c:\metasploit-framework\bin\msfconsole -qx 'setg variable test; version; exit'
477
- # c:\metasploit-framework\bin\msfvenom -p windows/meterpreter/reverse_tcp -f exe -o test.exe
478
- # c:\metasploit-framework\bin\msfd -h
479
- # c:\metasploit-framework\bin\msfrpc -h
480
- # c:\metasploit-framework\bin\msfrpcd -h
481
- # c:\metasploit-framework\bin\msfdb -h
482
- # c:\metasploit-framework\bin\msfbinscan -h
483
- # c:\metasploit-framework\bin\msfrop -h
484
- # c:\metasploit-framework\bin\msfelfscan -h
485
- # c:\metasploit-framework\bin\msfmachscan -h
486
- # c:\metasploit-framework\bin\msfpescan -h
487
- # c:\metasploit-framework\bin\msfupdate
488
-
489
454
- name : Upload artifact
490
455
uses : actions/upload-artifact@v4
491
456
with :
@@ -496,3 +461,95 @@ jobs:
496
461
metasploit-omnibus/pkg/*.msi
497
462
metasploit-omnibus/pkg/*.deb
498
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\msfvenom -p windows/meterpreter/invalid -f exe -o test.exe
515
+ Exit $LASTEXITCODE
516
+ - shell : pwsh
517
+ run : |
518
+ d:\metasploit-framework\bin\msfd -h
519
+ Exit $LASTEXITCODE
520
+ - shell : pwsh
521
+ run : |
522
+ d:\metasploit-framework\bin\msfrpc -h
523
+ Exit $LASTEXITCODE
524
+ - shell : pwsh
525
+ run : |
526
+ d:\metasploit-framework\bin\msfrpcd -h
527
+ Exit $LASTEXITCODE
528
+ - shell : pwsh
529
+ run : |
530
+ d:\metasploit-framework\bin\msfdb -h
531
+ Exit $LASTEXITCODE
532
+ - shell : pwsh
533
+ run : |
534
+ d:\metasploit-framework\bin\msfbinscan -h
535
+ Exit $LASTEXITCODE
536
+ - shell : pwsh
537
+ run : |
538
+ d:\metasploit-framework\bin\msfrop -h
539
+ Exit $LASTEXITCODE
540
+ - shell : pwsh
541
+ run : |
542
+ d:\metasploit-framework\bin\msfelfscan -h
543
+ Exit $LASTEXITCODE
544
+ - shell : pwsh
545
+ run : |
546
+ d:\metasploit-framework\bin\msfmachscan -h
547
+ Exit $LASTEXITCODE
548
+ - shell : pwsh
549
+ run : |
550
+ d:\metasploit-framework\bin\msfpescan -h
551
+ Exit $LASTEXITCODE
552
+ - shell : pwsh
553
+ run : |
554
+ d:\metasploit-framework\bin\msfconsole -qx 'setg variable test; version; exit'
555
+ Exit $LASTEXITCODE
0 commit comments