Added json support with flag
Hey there! I was just browsing around and saw issue 119 related to supporting JSON and figured I'd take a stab at it. I added the --json-file (-j) argument to the arg parser to add support, as well as the necessary changes where I thought they made sense.
Hopefully this is helpful!
I think I was able to capture all of your changes. I tested the file writing by temporarily adding some code to make the function sleep for a random amount of time, and I confirmed that the Thread Pooling was working as expected and the file was being written to as results came back from the threads.
I couldn't think of a more elegant way to handle printing and file writing outside of the scan function, so I made the return type a nested dict of sorts. Let me know if you'd like me to clean that up, and thanks for the thorough review!
@sa7mon just wanted to make sure you saw changes were made to this that should address each of your suggestions. thanks!
Hey there! Just wanted to check to see if there was anything else you'd like me to add to this PR. Hope all is well!
Thank you for your contribution. I have just merged the PR for my Golang re-write of this tool, so this PR won't be applicable anymore.
Please feel free to contribute to the new Go version if there are features you think are missing!