about summary refs log tree commit diff
path: root/pkgs/tools/security/offensive-azure/default.nix
blob: fb5dce6798dcd7b994be2c418e4347c76854a959 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{ lib
, fetchFromGitHub
, python3
}:

python3.pkgs.buildPythonApplication rec {
  pname = "offensive-azure";
  version = "0.4.10";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "blacklanternsecurity";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-5JHix+/uGGhXM89VLimI81g4evci5ZUtNV1c1xopjuI=";
  };

  nativeBuildInputs = with python3.pkgs; [
    poetry-core
  ];

  propagatedBuildInputs = with python3.pkgs; [
    certifi
    charset-normalizer
    colorama
    dnspython
    idna
    pycryptodome
    python-whois
    requests
    requests
  ];

  nativeCheckInputs = with python3.pkgs; [
    pytestCheckHook
  ];

  postPatch = ''
    # Use default Python module
    substituteInPlace pyproject.toml \
      --replace 'uuid = "^1.30"' "" \
      --replace 'python-whois = "^0.7.3"' 'python-whois = "*"'
  '';

  pythonImportsCheck = [
    "offensive_azure"
  ];

  meta = with lib; {
    description = "Collection of offensive tools targeting Microsoft Azure";
    homepage = "https://github.com/blacklanternsecurity/offensive-azure";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}