Skip to content

feat: implement --output-file logging to capture stdout to file#3

Merged
pexmee merged 1 commit intopexmee:masterfrom
techwallahexplorer:add-output-file
May 10, 2026
Merged

feat: implement --output-file logging to capture stdout to file#3
pexmee merged 1 commit intopexmee:masterfrom
techwallahexplorer:add-output-file

Conversation

@techwallahexplorer
Copy link
Copy Markdown

Fixes #2.

Implemented the --output-file flag to capture the output of nxc-scan as well as the real-time execution of the underlying nxc service scans.

  • Added --output-file argument to the CLI parser and config structure.
  • Created TeeLogger to split the stdout stream between the terminal and the specified log file. Handled UnicodeEncodeError that natively happens on Windows when PYTHONIOENCODING is not UTF-8 and cp1252 attempts to print _WIDE characters.
  • Modified nxc/runner.py's run_service to use subprocess.Popen when streaming output is requested, to allow real-time capture and logging without blocking execution.

Tested successfully on Windows.

@pexmee pexmee merged commit 08137d0 into pexmee:master May 10, 2026
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.

Add support for output file

3 participants