1{ lib
2, asn1crypto
3, buildPythonPackage
4, dnspython
5, dsinternals
6, fetchFromGitHub
7, impacket
8, ldap3
9, pyasn1
10, pycryptodome
11, pyopenssl
12, pythonOlder
13, requests_ntlm
14}:
15
16buildPythonPackage rec {
17 pname = "certipy-ad";
18 version = "4.4.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "ly4k";
25 repo = "Certipy";
26 rev = "refs/tags/${version}";
27 hash = "sha256-llLGr9IpuXQYIN2WaOkvfE2dAZb3PMVlNmketUpuyDI=";
28 };
29
30 postPatch = ''
31 # pin does not apply because our ldap3 contains a patch to fix pyasn1 compability
32 substituteInPlace setup.py \
33 --replace "pyasn1==0.4.8" "pyasn1"
34 '';
35
36 propagatedBuildInputs = [
37 asn1crypto
38 dnspython
39 dsinternals
40 impacket
41 pyopenssl
42 ldap3
43 pyasn1
44 pycryptodome
45 requests_ntlm
46 ];
47
48 # Project has no tests
49 doCheck = false;
50
51 pythonImportsCheck = [
52 "certipy"
53 ];
54
55 meta = with lib; {
56 description = "Library and CLI tool to enumerate and abuse misconfigurations in Active Directory Certificate Services";
57 homepage = "https://github.com/ly4k/Certipy";
58 changelog = "https://github.com/ly4k/Certipy/releases/tag/${version}";
59 license = with licenses; [ mit ];
60 maintainers = with maintainers; [ fab ];
61 };
62}