-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Update CI for meterpreter vs2022 #20483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update CI for meterpreter vs2022 #20483
Conversation
Do you have any background that you can provide on these changes? I see the |
@zeroSteiner, this change was requested by @AlanFoster, i think (Alan correct me if I am wrong) this is used when we want to test something on |
Tested here: rapid7/metasploit-payloads#766 VS2022 build output:
The logs show that the vs components install successfully:
But, it looks like the build logs are missing - which would be useful for debugging build failures
Based on the last two timestamps it looks like the build took around the time we'd expect it to take, but there's no logs present - it'd be great to fix that 🙌 |
@adfoster-r7 any idea how to include them? |
I think the issue is rooted in the change to Powershell and the invocation through I think for this use case, we'd be better off not invoking processes through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not tested the code suggestions I've made but I think they might address the issue where we don't have the output we're looking for.
$WorkLoads = '--config "D:\a\metasploit-payloads\metasploit-payloads\metasploit-payloads\c\meterpreter\vs-configs\vs2022.vsconfig"' | ||
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache') | ||
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | ||
if ($process.ExitCode -eq 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$WorkLoads = '--config "D:\a\metasploit-payloads\metasploit-payloads\metasploit-payloads\c\meterpreter\vs-configs\vs2022.vsconfig"' | |
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"", $WorkLoads, '--quiet', '--norestart', '--nocache') | |
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden | |
if ($process.ExitCode -eq 0) { | |
cmd.exe /c vs_installer.exe modify --installPath "$InstallPath" --config "D:\a\metasploit-payloads\metasploit-payloads\metasploit-payloads\c\meterpreter\vs-configs\vs2022.vsconfig" --quiet --norestart --nocache' | |
if ($LASTEXITCODE -eq 0) { |
Start-Process -FilePath cmd.exe -ArgumentList ('/c', 'git', 'submodule', 'init', '&&', 'git', 'submodule', 'update') -Wait -PassThru -WindowStyle Hidden | ||
Start-Process -FilePath cmd.exe -ArgumentList ('/c', '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"', '&&', 'make.bat') -Wait -PassThru -WindowStyle Hidden |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start-Process -FilePath cmd.exe -ArgumentList ('/c', 'git', 'submodule', 'init', '&&', 'git', 'submodule', 'update') -Wait -PassThru -WindowStyle Hidden | |
Start-Process -FilePath cmd.exe -ArgumentList ('/c', '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"', '&&', 'make.bat') -Wait -PassThru -WindowStyle Hidden | |
cmd.exe /c git submodule init | |
cmd.exe /c git submodule update | |
cmd.exe /c '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" && make.bat' |
Notice the third one uses single quotes so the path can still be in double while both bat files run in the same cmd instance.
No description provided.