burpsuite: add updateScript, burpsuite: 2025.4.2 -> 2025.5.1 (#412127)
This commit is contained in:
@@ -9,20 +9,20 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2025.4.2";
|
||||
version = "2025.5.1";
|
||||
|
||||
product =
|
||||
if proEdition then
|
||||
{
|
||||
productName = "pro";
|
||||
productDesktop = "Burp Suite Professional Edition";
|
||||
hash = "sha256-wtCZ3/7JvygSCka4i3Il2ajpSuuTPTwHeVJa4gGFDPw=";
|
||||
hash = "sha256-1AXAVXselQKqKsjTRJVN3rBQpSReTH3d0ulIahp9QCc=";
|
||||
}
|
||||
else
|
||||
{
|
||||
productName = "community";
|
||||
productDesktop = "Burp Suite Community Edition";
|
||||
hash = "sha256-+1aTq7XKacsi/gzUpeZvSuwpKPDMo6H3C81pxWCC4w8=";
|
||||
hash = "sha256-zX5QJz996WgKvDA6p5dRtmbZTRsgCl0URn302MkhVew=";
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
@@ -91,6 +91,8 @@ buildFHSEnv {
|
||||
cp -r ${desktopItem}/share/applications $out/share
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
inherit description;
|
||||
longDescription = ''
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq xxd gnused diffutils
|
||||
set -eu -o pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
||||
|
||||
curl -s 'https://portswigger.net/burp/releases/data' |
|
||||
jq -r '
|
||||
[[
|
||||
.ResultSet.Results[]
|
||||
| select(
|
||||
(.categories | sort) == (["Professional","Community"] | sort)
|
||||
and .releaseChannels == ["Early Adopter"]
|
||||
)
|
||||
][0].builds[]
|
||||
| select(.ProductPlatform == "Jar")
|
||||
]' >latest.json
|
||||
|
||||
version=$(jq -r '.[0].Version' latest.json)
|
||||
|
||||
comm_hex=$(jq -r '.[] | select(.ProductId=="community") .Sha256Checksum' latest.json)
|
||||
pro_hex=$(jq -r '.[] | select(.ProductId=="pro") .Sha256Checksum' latest.json)
|
||||
|
||||
comm_sri="sha256-$(printf %s "$comm_hex" | xxd -r -p | base64 -w0)"
|
||||
pro_sri="sha256-$(printf %s "$pro_hex" | xxd -r -p | base64 -w0)"
|
||||
|
||||
sed -i \
|
||||
-e "s|^\(\s*version = \)\"[^\"]*\";|\1\"$version\";|" \
|
||||
-e "/productName = \"community\"/,/hash =/ {
|
||||
s|sha256-[^\"]*|$comm_sri|
|
||||
}" \
|
||||
-e "/productName = \"pro\"/,/hash =/ {
|
||||
s|sha256-[^\"]*|$pro_sri|
|
||||
}" \
|
||||
$SCRIPT_DIR/package.nix
|
||||
|
||||
echo "burpsuite → $version"
|
||||
echo " community: $comm_sri"
|
||||
echo " pro : $pro_sri"
|
||||
Reference in New Issue
Block a user