From 0135f5402375fbb348f857805f0ceb10f40a6bf5 Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 14:35:40 +0300 Subject: [PATCH 1/6] python3Packages.wfuzz: set meta.mainProgram The package installs four console scripts (wfuzz, wfpayload, wfencode, wxfuzz) and is exposed at the top level via toPythonApplication, so lib.getExe and `nix run` need an explicit primary binary to avoid the default-pname fallback warning. --- pkgs/development/python-modules/wfuzz/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 058836e43726..5df717c8b4da 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -85,5 +85,6 @@ buildPythonPackage (finalAttrs: { homepage = "https://wfuzz.readthedocs.io"; license = with lib.licenses; [ gpl2Only ]; maintainers = with lib.maintainers; [ pamplemousse ]; + mainProgram = "wfuzz"; }; }) From c6606136d7d2b7a723eef9148485f3ee0f175c06 Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 15:03:18 +0300 Subject: [PATCH 2/6] python3Packages.wfuzz: fix screenshot plugin on Python 3.13 `pipes` was deprecated in Python 3.11 (PEP 594) and removed in 3.13; src/wfuzz/plugins/scripts/screenshot.py imports it and fails to load on 3.13 with `No module named 'pipes'`. The module loader catches the ImportError and silently drops the plugin, so `wfuzz -e scripts` no longer lists `screenshot`. Replace `pipes.quote` with `shlex.quote` (the documented stdlib replacement; identical semantics for the single argument used here). Reported upstream at xmendez/wfuzz#380. --- .../python-modules/wfuzz/default.nix | 3 ++ .../wfuzz/python-313-shlex.patch | 29 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/wfuzz/python-313-shlex.patch diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 5df717c8b4da..63ea5c81adcf 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -35,6 +35,9 @@ buildPythonPackage (finalAttrs: { url = "https://github.com/xmendez/wfuzz/commit/f4c028b9ada4c36dabf3bc752f69f6ddc110920f.patch?full_index=1"; hash = "sha256-t7pUMcdFmwAsGUNBRdZr+Jje/yR0yzeGIgeYNEq4hFE="; }) + # replace removed `pipes` stdlib module with `shlex` for Python >= 3.13 + # https://github.com/xmendez/wfuzz/issues/380 + ./python-313-shlex.patch ]; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/wfuzz/python-313-shlex.patch b/pkgs/development/python-modules/wfuzz/python-313-shlex.patch new file mode 100644 index 000000000000..a55bac99493b --- /dev/null +++ b/pkgs/development/python-modules/wfuzz/python-313-shlex.patch @@ -0,0 +1,29 @@ +Replace removed `pipes` stdlib module with `shlex` in screenshot plugin. + +`pipes` was deprecated in Python 3.11 (PEP 594) and removed in 3.13; +`shlex.quote` is the documented stdlib replacement and behaves identically +for the single argument used here. + +Reported upstream: https://github.com/xmendez/wfuzz/issues/380 + +diff --git a/src/wfuzz/plugins/scripts/screenshot.py b/src/wfuzz/plugins/scripts/screenshot.py +--- a/src/wfuzz/plugins/scripts/screenshot.py ++++ b/src/wfuzz/plugins/scripts/screenshot.py +@@ -3,7 +3,7 @@ from wfuzz.externals.moduleman.plugin import moduleman_plugin + + import subprocess + import tempfile +-import pipes ++import shlex + import os + import re + +@@ -42,7 +42,7 @@ class screenshot(BasePlugin): + subprocess.call( + [ + "cutycapt", +- "--url=%s" % pipes.quote(fuzzresult.url), ++ "--url=%s" % shlex.quote(fuzzresult.url), + "--out=%s" % filename, + "--insecure", + "--print-backgrounds=on", From ba1de2fadb5a557b27d1dbcb6c475779dcece7d0 Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 15:16:28 +0300 Subject: [PATCH 3/6] python3Packages.wfuzz: add netaddr to runtime dependencies The iprange and ipnet payload plugins (src/wfuzz/plugins/payloads/ {iprange,ipnet}.py) lazily import netaddr and, on ImportError, raise FuzzExceptBadInstall("...requires netaddr module. Please install it using pip."). Without this dep, `wfuzz -z iprange,192.168.1.1-...` and `-z ipnet,...` fail on a Nix-built wfuzz with a misleading pip-install message. netaddr stays in nativeCheckInputs since tests/api/test_payload.py also exercises the ipranges payload. --- pkgs/development/python-modules/wfuzz/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 63ea5c81adcf..20ef5a087fb5 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -46,6 +46,7 @@ buildPythonPackage (finalAttrs: { chardet distutils # src/wfuzz/plugin_api/base.py legacy-cgi + netaddr # src/wfuzz/plugins/payloads/{iprange,ipnet}.py pycurl six setuptools From 335d81bf74af25114c97f5d003a466b91e2a84ac Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 15:58:14 +0300 Subject: [PATCH 4/6] python3Packages.wfuzz: tidy style nits - Sort dependencies alphabetically (pyparsing/setuptools/six were out of order relative to nixpkgs Python convention). - Note that the imp -> importlib patch is needed for Python >= 3.12, not just 3.12, since imp stays removed in 3.13+. - Use the canonical "v\${version}" form for the changelog URL instead of reaching through finalAttrs.src.tag. --- pkgs/development/python-modules/wfuzz/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 20ef5a087fb5..1dd7d4cd39ae 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -29,7 +29,7 @@ buildPythonPackage (finalAttrs: { }; patches = [ - # replace use of imp module for Python 3.12 + # replace use of imp module for Python >= 3.12 # https://github.com/xmendez/wfuzz/pull/365 (fetchpatch2 { url = "https://github.com/xmendez/wfuzz/commit/f4c028b9ada4c36dabf3bc752f69f6ddc110920f.patch?full_index=1"; @@ -48,9 +48,9 @@ buildPythonPackage (finalAttrs: { legacy-cgi netaddr # src/wfuzz/plugins/payloads/{iprange,ipnet}.py pycurl - six - setuptools pyparsing + setuptools + six ] ++ lib.optionals stdenv.hostPlatform.isWindows [ colorama ]; From bf61948c0d0b73bfdfcc20f385bd161b651fcba5 Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 16:20:36 +0300 Subject: [PATCH 5/6] maintainers: add bad3r --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 16595996a747..d85ae9eba55f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2913,6 +2913,12 @@ githubId = 1017537; name = "Bruno Bieth"; }; + bad3r = { + name = "Bad3r"; + email = "github@unsigned.sh"; + github = "Bad3r"; + githubId = 25513724; + }; badele = { name = "Bruno Adelé"; email = "brunoadele@gmail.com"; From 71c6a80651ec387e4306dc0bae6c4038ded6f816 Mon Sep 17 00:00:00 2001 From: Bad3r <25513724+Bad3r@users.noreply.github.com> Date: Mon, 4 May 2026 16:20:36 +0300 Subject: [PATCH 6/6] python3Packages.wfuzz: add bad3r as maintainer --- pkgs/development/python-modules/wfuzz/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/wfuzz/default.nix b/pkgs/development/python-modules/wfuzz/default.nix index 1dd7d4cd39ae..0d8d5585791a 100644 --- a/pkgs/development/python-modules/wfuzz/default.nix +++ b/pkgs/development/python-modules/wfuzz/default.nix @@ -88,7 +88,10 @@ buildPythonPackage (finalAttrs: { ''; homepage = "https://wfuzz.readthedocs.io"; license = with lib.licenses; [ gpl2Only ]; - maintainers = with lib.maintainers; [ pamplemousse ]; + maintainers = with lib.maintainers; [ + bad3r + pamplemousse + ]; mainProgram = "wfuzz"; }; })