about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/adenum/default.nix
blob: d547bd5c9ebcf18a9d1af0818dac5b389864a898 (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
47
48
{ lib
, fetchFromGitHub
, john
, python3
}:

python3.pkgs.buildPythonApplication {
  pname = "adenum";
  version = "unstable-2022-04-01";
  format = "other";

  src = fetchFromGitHub {
    owner = "SecuProject";
    repo = "ADenum";
    rev = "0e3576eca1d987d3ef22d53fc725189bb301e804";
    hash = "sha256-8s4Kmt4ZjYbQGGVDWKfuRZ6kthcL8FiQytoq9Koy7Kc=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    impacket
    pwntools
    python-ldap
  ] ++ [
    john
  ];

  installPhase = ''
    runHook preInstall

    # Add shebang so we can patch it
    sed -i -e '1i#!/usr/bin/python' ADenum.py
    patchShebangs ADenum.py
    install -vD ADenum.py $out/bin/adenum

    runHook postInstall
  '';

  # Project has no tests
  doCheck = false;

  meta = with lib; {
    description = "Tool to find misconfiguration through LDAP";
    mainProgram = "adenum";
    homepage = "https://github.com/SecuProject/ADenum";
    license = with licenses; [ gpl3Only ];
    maintainers = with maintainers; [ fab ];
  };
}