nixpkgs/pkgs/tools/networking/burpsuite/default.nix

80 lines
2.3 KiB
Nix

{ lib, fetchurl, jdk, buildFHSEnv, unzip, makeDesktopItem }:
let
version = "2023.2.4";
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"
];
sha256 = "4e9cd298a03af8684306ca2dfe52e630f032c1df7ca8baecbd329c792137052f";
};
name = "burpsuite-${version}";
description = "An integrated platform for performing security testing of web applications";
desktopItem = makeDesktopItem rec {
name = "burpsuite";
exec = name;
icon = name;
desktopName = "Burp Suite Community Edition";
comment = description;
categories = [ "Development" "Security" "System" ];
};
in
buildFHSEnv {
inherit name;
runScript = "${jdk}/bin/java -jar ${src}";
targetPkgs = pkgs: with pkgs; [
alsa-lib
at-spi2-core
cairo
cups
dbus
expat
glib
gtk3
libdrm
libudev0-shim
libxkbcommon
mesa.drivers
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
];
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"
cp -r ${desktopItem}/share/applications $out/share
'';
meta = with lib; {
inherit description;
longDescription = ''
Burp Suite is an integrated platform for performing security testing of web applications.
Its various tools work seamlessly together to support the entire testing process, from
initial mapping and analysis of an application's attack surface, through to finding and
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 ];
};
}