Skip to content

Instantly share code, notes, and snippets.

@aaronott
Created April 16, 2019 21:00
Show Gist options
  • Save aaronott/0a5be188ddd9667378613c6443fddf89 to your computer and use it in GitHub Desktop.
Save aaronott/0a5be188ddd9667378613c6443fddf89 to your computer and use it in GitHub Desktop.
#!/bin/bash
tst=$1
for dom in $(curl -s https://crt.sh/?q=%25.${tst} | grep ${tst} |grep TD |grep -v LIKE |cut -d">" -f2 | cut -d"<" -f1 |sort |uniq);
do
ip=$(ping -c 1 $dom | gawk -F'[()]' '/PING/{print $2}') ; echo "${dom} (${ip})" >> ${tst}_w_IP.txt ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment