pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / tools / security / responder / default.nix
blob9c6b343eb5c1af0f94f2f193d82b9b7d38804a4a
1 { lib
2 , fetchFromGitHub
3 , makeWrapper
4 , python3
5 }:
7 python3.pkgs.buildPythonApplication rec {
8   pname = "responder";
9   version = "3.1.4.0";
10   format = "other";
12   src = fetchFromGitHub {
13     owner = "lgandx";
14     repo = "Responder";
15     rev = "refs/tags/v${version}";
16     hash = "sha256-BVSA/ZhpGz6UGyDRJUc4nlRJZ1/Y7er1vVOI+IbIqGk=";
17   };
19   nativeBuildInputs = [
20     makeWrapper
21   ];
23   propagatedBuildInputs = with python3.pkgs; [
24     netifaces
25   ];
27   installPhase = ''
28     runHook preInstall
30     mkdir -p $out/bin $out/share $out/share/Responder
31     cp -R . $out/share/Responder
33     makeWrapper ${python3.interpreter} $out/bin/responder \
34       --set PYTHONPATH "$PYTHONPATH:$out/bin/Responder.py" \
35       --add-flags "$out/share/Responder/Responder.py" \
36       --run "mkdir -p /tmp/Responder"
38     substituteInPlace $out/share/Responder/Responder.conf \
39       --replace "Responder-Session.log" "/tmp/Responder/Responder-Session.log" \
40       --replace "Poisoners-Session.log" "/tmp/Responder/Poisoners-Session.log" \
41       --replace "Analyzer-Session.log" "/tmp/Responder/Analyzer-Session" \
42       --replace "Config-Responder.log" "/tmp/Responder/Config-Responder.log" \
43       --replace "Responder.db" "/tmp/Responder/Responder.db"
45     runHook postInstall
46   '';
48   meta = with lib; {
49     description = "LLMNR, NBT-NS and MDNS poisoner, with built-in HTTP/SMB/MSSQL/FTP/LDAP rogue authentication server";
50     mainProgram = "responder";
51     homepage = "https://github.com/lgandx/Responder";
52     changelog = "https://github.com/lgandx/Responder/blob/master/CHANGELOG.md";
53     license = licenses.gpl3Only;
54     maintainers = with maintainers; [ fab ];
55   };