Skip to content

Instantly share code, notes, and snippets.

@gabemarshall
Created November 7, 2019 21:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gabemarshall/2ebd272a90e4915e77ac767fc4ce335f to your computer and use it in GitHub Desktop.
Save gabemarshall/2ebd272a90e4915e77ac767fc4ce335f to your computer and use it in GitHub Desktop.
Zgrab2 helper script to include the http(s) port in the output
#!/bin/bash
#
# ex: ./zgrab.sh www.contoso.com 443
echo $1 | zgrab2 http --retry-https --port $2 | awk '{first=substr($0,1,1);gsub(/./,"{\"port\":'"$2"',",first);end=substr($0,2);print first end}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment