Skip to content

fix(scanner/windows): print debug log in detect #2237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

MaineK00n
Copy link
Collaborator

@MaineK00n MaineK00n commented Jun 6, 2025

If this Pull Request is work in progress, Add a prefix of “[WIP]” in the title.

What did you implement:

Fixes #2231

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

setup

$ cat << EOS > config.toml
version = "v2"

[default]

[servers]

[server.windows]
host = "127.0.0.1"
port = "2222"
user = "vagrant"
keyPath = "/home/vuls/vuls-targets-docker/.ssh/id_rsa"
scanMode           = ["fast"]
scanModules        = ["ospkg"]
EOS

before

$ vuls scan -debug 2>&1 | grep -A 2 "osInfo(Registry):"
(empty)

after

$ vuls scan -debug 2>&1 | grep -A 2 "osInfo(Registry):"
time="Jun  9 12:12:05" level=debug msg="osInfo(Registry): {productName:Windows Server 2022 Standard Evaluation version:10.0 build:20348 revision:2159 edition:ServerStandardEval servicePack: arch:x64-based installationType:Server}" 
time="Jun  9 12:12:05" level=debug msg="Windows. Host: 127.0.0.1:2222" 
time="Jun  9 12:12:05" level=info msg="(1/1) Detected: vagrant: windows Windows Server 2022"

Checklist:

You don't have to satisfy all of the following.

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

Reference

@MaineK00n MaineK00n self-assigned this Jun 6, 2025
@MaineK00n MaineK00n force-pushed the MaineK00n/windows-debug-log branch from 7bfa583 to 34c3652 Compare June 9, 2025 03:16
@MaineK00n MaineK00n requested a review from shino June 9, 2025 03:16
Copy link
Collaborator

@shino shino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻

@MaineK00n MaineK00n merged commit c35f698 into master Jun 9, 2025
7 checks passed
@MaineK00n MaineK00n deleted the MaineK00n/windows-debug-log branch June 9, 2025 06:55
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.

Debug log in detectWindows is not output
2 participants