13 name = "metasploit-bundler-env";
16 in stdenv.mkDerivation rec {
17 pname = "metasploit-framework";
20 src = fetchFromGitHub {
22 repo = "metasploit-framework";
24 sha256 = "sha256-lrooEMmSu7pgG3Nm35G385ipdc4WdlM696Dd5KdwVJ0=";
27 nativeBuildInputs = [ makeWrapper ];
28 buildInputs = [ (python3.withPackages (ps: [ ps.requests ])) ];
30 dontPatchELF = true; # stay away from exploit executables
33 mkdir -p $out/{bin,share/msf}
35 cp -r * $out/share/msf
37 grep -rl "^#\!.*python2$" $out/share/msf | xargs -d '\n' rm
42 makeWrapper ${env}/bin/bundle $out/bin/$i \
43 --add-flags "exec ${ruby}/bin/ruby $out/share/msf/$i"
47 makeWrapper ${env}/bin/bundle $out/bin/msf-pattern_create \
48 --add-flags "exec ${ruby}/bin/ruby $out/share/msf/tools/exploit/pattern_create.rb"
50 makeWrapper ${env}/bin/bundle $out/bin/msf-pattern_offset \
51 --add-flags "exec ${ruby}/bin/ruby $out/share/msf/tools/exploit/pattern_offset.rb"
54 # run with: nix-shell maintainers/scripts/update.nix --argstr path metasploit
55 passthru.updateScript = ./update.sh;
58 description = "Metasploit Framework - a collection of exploits";
59 homepage = "https://docs.metasploit.com/";
60 platforms = platforms.unix;
61 license = licenses.bsd3;
62 maintainers = with maintainers; [ fab makefu ];
63 mainProgram = "msfconsole";