Users-export flag does not honor active-users flag
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 32/100
Research direction
Start with the methods users_export() and users(), which the issue says share one file write, and with active_users(), which has no export logic. Run the reproduction command with both flags and compare the export file against the active-user list. Done means the export holds only active accounts (9 of 14 in the report). Linked PR #1101 is already open, so check it before starting.
Written by the indexing model from the issue text.
Description
Describe the bug
Using --active-users together with --users-export writes every domain user to the export file, not just the active ones. The --active-users filter has no effect on the export.
To Reproduce
Command: nxc ldap 10.10.1.10 -u jdoe -p 'Summer2026!' --active-users --users-export /tmp/actually-all-users.txt
Resulted in:
LDAP 10.10.1.10 389 DC01 [*] Windows Server 2022 Build 20348 (name:DC01) (domain:lab.local) (signing:None) (channel binding:No TLS cert)
LDAP 10.10.1.10 389 DC01 [+] lab.local\jdoe:Summer2026!
LDAP 10.10.1.10 389 DC01 [*] Enumerated 14 domain users: lab.local
LDAP 10.10.1.10 389 DC01 -Username- -Last PW Set- -BadPW- -Description-
LDAP 10.10.1.10 389 DC01 labadmin 2026-10-08 19:13:20 0 Built-in account for administering the computer/domain
[...]
LDAP 10.10.1.10 389 DC01 disableduser 2026-10-08 20:02:12 0 Disabled account (CLIENT_REVOKED)
[...]
LDAP 10.10.1.10 389 DC01 [*] Writing 14 local users to /tmp/actually-all-users.txt
LDAP 10.10.1.10 389 DC01 [*] Total records returned: 14, total 5 user(s) disabled
[...]
wc -l /tmp/actually-all-users.txt
14 /tmp/actually-all-users.txt
The file includes disabled accounts (Guest, krbtgt, disableduser) even though --active-users is set.
Expected behavior
The export file should contain only the users --active-users reports as active — 9 of the 14, not all 14.
NetExec info
- OS: Kali Linux
- Version of nxc:
1.5.1 - Yippie-Ki-Yay - 306bf295 - 957 - Installed from: github (
pipx install git+https://github.com/Pennyw0rth/NetExec)
Additional context
users_export() just calls users(), which writes every enumerated user regardless of the active filter, and active_users() has no export logic of its own. With both flags set, both methods run against the same file.
I have a fix on my fork: https://github.com/its-ryans-work/NetExec/tree/fix/ldap-active-users-export. Happy to do another round of QC and open a PR if this issue is accepted.
AI disclosure: I used Claude Code (Claude Opus 4.8, Opus 5.5, Sonnet 5) to trace the root cause and draft the fix; I reproduced and verified the bug as well as the fix myself in my own lab (output sampled above).
- Dominant language
- Python
- Stars
- 6k
- Forks
- 803
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 23
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Pennyw0rth/NetExec
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Pennyw0rth/NetExec#1544 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Pennyw0rth/NetExec#1542 ·
Maintainers usually reply within 1 day
-
dependencies
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Pennyw0rth/NetExec#1198 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 22/100
Pennyw0rth/NetExec#1502 · 1 reaction ·
Maintainers usually reply within 1 day
-
Speed improvements tracking (load time, exec waits, Kerberos)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 12/100
Pennyw0rth/NetExec#1478 ·
Maintainers usually reply within 1 day
All issues in Pennyw0rth/NetExec
Similar issues
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day