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

Support for JSON output #226

Closed
NotoriousRebel opened this issue Apr 22, 2024 · 2 comments
Closed

Support for JSON output #226

NotoriousRebel opened this issue Apr 22, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@NotoriousRebel
Copy link

NotoriousRebel commented Apr 22, 2024

Having JSON output as an option would be nice, especially when doing -l targets.txt, for example

{"x.subdomain.com" : ["new.subdomain.com",  "second.subdomain.com", "etc.."]}

Just mapping the specific taarget to the domains found from CSP.

@edoardottt edoardottt self-assigned this May 11, 2024
@edoardottt edoardottt added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels May 11, 2024
@edoardottt edoardottt pinned this issue May 11, 2024
@edoardottt
Copy link
Owner

edoardottt commented May 11, 2024

Hi @NotoriousRebel,

I'm trying to add support for JSON.
The devel branch (https://github.com/edoardottt/csprecon/tree/devel) contains the modifications applied to add support for JSON.

Please test it and see if you spot some weird behaviour or it's okay for you.

Normal output (-j flag not specified)

Try with

echo URL | go run cmd/csprecon/csprecon.go

or

cat URLs.txt | go run cmd/csprecon/csprecon.go

JSON output (-j flag specified)

Try with

echo URL | go run cmd/csprecon/csprecon.go -j

or

cat URLs.txt | go run cmd/csprecon/csprecon.go -j

Consider that I didn't add code to support usage of JSON output with other flags. This means json output could break CIDR, File output flag etc..

@edoardottt
Copy link
Owner

Completed 1afa447

@edoardottt edoardottt unpinned this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants