forked from xiv3r/Burpsuite-Professional
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
117 lines (104 loc) · 3.34 KB
/
default.nix
File metadata and controls
117 lines (104 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
lib,
pkgs,
buildFHSEnv,
fetchurl,
jdk,
makeDesktopItem,
unzip,
}: let
version = "2025.1.1";
productName = "pro";
productDesktop = "BurpSuite Professional";
burpHash = "sha256-17COQ9deYkzmaXBbg1arD3BQY7l3WZ9FakLXzTxgmr8=";
burpSrc = fetchurl {
name = "burpsuite.jar";
urls = [
"https://portswigger.net/burp/releases/download?product=${productName}&version=${version}&type=Jar"
"https://web.archive.org/web/https://portswigger.net/burp/releases/download?product=${productName}&version=${version}&type=Jar"
];
hash = burpHash;
};
loaderSrc = ./.;
pname = "burpsuitepro";
description = "An integrated platform for performing security testing of web applications";
desktopItem = makeDesktopItem {
name = "burpsuitepro";
exec = pname;
icon = pname;
desktopName = productDesktop;
comment = description;
categories = [
"Development"
"Security"
"System"
];
};
in
buildFHSEnv {
inherit pname version;
runScript = "${jdk}/bin/java --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED --add-opens=java.base/jdk.internal.org.objectweb.asm.Opcodes=ALL-UNNAMED -javaagent:${loaderSrc}/loader.jar -noverify -jar ${burpSrc} &";
targetPkgs = pkgs:
with pkgs; [
alsa-lib
at-spi2-core
cairo
cups
dbus
expat
glib
gtk3
gtk3-x11
jython
libcanberra-gtk3
libdrm
udev
libxkbcommon
libgbm
nspr
nss
pango
libx11
libxcb
libxcomposite
libxdamage
libxext
libxfixes
libxrandr
];
extraInstallCommands = ''
mkdir -p $out/share/pixmaps
mkdir -p $out/share
${lib.getBin unzip}/bin/unzip -p ${burpSrc} resources/Media/icon64${productName}.png > $out/share/pixmaps/burpsuitepro.png
cp ${burpSrc} $out/share/burpsuite_pro_v${version}.jar
cp ${loaderSrc}/loader.jar $out/share/loader.jar
# Create loader executable
mkdir -p $out/bin
echo "#!${pkgs.bash}/bin/bash" > $out/bin/loader
echo "\"${jdk}/bin/java\" -jar \"$out/share/loader.jar\" \"\$@\"" >> $out/bin/loader
chmod +x $out/bin/loader
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://github.com/sammhansen/Burpsuite-Professional.git";
changelog =
"https://portswigger.net/burp/releases/professional-community-"
+ replaceStrings ["."] ["-"] version;
sourceProvenance = with sourceTypes; [binaryBytecode];
license = licenses.unfree;
platforms = jdk.meta.platforms;
hydraPlatforms = [];
maintainers = with maintainers; [
bennofs
fab
];
mainProgram = "burpsuite";
};
}