burpsuite: fix update script to avoid downgrades

This commit is contained in:
Yechiel Worenklein
2025-11-05 11:46:06 +02:00
parent 4db0f10017
commit eaf47e2fec

View File

@@ -4,17 +4,16 @@ set -eu -o pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
curl -s 'https://portswigger.net/burp/releases/data' | curl -s 'https://portswigger.net/burp/releases/data' | jq -r '
jq -r ' def verarr: (.Version // "") | split(".") | map(tonumber? // 0);
[[ [ .ResultSet.Results[]
.ResultSet.Results[] | select((.categories|sort) == (["Professional","Community"]|sort))
| select( | .builds[]
(.categories | sort) == (["Professional","Community"] | sort) | select(.ProductPlatform == "Jar")
and .releaseChannels == ["Early Adopter"] ] as $all
) | ($all | max_by( (.Version // "") | split(".") | map(tonumber? // 0) ) | .Version) as $v
][0].builds[] | $all | map(select(.Version == $v))
| select(.ProductPlatform == "Jar") ' > latest.json
]' >latest.json
version=$(jq -r '.[0].Version' latest.json) version=$(jq -r '.[0].Version' latest.json)