Subdomain Fuzz: static IP
This commit is contained in:
@@ -14,7 +14,7 @@ fi
|
||||
|
||||
DOMAIN=$(echo $DOMAIN | sed -e 's|^[^/]*//||' -e 's|/.*$||')
|
||||
|
||||
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "[ ] Resolving IP-Address…"
|
||||
output=$(resolveip $DOMAIN 2>&1)
|
||||
status=$(echo $?)
|
||||
@@ -22,6 +22,12 @@ if ! [[ $status == 0 ]] ; then
|
||||
echo "[-] ${output}"
|
||||
exit
|
||||
fi
|
||||
IP_ADDRESS=$(echo $output | head -n 1 | awk '{print $NF}')
|
||||
echo "[+] IP-Address: ${IP_ADDRESS}"
|
||||
else
|
||||
IP_ADDRESS=$2
|
||||
echo "[+] Using IP-Address: ${IP_ADDRESS}"
|
||||
fi
|
||||
|
||||
function sni () {
|
||||
protocol=$1
|
||||
@@ -37,14 +43,12 @@ function sni () {
|
||||
echo $sni
|
||||
}
|
||||
|
||||
IP_ADDRESS=$(echo $output | head -n 1 | awk '{print $NF}')
|
||||
echo "[+] IP-Address: ${IP_ADDRESS}"
|
||||
echo "[ ] Retrieving default site…"
|
||||
rnd=$(uuidgen)
|
||||
sni=$(sni ${PROTOCOL} ${rnd}.${DOMAIN})
|
||||
charcountDomain=$(curl -s "${PROTOCOL}://${DOMAIN}" -k -m 5 | wc -m)
|
||||
charcountIpAddress=$(curl -s "${PROTOCOL}://${IP_ADDRESS}" -k -m 5 | wc -m)
|
||||
charcountNonExistent=$(curl -s "${PROTOCOL}://${rnd}.${DOMAIN}" --resolve "${sni}:${IP_ADDRESS}" -k -m 5 | wc -m)
|
||||
charcountDomain=$(curl -s "${PROTOCOL}://${DOMAIN}" -k -m 5 | wc -m)
|
||||
echo "[+] Chars: ${charcountDomain}, ${charcountIpAddress}, ${charcountNonExistent}"
|
||||
echo "[ ] Fuzzing…"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user