Merge pull request #251397 from Arcayr/burpsuite

burpsuite: 2023.7.2 -> 2023.10.2.4, add Professional Edition
This commit is contained in:
Emily Trau 2023-11-09 20:52:33 +11:00 committed by GitHub
commit 9e02b14578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,30 +1,41 @@
{ lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem }: { lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem, proEdition ? false }:
let let
version = "2023.7.2"; version = "2023.10.2.4";
product = if proEdition then {
productName = "pro";
productDesktop = "Burp Suite Professional Edition";
hash = "sha256-H5/nxVvAoGzRIAOchv9tAYyFgrodh7XugCTn2oUV9Tw=";
} else {
productName = "community";
productDesktop = "Burp Suite Community Edition";
hash = "sha256-en+eay+XL09Vk6H011fYvxGluMAndedtqCo4dQZvbBM=";
};
src = fetchurl { src = fetchurl {
name = "burpsuite.jar"; name = "burpsuite.jar";
urls = [ urls = [
"https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" "https://portswigger-cdn.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
"https://web.archive.org/web/https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" "https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
"https://web.archive.org/web/https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar"
]; ];
hash = "sha256-mpOG8sx+L+/kwgB3X9ALOvq+Rx1GC3JE2G7yVt1iQYg="; hash = product.hash;
}; };
name = "burpsuite-${version}"; pname = "burpsuite";
description = "An integrated platform for performing security testing of web applications"; description = "An integrated platform for performing security testing of web applications";
desktopItem = makeDesktopItem rec { desktopItem = makeDesktopItem {
name = "burpsuite"; name = "burpsuite";
exec = name; exec = pname;
icon = name; icon = pname;
desktopName = "Burp Suite Community Edition"; desktopName = product.productDesktop;
comment = description; comment = description;
categories = [ "Development" "Security" "System" ]; categories = [ "Development" "Security" "System" ];
}; };
in in
buildFHSEnv { buildFHSEnv {
inherit name; inherit pname version;
runScript = "${jdk}/bin/java -jar ${src}"; runScript = "${jdk}/bin/java -jar ${src}";
@ -54,9 +65,8 @@ buildFHSEnv {
]; ];
extraInstallCommands = '' extraInstallCommands = ''
mv "$out/bin/${name}" "$out/bin/burpsuite" # name includes the version number
mkdir -p "$out/share/pixmaps" mkdir -p "$out/share/pixmaps"
${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64community.png > "$out/share/pixmaps/burpsuite.png" ${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64${product.productName}.png > "$out/share/pixmaps/burpsuite.png"
cp -r ${desktopItem}/share/applications $out/share cp -r ${desktopItem}/share/applications $out/share
''; '';
@ -69,11 +79,10 @@ buildFHSEnv {
exploiting security vulnerabilities. exploiting security vulnerabilities.
''; '';
homepage = "https://portswigger.net/burp/"; homepage = "https://portswigger.net/burp/";
downloadPage = "https://portswigger.net/burp/freedownload";
sourceProvenance = with sourceTypes; [ binaryBytecode ]; sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.unfree; license = licenses.unfree;
platforms = jdk.meta.platforms; platforms = jdk.meta.platforms;
hydraPlatforms = [ ]; hydraPlatforms = [ ];
maintainers = with maintainers; [ bennofs ]; maintainers = with maintainers; [ arcayr bennofs ];
}; };
} }