depot/third_party/nixpkgs/pkgs/tools/security/responder/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

55 lines
1.6 KiB
Nix

{ lib
, fetchFromGitHub
, makeWrapper
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "responder";
version = "3.1.4.0";
format = "other";
src = fetchFromGitHub {
owner = "lgandx";
repo = "Responder";
rev = "refs/tags/v${version}";
hash = "sha256-BVSA/ZhpGz6UGyDRJUc4nlRJZ1/Y7er1vVOI+IbIqGk=";
};
nativeBuildInputs = [
makeWrapper
];
propagatedBuildInputs = with python3.pkgs; [
netifaces
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share $out/share/Responder
cp -R . $out/share/Responder
makeWrapper ${python3.interpreter} $out/bin/responder \
--set PYTHONPATH "$PYTHONPATH:$out/bin/Responder.py" \
--add-flags "$out/share/Responder/Responder.py" \
--run "mkdir -p /tmp/Responder"
substituteInPlace $out/share/Responder/Responder.conf \
--replace "Responder-Session.log" "/tmp/Responder/Responder-Session.log" \
--replace "Poisoners-Session.log" "/tmp/Responder/Poisoners-Session.log" \
--replace "Analyzer-Session.log" "/tmp/Responder/Analyzer-Session" \
--replace "Config-Responder.log" "/tmp/Responder/Config-Responder.log" \
--replace "Responder.db" "/tmp/Responder/Responder.db"
runHook postInstall
'';
meta = with lib; {
description = "LLMNR, NBT-NS and MDNS poisoner, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server";
homepage = "https://github.com/lgandx/Responder";
changelog = "https://github.com/lgandx/Responder/blob/master/CHANGELOG.md";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fab ];
};
}