summary refs log tree commit diff
path: root/pkgs/tools/security/dnsrecon/default.nix
blob: 6fa2041de3c0fcac9c792c64d2a2afb06c6f03dc (plain) (blame)
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
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "dnsrecon";
  version = "0.10.1";

  src = fetchFromGitHub {
    owner = "darkoperator";
    repo = pname;
    rev = version;
    sha256 = "1ysf8wx287psfk89r0i2vgnrjvxdj44s6nhf6sva59jbwvr9lghy";
  };

  format = "other";

  pythonPath = with python3.pkgs; [
    dnspython netaddr lxml
  ];

  postPatch = ''
    substituteInPlace dnsrecon.py \
      --replace "namelist.txt" "../share/namelist.txt"
  '';

  installPhase = ''
    runHook preInstall

    install -vD dnsrecon.py $out/bin/dnsrecon
    install -vD namelist.txt subdomains-*.txt -t $out/share
    install -vd $out/${python3.sitePackages}/
    cp -R lib tools msf_plugin $out/${python3.sitePackages}

    runHook postInstall
  '';

  meta = with lib; {
    description = "DNS Enumeration Script";
    homepage = "https://github.com/darkoperator/dnsrecon";
    license = licenses.gpl2Only;
    platforms = platforms.all;
    maintainers = with maintainers; [ c0bw3b fab ];
  };
}