Skip to content

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Jun 23, 2023
1 parent 039bbdc commit 19a8df6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
28 changes: 14 additions & 14 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ New-Item -ItemType Directory -Path plugins\goversion -Force
New-Item -ItemType Directory -Path plugins\cargo-auditable -Force
New-Item -ItemType Directory -Path plugins\osquery -Force

Invoke-WebRequest -Uri https://github.com/upx/upx/releases/download/v4.0.0/upx-4.0.0-win64.zip -UseBasicParsing -OutFile upx-4.0.0-win64.zip
Expand-Archive -Path upx-4.0.0-win64.zip -DestinationPath . -Force
Invoke-WebRequest -Uri https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-win64.zip -UseBasicParsing -OutFile upx-4.0.2-win64.zip
Expand-Archive -Path upx-4.0.2-win64.zip -DestinationPath . -Force

Invoke-WebRequest -Uri https://github.com/osquery/osquery/releases/download/5.6.0/osquery-5.6.0.windows_x86_64.zip -UseBasicParsing -OutFile osquery-5.6.0.windows_x86_64.zip
Expand-Archive -Path osquery-5.6.0.windows_x86_64.zip -DestinationPath . -Force
copy "osquery-5.6.0.windows_x86_64\Program Files\osquery\osqueryi.exe" plugins\osquery\osqueryi-windows-amd64.exe
upx-4.0.0-win64\upx.exe -1 plugins\osquery\osqueryi-windows-amd64.exe
Invoke-WebRequest -Uri https://github.com/osquery/osquery/releases/download/5.8.2/osquery-5.8.2.windows_x86_64.zip -UseBasicParsing -OutFile osquery-5.8.2.windows_x86_64.zip
Expand-Archive -Path osquery-5.8.2.windows_x86_64.zip -DestinationPath . -Force
copy "osquery-5.8.2.windows_x86_64\Program Files\osquery\osqueryi.exe" plugins\osquery\osqueryi-windows-amd64.exe
upx-4.0.2-win64\upx.exe -1 plugins\osquery\osqueryi-windows-amd64.exe

set CGO_ENABLED=0
set GOOS=windows
set GOARCH=amd64
New-Item -ItemType Directory -Path plugins\goversion -Force
cd thirdparty\goversion
go build -ldflags "-s -w" -o build\goversion-windows-amd64.exe
..\..\upx-4.0.0-win64\upx.exe -1 build\goversion-windows-amd64.exe
go build -ldflags "-H=windowsgui -s -w" -o build\goversion-windows-amd64.exe
..\..\upx-4.0.2-win64\upx.exe -1 build\goversion-windows-amd64.exe
copy build\* ..\..\plugins\goversion\
Remove-Item build -Recurse -Force
cd ..\..

New-Item -ItemType Directory -Path plugins\cargo-auditable -Force
cd thirdparty\cargo-auditable
go build -ldflags "-s -w" -o build\cargo-auditable-windows-amd64.exe
..\..\upx-4.0.0-win64\upx.exe -1 build\cargo-auditable-windows-amd64.exe
go build -ldflags "-H=windowsgui -s -w" -o build\cargo-auditable-windows-amd64.exe
..\..\upx-4.0.2-win64\upx.exe -1 build\cargo-auditable-windows-amd64.exe
copy build\* ..\..\plugins\cargo-auditable\
Remove-Item build -Recurse -Force
cd ..\..

Remove-Item osquery-5.6.0.windows_x86_64 -Recurse -Force
Remove-Item osquery-5.6.0.windows_x86_64.zip -Recurse -Force
Remove-Item upx-4.0.0-win64 -Recurse -Force
Remove-Item upx-4.0.0-win64.zip -Recurse -Force
Remove-Item osquery-5.8.2.windows_x86_64 -Recurse -Force
Remove-Item osquery-5.8.2.windows_x86_64.zip -Recurse -Force
Remove-Item upx-4.0.2-win64 -Recurse -Force
Remove-Item upx-4.0.2-win64.zip -Recurse -Force
16 changes: 8 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ rm -rf plugins/cargo-auditable
rm -rf plugins/osquery
mkdir -p plugins/osquery

wget https://github.com/osquery/osquery/releases/download/5.7.0/osquery-5.7.0.windows_x86_64.zip
unzip osquery-5.7.0.windows_x86_64.zip
cp "osquery-5.7.0.windows_x86_64/Program Files/osquery/osqueryi.exe" plugins/osquery/osqueryi-windows-amd64.exe
wget https://github.com/osquery/osquery/releases/download/5.8.2/osquery-5.8.2.windows_x86_64.zip
unzip osquery-5.8.2.windows_x86_64.zip
cp "osquery-5.8.2.windows_x86_64/Program Files/osquery/osqueryi.exe" plugins/osquery/osqueryi-windows-amd64.exe
upx -1 plugins/osquery/osqueryi-windows-amd64.exe
sha256sum plugins/osquery/osqueryi-windows-amd64.exe > plugins/osquery/osqueryi-windows-amd64.exe.sha256
rm -rf osquery-5.7.0.windows_x86_64
rm osquery-5.7.0.windows_x86_64.zip
rm -rf osquery-5.8.2.windows_x86_64
rm osquery-5.8.2.windows_x86_64.zip

wget https://github.com/osquery/osquery/releases/download/5.7.0/osquery-5.7.0_1.linux_x86_64.tar.gz
tar -xvf osquery-5.7.0_1.linux_x86_64.tar.gz
wget https://github.com/osquery/osquery/releases/download/5.8.2/osquery-5.8.2_1.linux_x86_64.tar.gz
tar -xvf osquery-5.8.2_1.linux_x86_64.tar.gz
cp opt/osquery/bin/osqueryd plugins/osquery/osqueryi-linux-amd64
upx -1 plugins/osquery/osqueryi-linux-amd64
sha256sum plugins/osquery/osqueryi-linux-amd64 > plugins/osquery/osqueryi-linux-amd64.sha256
rm -rf etc usr var opt
rm osquery-5.7.0_1.linux_x86_64.tar.gz
rm osquery-5.8.2_1.linux_x86_64.tar.gz

for plug in goversion trivy cargo-auditable
do
Expand Down

0 comments on commit 19a8df6

Please sign in to comment.