Git Product home page Git Product logo

Comments (10)

DarthHater avatar DarthHater commented on July 24, 2024

Pretty neat! What do you need the json output for? Wondering if we can find a tool that allows you to output to multiple types, not just json.

from nancy.

zendern avatar zendern commented on July 24, 2024

Pretty neat! What do you need the json output for? Wondering if we can find a tool that allows you to output to multiple types, not just json.

i think you are onto something with multiple types of output. I assume the ask for JSON is to have something that is a little more machine readable make producing a slack message or something like that from the output. But also something that comes to mind is maybe a csv format that could be sent off to security teams when nancy finds a vulnerability.

from nancy.

th3-j0k3r avatar th3-j0k3r commented on July 24, 2024

The use case I'm looking for is somewhat similar to what @zendern has mentioned. The output in JSON format makes it more readable and with future requirements arising for sending/using this data in JSON format increases flexibility as most languages/frameworks support JSON. Nonetheless, it will be useful to everyone in many use cases. cc @DarthHater

from nancy.

zendern avatar zendern commented on July 24, 2024

Thinking about picking this up some time this week @DarthHater. Probably was going to do something like so. Thoughts??

  1. Introduce a new -output flag, defaulting to text to be backwards compatible.
  2. -output would allow for the following outputs. text, json, csv and maybe table
  3. text - would look exactly as it does today
  4. implementation wise it would just be extracting out what we have currently in here to now return a struct.
  5. Using that struct we would simple just create classes to do the different output formats. I know you mentioned finding a library to do it for us but I've yet to find one but should be simple enough to just use mostly what go provides and use what we have. And if we decided table makes sense maybe pull in that library.

from nancy.

DarthHater avatar DarthHater commented on July 24, 2024

All of that sounds great, I'm wondering if we should do HTML instead of table (so someone can create an artifact, similar to CSV).

I was more curious if you could use logrus to output everything, since it takes different formatters, and can use an io.Writer

https://github.com/sirupsen/logrus

from nancy.

zendern avatar zendern commented on July 24, 2024

All of that sounds great, I'm wondering if we should do HTML instead of table (so someone can create an artifact, similar to CSV).

I was more curious if you could use logrus to output everything, since it takes different formatters, and can use an io.Writer

https://github.com/sirupsen/logrus

That seems like a reasonable library to try to use. Looking at it on the surface JSON, TEXT, CSV should be pretty straightforward. Whereas an HTML table might be more interesting/harder to do with that library.

from nancy.

tweedge avatar tweedge commented on July 24, 2024

Hi! Is there any way that I could lend a hand in getting this merged & released?

from nancy.

zendern avatar zendern commented on July 24, 2024

@tweedge if you want to take a look at the merge conflicts on the pr that would help it along quicker. If not I'll try to get to it some time this week.

Also a set of eyes/any feedback on the new output formats could help as well to make sure we have what you might need/be looking for.

from nancy.

DarthHater avatar DarthHater commented on July 24, 2024

I'll see if I can jump in. I'm doing some Nancy work right now anyways, and I'd love to get another @zendern classic merged in :)

from nancy.

zendern avatar zendern commented on July 24, 2024

@DarthHater the merge conflicts in #57 should be good to go now if you want to take a peek.

from nancy.

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.