nekmo-dirhunt
SUCCESS
6m 21s
History Source
SummaryIterations1Transcript6Dockerfile
01Iteration 1
WRITEWriteFile· step #1
0s
Dockerfile565 bytes written
text24 lines · 565 chars
FROM python:3.11-slim

# Improve Python behavior in container
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends build-essential \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /opt/dirhunt

# Copy source
COPY . /opt/dirhunt/

# Install dependencies and package from source
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
    && pip install --no-cache-dir -e .

# Default behavior: show help when no args are provided
ENTRYPOINT ["dirhunt"]
CMD ["--help"]
WRITEWriteFile· step #2
0s
.dockerignore188 bytes written
dockerignore23 lines · 188 chars
__pycache__/
*.pyc
*.pyo
*.pyd
*.swp
*.bak
*.tmp
.ipynb_checkpoints/
.env
venv/
build/
dist/
*.egg-info/
.eggs/
*.egg-info/
*.pytest_cache/
.directory
.git/
node_modules/
.ToL/.ToL
*.log

VERIFYVerifyBuild· step #3
2m 19s
VerifyBuildsmoke_failed
Concerns: Runs as root; consider adding a non-root user for security., No explicit tests to verify installation succeeded beyond running the CLI; packaging metadata or editable install could fail if setup/config is missing.
Smoke [FAIL]: dirhunt --version
  Output: Traceback (most recent call last):
  File "/usr/local/bin/dirhunt", line 6, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/dirhunt/dirhunt/management.py", line 200, in main
    catch(hunt)()
  File "/opt/dirhunt/dirhunt/exceptions.py", line 37, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-pac
Smoke [PASS]: dirhunt --help
Smoke [PASS]: command -v dirhunt
READReadFile· step #4
24s
dirhunt/management.py2613 chars · 55 lines
py55 lines · 2613 chars
Summary (under 1500 chars):

- What it is: Dirhunt CLI (Python) to find web directories without bruteforce. Accepts one or more URLs or domains; can load URLs from files via absolute or relative paths.

- Core flow: sets up a Crawler with many options, processes targets, supports resuming a previous run via a resume file, and prints results. If a resume file exists, it may resume or raise IncompatibleVersionError.

- Key options (short/long):
  - -t/--threads: int
  - -x/--exclude-flags: exclude results with these flags
  - -i/--include-flags: include only results with these flags
  - -e/--interesting-extensions: default: php, zip, sh, asp, csv, log
  - -f/--interesting-files: default: access_log, error_log, error, logs, dump
  - -k/--interesting-keywords
  - --stdout-flags: subset of stdout to show
  - --progress-enabled/--progress-disabled
  - --timeout
  - --max-depth
  - --not-follow-subdomains
  - --exclude-sources
  - -p/--proxies
  - -d/--delay
  - --not-allow-redirects
  - --limit
  - --to-file: Path to create a JSON report
  - -u/--user-agent
  - -c/--cookie and -h/--header: key:value pairs (multiple)
  - --version: prints version info and checks for newer PyPI release

- Mutually exclusive: --exclude-flags and --include-flags cannot be used together.

- Startup/UX messages:
  - If no URLs: prints a help/usage hint: “•_•) OOPS! Add urls to analyze... Need help? Then use dirhunt --help”
  - On resume: prints “Resuming the previous program execution...”
  - On resume mismatch: prints the IncompatibleVersionError message

- Outputs:
  - Normal results shown on stdout; if stdout is not a tty, uses stdout-flavored output via output_urls
  - If --to-file is set, creates a JSON report
  - If a resume file exists and no --to-file, it may delete the resume file after finishing

- Internal/related items:
  - STATUS_CODES, INTERESTING_EXTS, INTERESTING_FILES, STDOUT_FLAGS
  - latest_release(package) uses PyPI to fetch latest version for dirhunt and suggests upgrading with: sudo pip install -U dirhunt
  - Uses force_url, read_file_lines, value_is_file_path, etc.
  - Dependencies: dirhunt.crawler.Crawler, dirhunt.exceptions, dirhunt.output, dirhunt.sources, colorama

- Availability logic:
  - Excludes sources via names from SOURCE_CLASSES
  - Exclude/include flag ranges can expand via flags_range

- Command entry points:
  - hunt(...) is the Click command
  - main() wraps hunt with catch()

- Notable behavior: help text indicates one or more domain/URL targets; supports reading URLs from files; prints installation path, Python version, and current path in version output.
WRITEWriteFile· step #5
0s
Dockerfile708 bytes written
text30 lines · 708 chars
FROM python:3.11-slim

# Improve Python behavior in container
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends build-essential \
    && rm -rf /var/lib/apt/lists/*

# Create a non-root user for running the application
RUN useradd -m -s /bin/bash dirhunt

WORKDIR /opt/dirhunt

# Copy source
COPY . /opt/dirhunt/

# Install dependencies and package from source
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
    && pip install --no-cache-dir -e .

# Switch to non-root user for security
USER dirhunt

# Default behavior: show help when no args are provided
ENTRYPOINT ["dirhunt"]
CMD ["--help"]
VERIFYVerifyBuild· step #6
1m 37s
VerifyBuildaccepted
Smoke [PASS]: command -v dirhunt
Smoke [PASS]: dirhunt --help