1{ lib
2, stdenv
3, buildPythonPackage
4, chardet
5, colorama
6, fetchFromGitHub
7, netaddr
8, pycurl
9, pyparsing
10, pytest
11, pytestCheckHook
12, pythonOlder
13, setuptools
14, six
15}:
16
17buildPythonPackage rec {
18 pname = "wfuzz";
19 version = "3.1.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "xmendez";
26 repo = pname;
27 rev = "v${version}";
28 hash = "sha256-RM6QM/iR00ymg0FBUtaWAtxPHIX4u9U/t5N/UT/T6sc=";
29 };
30
31 postPatch = ''
32 substituteInPlace setup.py \
33 --replace "pyparsing>=2.4*" "pyparsing>=2.4"
34 '';
35
36 propagatedBuildInputs = [
37 chardet
38 pycurl
39 six
40 setuptools
41 pyparsing
42 ] ++ lib.optionals stdenv.hostPlatform.isWindows [
43 colorama
44 ];
45
46 nativeCheckInputs = [
47 netaddr
48 pytest
49 pytestCheckHook
50 ];
51
52 preCheck = ''
53 export HOME=$(mktemp -d)
54 '';
55
56 disabledTestPaths = [
57 # The tests are requiring a local web server
58 "tests/test_acceptance.py"
59 "tests/acceptance/test_saved_filter.py"
60 ];
61
62 pythonImportsCheck = [
63 "wfuzz"
64 ];
65
66 postInstall = ''
67 mkdir -p $out/share/wordlists/wfuzz
68 cp -R -T "wordlist" "$out/share/wordlists/wfuzz"
69 '';
70
71 meta = with lib; {
72 description = "Web content fuzzer to facilitate web applications assessments";
73 longDescription = ''
74 Wfuzz provides a framework to automate web applications security assessments
75 and could help you to secure your web applications by finding and exploiting
76 web application vulnerabilities.
77 '';
78 homepage = "https://wfuzz.readthedocs.io";
79 license = with licenses; [ gpl2Only ];
80 maintainers = with maintainers; [ pamplemousse ];
81 };
82}