Merge pull request #251397 from Arcayr/burpsuite

burpsuite: 2023.7.2 -> 2023.10.2.4, add Professional Edition

authored by Emily Trau and committed by GitHub 9e02b145 da8c6236

+24 -15
+24 -15
pkgs/tools/networking/burpsuite/default.nix
··· 1 - { lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem }: 1 + { lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem, proEdition ? false }: 2 2 let 3 - version = "2023.7.2"; 3 + version = "2023.10.2.4"; 4 + 5 + product = if proEdition then { 6 + productName = "pro"; 7 + productDesktop = "Burp Suite Professional Edition"; 8 + hash = "sha256-H5/nxVvAoGzRIAOchv9tAYyFgrodh7XugCTn2oUV9Tw="; 9 + } else { 10 + productName = "community"; 11 + productDesktop = "Burp Suite Community Edition"; 12 + hash = "sha256-en+eay+XL09Vk6H011fYvxGluMAndedtqCo4dQZvbBM="; 13 + }; 4 14 5 15 src = fetchurl { 6 16 name = "burpsuite.jar"; 7 17 urls = [ 8 - "https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" 9 - "https://web.archive.org/web/https://portswigger.net/burp/releases/download?productId=100&version=${version}&type=Jar" 18 + "https://portswigger-cdn.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar" 19 + "https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar" 20 + "https://web.archive.org/web/https://portswigger.net/burp/releases/download?product=${product.productName}&version=${version}&type=Jar" 10 21 ]; 11 - hash = "sha256-mpOG8sx+L+/kwgB3X9ALOvq+Rx1GC3JE2G7yVt1iQYg="; 22 + hash = product.hash; 12 23 }; 13 24 14 - name = "burpsuite-${version}"; 25 + pname = "burpsuite"; 15 26 description = "An integrated platform for performing security testing of web applications"; 16 - desktopItem = makeDesktopItem rec { 27 + desktopItem = makeDesktopItem { 17 28 name = "burpsuite"; 18 - exec = name; 19 - icon = name; 20 - desktopName = "Burp Suite Community Edition"; 29 + exec = pname; 30 + icon = pname; 31 + desktopName = product.productDesktop; 21 32 comment = description; 22 33 categories = [ "Development" "Security" "System" ]; 23 34 }; 24 35 25 36 in 26 37 buildFHSEnv { 27 - inherit name; 38 + inherit pname version; 28 39 29 40 runScript = "${jdk}/bin/java -jar ${src}"; 30 41 ··· 54 65 ]; 55 66 56 67 extraInstallCommands = '' 57 - mv "$out/bin/${name}" "$out/bin/burpsuite" # name includes the version number 58 68 mkdir -p "$out/share/pixmaps" 59 - ${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64community.png > "$out/share/pixmaps/burpsuite.png" 69 + ${lib.getBin unzip}/bin/unzip -p ${src} resources/Media/icon64${product.productName}.png > "$out/share/pixmaps/burpsuite.png" 60 70 cp -r ${desktopItem}/share/applications $out/share 61 71 ''; 62 72 ··· 69 79 exploiting security vulnerabilities. 70 80 ''; 71 81 homepage = "https://portswigger.net/burp/"; 72 - downloadPage = "https://portswigger.net/burp/freedownload"; 73 82 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 74 83 license = licenses.unfree; 75 84 platforms = jdk.meta.platforms; 76 85 hydraPlatforms = [ ]; 77 - maintainers = with maintainers; [ bennofs ]; 86 + maintainers = with maintainers; [ arcayr bennofs ]; 78 87 }; 79 88 }