0xbaha / bash

Kumpulan script bash.
https://baha.my.id/bash
1 stars 0 forks source link

Check domain availability using `whois` #6

Open 0xbaha opened 2 years ago

0xbaha commented 2 years ago
#!/bin/bash
for domain in `cat domains.txt`
do
  echo $domain
  CHECK=`whois $domain.my.id`
  if [ "$CHECK" == "DOMAIN NOT FOUND" ]; then 
    echo $domain >> whois-results.txt
  fi
done
0xbaha commented 2 years ago

3 letters

#!/bin/bash

letters=(a b c d e f g h i j k l m n o p q r s t u v w x y z)

for letter1 in "${letters[@]}"
do
  for letter2 in "${letters[@]}"
  do
    for letter3 in "${letters[@]}"
    do
      domain=$letter1$letter2$letter3
      CHECK=`whois $domain.my.id`
      if [ "$CHECK" == "DOMAIN NOT FOUND" ]; then 
        echo $domain >> tests-results.txt
      fi
    done
  done
done