Skip to content
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

Structured output #45

Open
wasamasa opened this issue Feb 4, 2023 · 1 comment
Open

Structured output #45

wasamasa opened this issue Feb 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@wasamasa
Copy link
Contributor

wasamasa commented Feb 4, 2023

I'm using remote-method-guesser to scan several hosts and dissecting the textual output is tedious. So I've looked at the code and only got a vague idea (my Java skills are pretty bad) how to allow for alternative output formats:

  • Restructure code so that there's a dedicated logger interface with two implementations, a TTY one using ANSI escapes and a JSON one
  • Restructure code so that the logger interface methods are used, which receive a context (current host/port/probe) and event (with all the details logged to the console)

Seems like quite a bit of work, but on the upside, it would make the existing TTY formatting less terrible.

The JSON output would look something like this

{"host": "...", "port": "...", "probe": "rmi_registry_jep290_check", "status": "not vulnerable"}
{"host": "...", "port": "...", "probe": "rmi_registry_jep290_bypass", "status": "vulnerable", "gadget": "An Trinh"}
@qtc-de
Copy link
Owner

qtc-de commented Feb 4, 2023

Hi @wasamasa

this is definitely true and was already requested in #38 (that was somehow closed). rmg was never designed to run at scale and has some poor design decisions when it comes to running against multiple hosts. As you say, it would require quite some work to do this correctly and my time is currently quite limited.

However, hacking something together that provides JSON output when running against one host should be quite simple. I will work on it 😉

@qtc-de qtc-de added the enhancement New feature or request label May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants