Created
November 7, 2019 21:39
-
-
Save gabemarshall/2ebd272a90e4915e77ac767fc4ce335f to your computer and use it in GitHub Desktop.
Zgrab2 helper script to include the http(s) port in the output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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