Skip to content

Commit

Permalink
Merge pull request #251397 from Arcayr/burpsuite
Browse files Browse the repository at this point in the history
burpsuite: 2023.7.2 -> 2023.10.2.4, add Professional Edition
  • Loading branch information
emilytrau authored Nov 9, 2023
2 parents da8c623 + 6ce7f67 commit 9e02b14
Showing 1 changed file with 24 additions and 15 deletions.
39 changes: 24 additions & 15 deletions pkgs/tools/networking/burpsuite/default.nix
Original file line number Diff line number Diff line change
@@ -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}";

Expand Down Expand Up @@ -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
'';

Expand All @@ -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 ];
};
}

0 comments on commit 9e02b14

Please sign in to comment.