Skip to content

Fix impacket script path false positive on library module#98

Merged
mkultraWasHere merged 1 commit into
mainfrom
nops/script-sentinel-fix
Jul 15, 2026
Merged

Fix impacket script path false positive on library module#98
mkultraWasHere merged 1 commit into
mainfrom
nops/script-sentinel-fix

Conversation

@mkultraWasHere

Copy link
Copy Markdown
Contributor

_get_impacket_script_path() used secretsdump.py as sentinel to validate a candidate directory. But secretsdump.py exists as an internal library module in site-packages/impacket/examples/ (no shebang, not a CLI script), so the check passed and the function returned a directory containing no CLI scripts. Every impacket tool then failed with FileNotFoundError.

Fixed

  • Changed sentinel from secretsdump.py to GetNPUsers.py — a CLI-only script with no library module twin
  • Applied consistently across site-packages, apt, and PATH discovery paths

secretsdump.py exists as an internal library module in
site-packages/impacket/examples/ (no shebang, not a CLI tool),
causing _get_impacket_script_path() to return a directory with no
CLI scripts. GetNPUsers.py is CLI-only and never has a library twin.

Bump to 2.1.6.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mkultraWasHere mkultraWasHere merged commit 8f6dbb3 into main Jul 15, 2026
5 checks passed
@mkultraWasHere mkultraWasHere deleted the nops/script-sentinel-fix branch July 15, 2026 02:53
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