-
Is there any way to make the CLI return the content of a specific meta variable? As an example: Doing security research, I want to list all endpoints of an api written in express.js. for this I would use something like this:
Is it possible to make the output be a list of methods and/or routes? Would be very helpful for just "querying" code :) |
Beta Was this translation helpful? Give feedback.
Answered by
beescuit
Aug 8, 2023
Replies: 1 comment 1 reply
-
Managed to do this using jq: Not sure if its the best way though 🤔 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
HerringtonDarkholme
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Managed to do this using jq:
sg -p 'app.$METHOD($ROUTE, $$$)' -l js --json | jq '[.[].metaVariables.single | {method: .METHOD.text, route: .ROUTE.text }]'
Not sure if its the best way though 🤔