From f5dc7d877be26678a4cae381f7ba7e496e6d9bdf Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 31 May 2023 08:04:45 +0200 Subject: [PATCH] python311Packages.certipy-ad: make it usable as module --- .../python-modules/certipy-ad}/default.nix | 23 +++++++++++++++---- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 21 insertions(+), 6 deletions(-) rename pkgs/{tools/security/certipy => development/python-modules/certipy-ad}/default.nix (69%) diff --git a/pkgs/tools/security/certipy/default.nix b/pkgs/development/python-modules/certipy-ad/default.nix similarity index 69% rename from pkgs/tools/security/certipy/default.nix rename to pkgs/development/python-modules/certipy-ad/default.nix index f369e97a5640..3f97d996bdfb 100644 --- a/pkgs/tools/security/certipy/default.nix +++ b/pkgs/development/python-modules/certipy-ad/default.nix @@ -1,13 +1,25 @@ { lib +, asn1crypto +, buildPythonPackage +, dnspython +, dsinternals , fetchFromGitHub -, python3 +, impacket +, ldap3 +, pyasn1 +, pycryptodome +, pyopenssl +, pythonOlder +, requests_ntlm }: -python3.pkgs.buildPythonApplication rec { - pname = "certipy"; +buildPythonPackage rec { + pname = "certipy-ad"; version = "4.4.0"; format = "setuptools"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "ly4k"; repo = "Certipy"; @@ -21,11 +33,12 @@ python3.pkgs.buildPythonApplication rec { --replace "pyasn1==0.4.8" "pyasn1" ''; - propagatedBuildInputs = with python3.pkgs; [ + propagatedBuildInputs = [ asn1crypto dnspython dsinternals impacket + pyopenssl ldap3 pyasn1 pycryptodome @@ -40,7 +53,7 @@ python3.pkgs.buildPythonApplication rec { ]; meta = with lib; { - description = "Tool to enumerate and abuse misconfigurations in Active Directory Certificate Services"; + description = "Library and CLI tool to enumerate and abuse misconfigurations in Active Directory Certificate Services"; homepage = "https://github.com/ly4k/Certipy"; changelog = "https://github.com/ly4k/Certipy/releases/tag/${version}"; license = with licenses; [ mit ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b03392cf33e..c5bb96305ad9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3181,7 +3181,7 @@ with pkgs; certigo = callPackage ../tools/admin/certigo { }; - certipy = callPackage ../tools/security/certipy { }; + certipy = with python3Packages; toPythonApplication certipy-ad; catcli = python3Packages.callPackage ../tools/filesystems/catcli { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6d9722e67e3b..e096a5c00393 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1705,6 +1705,8 @@ self: super: with self; { certipy = callPackage ../development/python-modules/certipy { }; + certipy-ad = callPackage ../development/python-modules/certipy-ad { }; + certomancer = callPackage ../development/python-modules/certomancer { }; certvalidator = callPackage ../development/python-modules/certvalidator { };