Git Product home page Git Product logo

Comments (5)

jonathanwo avatar jonathanwo commented on June 14, 2024

on Windows - check in %ProgramData%/Qualys there should be an .out file

from log4jscanwin.

DJ-pnnl avatar DJ-pnnl commented on June 14, 2024

I noticed that only the /report_sig produced a .out file. If I run the Log4JScanner executable in a regular command prompt a new window is opened and I'm not able to view the results. If I run command prompt as an admin and run the scanner, the window doesn't go away and I am able to see the results.

from log4jscanwin.

BondUniverse avatar BondUniverse commented on June 14, 2024

I'm running into the same issue. Also, I noticed that the .out file has 3 ascii characters at the beginning (I think they may be causing issues with our RMM being able to check for specific words in the file).

Ideally, being able to have a file created for the other reports and/or having the output show in the command prompt that the program is being executed from (not another command prompt window as is being done now) so I can grab the contents programmatically, would be a huge help.

from log4jscanwin.

Banjo-sys avatar Banjo-sys commented on June 14, 2024

As a workaround Iam writing the Output into a File, converting it to UTF8 and then loading it into a variable.
Not a beautiful way but it works.

Sample Code:

Start-Process -FilePath $Scanner -ArgumentList "/scan","/report_pretty" -WorkingDirectory "C:\Windows\Temp\Qualys\Log4jScanner\x64" -Wait -RedirectStandardOutput "C:\windows\Temp\Qualys\Report.json" -RedirectStandardError "C:\windows\Temp\Qualys\Errors.txt"

Get-Content "C:\windows\Temp\Qualys\Report.json" -Encoding Unicode | Set-Content -Encoding UTF8 "C:\windows\Temp\Qualys\Report-utf8.json" -Force

Get-Content "C:\windows\Temp\Qualys\Report-utf8.json" | Write-Output

$ScanResult=Get-Content -Raw -Path "C:\windows\Temp\Qualys\Report-utf8.json" | ConvertFrom-Json

from log4jscanwin.

romw avatar romw commented on June 14, 2024

I've updated the Readme.md file to stress the need to run the tool from an elevated command prompt. Certain versions of Windows disconnect the input/output streams of commands when running commands that require elevated privileges from regular command prompts.

from log4jscanwin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.