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)"
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
curl -s 'https://portswigger.net/burp/releases/data' | jq -r '
def verarr: (.Version // "") | split(".") | map(tonumber? // 0);
[ .ResultSet.Results[]
| select((.categories|sort) == (["Professional","Community"]|sort))
| .builds[]
| select(.ProductPlatform == "Jar")
] as $all
| ($all | max_by( (.Version // "") | split(".") | map(tonumber? // 0) ) | .Version) as $v
| $all | map(select(.Version == $v))
' > latest.json
version=$(jq -r '.[0].Version' latest.json)