diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2023-05-27 21:38:44 +0200 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2023-06-01 00:31:59 +0200 |
commit | 3a3987ea7a8051dec3317e23c3fcbb05305a8470 (patch) | |
tree | 928f47d5b3771c64fc1172ca1005e639d6d1533b /pkgs | |
parent | 85f19dd675ca6e43263b8a9eafd454b6d7ad7131 (diff) |
python311Packages.dissect-cobaltstrike: init at 1.0.0
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/dissect-cobaltstrike/default.nix | 83 | ||||
-rw-r--r-- | pkgs/top-level/python-packages.nix | 2 |
2 files changed, 85 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/dissect-cobaltstrike/default.nix b/pkgs/development/python-modules/dissect-cobaltstrike/default.nix new file mode 100644 index 0000000000000..494273003642f --- /dev/null +++ b/pkgs/development/python-modules/dissect-cobaltstrike/default.nix @@ -0,0 +1,83 @@ +{ lib +, buildPythonPackage +, dissect-cstruct +, dissect-util +, fetchFromGitHub +, flow-record +, httpx +, lark +, pycryptodome +, pyshark +, pytest-httpserver +, pytestCheckHook +, pythonOlder +, rich +, setuptools +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "dissect-cobaltstrike"; + version = "1.0.0"; + format = "pyproject"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "fox-it"; + repo = "dissect.cobaltstrike"; + rev = "refs/tags/v${version}"; + hash = "sha256-CS50c3r7sdxp3CRS6XJ4QUmUFtmhFg6rSdKfYzJSOV4="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + ]; + + propagatedBuildInputs = [ + dissect-cstruct + dissect-util + lark + ]; + + passthru.optional-dependencies = { + c2 = [ + flow-record + httpx + pycryptodome + ]; + pcap = [ + flow-record + httpx + pycryptodome + pyshark + ]; + full = [ + flow-record + httpx + pycryptodome + pyshark + rich + ]; + }; + + nativeCheckInputs = [ + pytest-httpserver + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); + + pythonImportsCheck = [ + "dissect.cobaltstrike" + ]; + + meta = with lib; { + description = "Dissect module implementing a parser for Cobalt Strike related data"; + homepage = "https://github.com/fox-it/dissect.cobaltstrike"; + changelog = "https://github.com/fox-it/dissect.cobaltstrike/releases/tag/${version}"; + license = licenses.agpl3Only; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e7a81ab193cd5..08467e08dd7f2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2551,6 +2551,8 @@ self: super: with self; { dissect-clfs = callPackage ../development/python-modules/dissect-clfs { }; + dissect-cobaltstrike = callPackage ../development/python-modules/dissect-cobaltstrike { }; + dissect-cstruct = callPackage ../development/python-modules/dissect-cstruct { }; dissect-fat = callPackage ../development/python-modules/dissect-fat { }; |