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
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 {
name = "burpsuite.jar";
urls = [
"https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar"
"https://web.archive.org/web/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://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";
desktopItem = makeDesktopItem rec {
desktopItem = makeDesktopItem {
name = "burpsuite";
exec = name;
icon = name;
desktopName = "Burp Suite Community Edition";
exec = pname;
icon = pname;
desktopName = product.productDesktop;
comment = description;
categories = [ "Development" "Security" "System" ];
};
in
buildFHSEnv {
inherit name;
inherit pname version;
runScript = "${jdk}/bin/java -jar ${src}";
@ -54,9 +65,8 @@ buildFHSEnv {
];
extraInstallCommands = ''
mv "$out/bin/${name}" "$out/bin/burpsuite" # name includes the version number
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
'';
@ -69,11 +79,10 @@ buildFHSEnv {
exploiting security vulnerabilities.
'';
homepage = "https://portswigger.net/burp/";
downloadPage = "https://portswigger.net/burp/freedownload";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.unfree;
platforms = jdk.meta.platforms;
hydraPlatforms = [ ];
maintainers = with maintainers; [ bennofs ];
maintainers = with maintainers; [ arcayr bennofs ];
};
}