From c964bed62f5975790025ccdb3fe6b0f06faefcde Mon Sep 17 00:00:00 2001 From: purpole <101905225+purpole@users.noreply.github.com> Date: Sat, 2 Nov 2024 14:14:03 +0100 Subject: [PATCH 1/4] sccmhunter: Init at 1.0.6-unstable-2024-10-30 --- pkgs/by-name/sc/sccmhunter/package.nix | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/sc/sccmhunter/package.nix diff --git a/pkgs/by-name/sc/sccmhunter/package.nix b/pkgs/by-name/sc/sccmhunter/package.nix new file mode 100644 index 0000000000000..72b2eaceb9d73 --- /dev/null +++ b/pkgs/by-name/sc/sccmhunter/package.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + python3, +}: +python3.pkgs.buildPythonApplication rec { + pname = "sccmhunter"; + version = "1.0.6-unstable-2024-10-30"; + pythonRelaxDeps = true; + pyproject = true; + + src = fetchFromGitHub { + owner = "garrettfoster13"; + repo = "sccmhunter"; + rev = "7f493d1499fec1a694d949d9de17f25acdb6a0a9"; + hash = "sha256-rMkm4SDIiPrlNJWlnwD2td7yzkTNlTzZ3KaiKK5TOfg="; + }; + + propagatedBuildInputs = with python3.pkgs; [ + cmd2 + cryptography + impacket + ldap3 + pandas + pyasn1 + pyasn1-modules + requests + requests-kerberos + requests-ntlm + requests-toolbelt + rich + tabulate + typer + urllib3 + pyopenssl + pycryptodome + ]; + + meta = with lib; { + description = "Post exploitation tool to identify and attack SCCM related assets in an Active Directory domain"; + homepage = "https://github.com/garrettfoster13/sccmhunter"; + license = licenses.mit; + mainProgram = "sccmhunter.py"; + maintainers = with maintainers; [ purpole ]; + }; +} From 9e5cec3ece5fdc3722b45d45914b480c6676d426 Mon Sep 17 00:00:00 2001 From: purpole <101905225+purpole@users.noreply.github.com> Date: Sat, 2 Nov 2024 14:18:33 +0100 Subject: [PATCH 2/4] maintainers: Add purpole --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6fd827cd72b9d..8d46fd50c9d17 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -17673,6 +17673,12 @@ githubId = 5636; name = "Steve Purcell"; }; + purpole = { + email = "mail@purpole.io"; + github = "purpole"; + githubId = 101905225; + name = "David Schneider"; + }; purrpurrn = { email = "scrcpynovideoaudiocodecraw+nixpkgs@gmail.com"; github = "purrpurrn"; From 5c51cf4aebd6977bdf054c3f5d4a259652e7d753 Mon Sep 17 00:00:00 2001 From: purpole <101905225+purpole@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:05:53 +0100 Subject: [PATCH 3/4] Remove pythonRelaxDeps Co-authored-by: Moraxyc --- pkgs/by-name/sc/sccmhunter/package.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/by-name/sc/sccmhunter/package.nix b/pkgs/by-name/sc/sccmhunter/package.nix index 72b2eaceb9d73..f110ec6960ddf 100644 --- a/pkgs/by-name/sc/sccmhunter/package.nix +++ b/pkgs/by-name/sc/sccmhunter/package.nix @@ -6,7 +6,6 @@ python3.pkgs.buildPythonApplication rec { pname = "sccmhunter"; version = "1.0.6-unstable-2024-10-30"; - pythonRelaxDeps = true; pyproject = true; src = fetchFromGitHub { From feaa04ea89952e5779d84172c8c3266d4176aaf2 Mon Sep 17 00:00:00 2001 From: purpole <101905225+purpole@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:16:07 +0100 Subject: [PATCH 4/4] Apply suggestions from Moraxyc Co-authored-by: Moraxyc --- pkgs/by-name/sc/sccmhunter/package.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/sc/sccmhunter/package.nix b/pkgs/by-name/sc/sccmhunter/package.nix index f110ec6960ddf..0c4a790a90419 100644 --- a/pkgs/by-name/sc/sccmhunter/package.nix +++ b/pkgs/by-name/sc/sccmhunter/package.nix @@ -1,9 +1,9 @@ { lib, fetchFromGitHub, - python3, + python3Packages, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "sccmhunter"; version = "1.0.6-unstable-2024-10-30"; pyproject = true; @@ -15,7 +15,11 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-rMkm4SDIiPrlNJWlnwD2td7yzkTNlTzZ3KaiKK5TOfg="; }; - propagatedBuildInputs = with python3.pkgs; [ + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ cmd2 cryptography impacket @@ -35,11 +39,12 @@ python3.pkgs.buildPythonApplication rec { pycryptodome ]; - meta = with lib; { + meta = { description = "Post exploitation tool to identify and attack SCCM related assets in an Active Directory domain"; homepage = "https://github.com/garrettfoster13/sccmhunter"; - license = licenses.mit; + changelog = "https://github.com/garrettfoster13/sccmhunter/blob/${src.rev}/changelog.md"; + license = lib.licenses.mit; mainProgram = "sccmhunter.py"; - maintainers = with maintainers; [ purpole ]; + maintainers = with lib.maintainers; [ purpole ]; }; }