summary refs log tree commit diff
path: root/pkgs/development/python-modules/wfuzz/default.nix
blob: 1bc512398bd05812bb2d80961b46682e748222ee (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{ lib
, stdenv
, buildPythonPackage
, chardet
, colorama
, fetchFromGitHub
, netaddr
, pycurl
, pyparsing
, pytest
, pytestCheckHook
, pythonOlder
, setuptools
, six
}:

buildPythonPackage rec {
  pname = "wfuzz";
  version = "3.1.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "xmendez";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-RM6QM/iR00ymg0FBUtaWAtxPHIX4u9U/t5N/UT/T6sc=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "pyparsing>=2.4*" "pyparsing>=2.4"
  '';

  propagatedBuildInputs = [
    chardet
    pycurl
    six
    setuptools
    pyparsing
  ] ++ lib.optionals stdenv.hostPlatform.isWindows [
    colorama
  ];

  nativeCheckInputs = [
    netaddr
    pytest
    pytestCheckHook
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  disabledTestPaths = [
    # The tests are requiring a local web server
    "tests/test_acceptance.py"
    "tests/acceptance/test_saved_filter.py"
  ];

  pythonImportsCheck = [
    "wfuzz"
  ];

  postInstall = ''
    mkdir -p $out/share/wordlists/wfuzz
    cp -R -T "wordlist" "$out/share/wordlists/wfuzz"
  '';

  meta = with lib; {
    description = "Web content fuzzer to facilitate web applications assessments";
    longDescription = ''
      Wfuzz provides a framework to automate web applications security assessments
      and could help you to secure your web applications by finding and exploiting
      web application vulnerabilities.
    '';
    homepage = "https://wfuzz.readthedocs.io";
    license = with licenses; [ gpl2Only ];
    maintainers = with maintainers; [ pamplemousse ];
  };
}