-
-
Save atlassion/66d50bfa55b95ab7aabfb234bade1d39 to your computer and use it in GitHub Desktop.
Parse certificate Subject Alternative Name values from masscan ndjson files using `jq`
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 | |
| INFILE="$1" | |
| jq -r 'select(.rec_type == "banner" and .data.service_name == "ssl" and ((.data.banner | contains("ALERT"))|not) ) | .data.banner|split(",")[1:][] | gsub("^\\s+|\\s+%";"")' < "${INFILE}" | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment