Created
March 27, 2024 17:06
-
-
Save zakkg3/2aab8a99de11c1e210286160cb369639 to your computer and use it in GitHub Desktop.
Dns discovery svc quering a CoreDNS
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/sh | |
ip=0 | |
seg=0 | |
while [ $seg -lt 256 ]; do | |
echo "$(date): Scanning 10.96.$seg.0/24..." | |
ip=0 | |
while [ $ip -lt 255 ]; do | |
if answer=$(host 10.96.$seg $ip); then | |
echo $answer | |
fi | |
ip=$(expr $ip + 1) | |
done | |
seg=$(expr $seg + 1) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Stop Leaking Kubernetes Service Information via DNS! - John Belamaric, Google & Yong Tang, Ivanti