1{ 2 lib, 3 asn1crypto, 4 buildPythonPackage, 5 certipy, 6 cryptography, 7 dnspython, 8 fetchFromGitHub, 9 hatchling, 10 minikerberos-bad, 11 msldap-bad, 12 pyasn1, 13 pytestCheckHook, 14 pythonOlder, 15 winacl, 16}: 17 18buildPythonPackage rec { 19 pname = "bloodyad"; 20 version = "2.1.21"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 owner = "CravateRouge"; 27 repo = "bloodyAD"; 28 tag = "v${version}"; 29 hash = "sha256-9yzKYSEmaPMv6AWhgr4UPPEx8s75Pg/hwqJnV29WocM="; 30 }; 31 32 pythonRelaxDeps = [ "cryptography" ]; 33 34 pythonRemoveDeps = [ 35 "minikerberos-bad" 36 "msldap-bad" 37 ]; 38 39 build-system = [ hatchling ]; 40 41 dependencies = [ 42 asn1crypto 43 cryptography 44 dnspython 45 minikerberos-bad 46 msldap-bad 47 winacl 48 ]; 49 50 nativeCheckInputs = [ 51 certipy 52 pytestCheckHook 53 ]; 54 55 pythonImportsCheck = [ "bloodyAD" ]; 56 57 disabledTests = [ 58 # Tests require network access 59 "test_kerberos_authentications" 60 "test_01AuthCreateUser" 61 "test_02SearchAndGetChildAndGetWritable" 62 "test_03UacOwnerGenericShadowGroupPasswordDCSync" 63 "test_04ComputerRbcdGetSetAttribute" 64 "test_06AddRemoveGetDnsRecord" 65 "test_certificate_authentications" 66 ]; 67 68 meta = with lib; { 69 description = "Module for Active Directory Privilege Escalations"; 70 homepage = "https://github.com/CravateRouge/bloodyAD"; 71 changelog = "https://github.com/CravateRouge/bloodyAD/releases/tag/${src.tag}"; 72 license = licenses.mit; 73 maintainers = with maintainers; [ fab ]; 74 }; 75}