2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2023-07-15 17:15:38 +00:00
|
|
|
, asn1crypto
|
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, dnspython
|
|
|
|
, dsinternals
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2023-07-15 17:15:38 +00:00
|
|
|
, impacket
|
|
|
|
, ldap3
|
|
|
|
, pyasn1
|
|
|
|
, pycryptodome
|
|
|
|
, pyopenssl
|
|
|
|
, pythonOlder
|
|
|
|
, requests
|
|
|
|
, requests_ntlm
|
|
|
|
, unicrypto
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "certipy-ad";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "4.8.2";
|
2023-02-09 11:40:11 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ly4k";
|
|
|
|
repo = "Certipy";
|
2023-02-09 11:40:11 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-Era5iNLJkZIRvN/p3BiD/eDiDQme24G65VSG97tuEOQ=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
|
|
|
# pin does not apply because our ldap3 contains a patch to fix pyasn1 compability
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pyasn1==0.4.8" "pyasn1"
|
|
|
|
'';
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
asn1crypto
|
2023-07-15 17:15:38 +00:00
|
|
|
cryptography
|
2022-02-21 08:47:16 +00:00
|
|
|
dnspython
|
|
|
|
dsinternals
|
2021-12-06 16:07:01 +00:00
|
|
|
impacket
|
|
|
|
ldap3
|
|
|
|
pyasn1
|
2022-02-21 08:47:16 +00:00
|
|
|
pycryptodome
|
2023-07-15 17:15:38 +00:00
|
|
|
pyopenssl
|
|
|
|
requests
|
2023-02-09 11:40:11 +00:00
|
|
|
requests_ntlm
|
2023-07-15 17:15:38 +00:00
|
|
|
unicrypto
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Project has no tests
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"certipy"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
description = "Library and CLI tool to enumerate and abuse misconfigurations in Active Directory Certificate Services";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/ly4k/Certipy";
|
2023-02-09 11:40:11 +00:00
|
|
|
changelog = "https://github.com/ly4k/Certipy/releases/tag/${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|