Skip to content

Fix default wordlist path under uv run and package fuzz.txt - #84

Open
mr-pmillz wants to merge 1 commit into
initstring:masterfrom
mr-pmillz:fix-default-wordlist-path
Open

mr-pmillz wants to merge 1 commit into
initstring:masterfrom
mr-pmillz:fix-default-wordlist-path

Conversation

@mr-pmillz

Copy link
Copy Markdown

What was wrong

  1. The default wordlist path pointed at the wrong folder (cloud_enum.py:38). The code built the default path for -m and -b from sys.argv[0]. Under uv run
    cloud_enum, that's the launcher uv creates in .venv/bin/, so the default became .venv/bin/enum_tools/fuzz.txt, which doesn't exist. You passed -m yourself,
    but -b still used the bad default, hence "Cannot access brute-force file". It now uses the module's own location (file) instead.

  2. fuzz.txt was never actually packaged (pyproject.toml). A build from a clean clone left fuzz.txt out of the package, so uv tool install, pip install . or
    any wheel install had no wordlist at all. The old setup.py didn't include it either. A leftover cloud_enum.egg-info/ folder in the working tree made local
    builds look fine. I added [tool.setuptools.package-data] for fuzz.txt.

The default -m/-b wordlist path was derived from sys.argv[0], which under
`uv run cloud_enum` is the console-script shim in .venv/bin. The default
became .venv/bin/enum_tools/fuzz.txt, so the tool exited with "Cannot
access brute-force file" even when -m was passed. Resolve it from the
module's own __file__ instead.

fuzz.txt was also never declared as package data, so clean wheel builds
(uv tool install, pip install .) shipped without it. Declare it under
[tool.setuptools.package-data].

Add a regression test that runs parse_arguments with argv[0] pointing at
a venv shim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant