1{ lib
2, fetchFromGitHub
3, python3
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "crackmapexec";
8 version = "5.4.0";
9 format = "pyproject";
10
11 src = fetchFromGitHub {
12 owner = "Porchetta-Industries";
13 repo = "CrackMapExec";
14 rev = "refs/tags/v${version}";
15 hash = "sha256-V2n840QyLofTfQE4vtFYGfQwl65sklp+KfNS9RCLvI8=";
16 };
17
18 nativeBuildInputs = with python3.pkgs; [
19 poetry-core
20 pythonRelaxDepsHook
21 ];
22
23 propagatedBuildInputs = with python3.pkgs; [
24 aioconsole
25 aardwolf
26 beautifulsoup4
27 dsinternals
28 impacket
29 lsassy
30 masky
31 msgpack
32 neo4j
33 paramiko
34 pylnk3
35 pypsrp
36 pywerview
37 requests
38 requests_ntlm
39 termcolor
40 terminaltables
41 xmltodict
42 ];
43
44 postPatch = ''
45 substituteInPlace pyproject.toml \
46 --replace '{ git = "https://github.com/mpgn/impacket.git", branch = "master" }' '"x"'
47 '';
48
49 pythonRelaxDeps = true;
50
51 # Project has no tests
52 doCheck = false;
53
54 pythonImportsCheck = [
55 "cme"
56 ];
57
58 meta = with lib; {
59 description = "Tool for pentesting networks";
60 homepage = "https://github.com/Porchetta-Industries/CrackMapExec";
61 changelog = "https://github.com/Porchetta-Industries/CrackMapExec/releases/tag/v${version}";
62 license = with licenses; [ bsd2 ];
63 maintainers = with maintainers; [ fab ];
64 mainProgram = "cme";
65 };
66}