Skip to content

Instantly share code, notes, and snippets.

@ishideo
Forked from gabemarshall/zgrab.sh
Created February 29, 2024 09:55
Show Gist options
  • Save ishideo/15cc5096754f2e8b17f072c48e9c2278 to your computer and use it in GitHub Desktop.
Save ishideo/15cc5096754f2e8b17f072c48e9c2278 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