summaryrefslogtreecommitdiffstats
path: root/shortdomains.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshortdomains.sh112
1 files changed, 58 insertions, 54 deletions
diff --git a/shortdomains.sh b/shortdomains.sh
index a288521..46f056d 100755
--- a/shortdomains.sh
+++ b/shortdomains.sh
@@ -19,18 +19,17 @@ if ! whois_loc="$(type -p "whois")" || [ -z "$whois_loc" ]; then
fi
if [ -n "$1" ] ; then
- # .si domain: slovenia cctld, arnes registry, 100 queries per hour or ban
- # .no domain: norwegian, uninett norid registry, 3000 queries per day wait till midnight
- # .de domain: germany, no data of registry, 1000 queries per day or ban
- # .it domain: italy, no data of registry, no data of requests per time amount
- oneltr=(0 0 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1)
- tlds=(si no de it ru co uk me us ca pw fr cc cn be nl tn eu su cz dk ro lt at se hu nu)
- availables=('No entries found' 'No whois information found' 'Status: free' 'Status: AVAILABLE', 'No entries found for the selected source' 'No Data Found' 'No whois information found.' 'NOT FOUND' 'No Data Found' 'Not found' 'DOMAIN NOT FOUND' 'No entries found' 'No whois information found.' 'No whois information found.' 'Status: AVAILABLE', '.nl is free', 'NO OBJECT FOUND!', 'Status: AVAILABLE', 'No entries found for the selected source(s).' '%ERROR:101: no entries found' 'Not found:', 'No entries found for the selected source(s).', 'available', 'nothing found', ' not found.' 'No match', 'not found.')
- denieds=('Query denied' 'limit exceeded' '55000000002' 'denied', 'You have exceeded allowed connection rate', 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'You have exceeded allowed connection rate' 'denied' 'denied' 'denied' 'Quota exceeded' 'denied' 'denied' 'denied') # ne vem za: it co me us ca pw fr cc cn be nl tn eu cz dk ro lt se hu nu
- sleeps=(36 29 87 87 2 87 87 87 87 87 60 87 87 87 87 173 173 1 2 173 87 173 1 87 1 87 1) # idk about: me it uk us ca fr cc cn be tn cz dk at hu
- # add your domains, you get the point
- spanje=${sleeps[0]} # max sleep of sleeps will be the sleep (-;
-
+ # .si domain: slovenia cctld, arnes registry, 100 queries per hour or ban
+ # .no domain: norwegian, uninett norid registry, 3000 queries per day wait till midnight
+ # .de domain: germany, no data of registry, 1000 queries per day or ban
+ # .it domain: italy, no data of registry, no data of requests per time amount
+ oneltr=(0 0 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1 1 0 1)
+ tlds=(si no de it ru co uk me us ca pw fr cc cn be nl tn eu su cz dk ro lt at se hu nu)
+ availables=('No entries found' 'No whois information found' 'Status: free' 'Status: AVAILABLE' 'No entries found for the selected source' 'No Data Found' 'No whois information found.' 'NOT FOUND' 'No Data Found' 'Not found' 'DOMAIN NOT FOUND' 'No entries found' 'No whois information found.' 'No whois information found.' 'Status: AVAILABLE' '.nl is free' 'NO OBJECT FOUND!' 'Status: AVAILABLE' 'No entries found for the selected source(s).' '%ERROR:101: no entries found' 'Not found:' 'No entries found for the selected source(s).' 'available' 'nothing found' ' not found.' 'No match' 'not found')
+ denieds=('Query denied' 'limit exceeded' '55000000002' 'denied', 'You have exceeded allowed connection rate' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'denied' 'You have exceeded allowed connection rate' 'denied' 'denied' 'denied' 'denied' 'Quota exceeded' 'denied' 'denied' 'denied') # ne vem za: it co me us ca pw fr cc cn be nl tn eu cz dk ro lt se hu nu
+ sleeps=(36 29 87 87 2 87 87 87 87 87 60 87 87 87 87 173 173 1 2 173 87 173 1 87 1 87 1) # idk about: me it uk us ca fr cc cn be tn cz dk at hu
+ # add your domains, you get the point
+ spanje=${sleeps[0]} # max sleep of sleeps will be the sleep (-;
if [[ $1 == 'all' ]]; then
for n in "${sleeps[@]}" ; do
((n > spanje)) && spanje=$n
@@ -52,19 +51,20 @@ else
exit
fi
fi
- if [ -n "$2" ] ; then
- availables=($2)
+ if [ ${#2} -ge 1 ] ; then
+ availables=$2
else
- availables=(${availables[$index]})
+ availables=${availables[$index]}
+ echo $availables
fi
- if [ -n "$3" ] ; then
- denieds=($3)
+ if [ ${#3} -ge 1 ] ; then
+ denieds=$3
else
- denieds=(${denieds[${index}]})
+ denieds=${denieds[${index}]}
fi
- if [ -n "$4" ] ; then
+ if [ ${#4} -ge 1 ] ; then
spanje=$4
else
spanje=${sleeps[$index]}
@@ -84,9 +84,13 @@ fi
do
if [[ ${oneltr[iter]} == 1 ]]; then
newtlds+=(${tlds[iter]})
+ newavailables+=(${availables[iter]})
+ newdenieds+=(${denieds[iter]})
fi
done
tlds=("${newtlds[@]}")
+ availables=("${newavailables[@]}")
+ denieds=("${newdenieds[@]}")
else
list=`echo {{a..z},{0..9}}{{a..z},{0..9}}`
fi
@@ -104,41 +108,41 @@ fi
if [ $ok ] ; then
tldcount=${#tlds[@]}
-for (( i=0; i<$tldcount; i++ ));
-do
- mv freedomains.$tlds[$i] freedomains.$tlds[$i].old
- echo "---> moved freedomains.$tlds[$i] to freedomains.$tlds[$i].old"
-done
-echo "---> Starting... Delay: "$spanje s", TLDs: "$tldcount"."
- for domain in $list # do for every 2 character possibility
- do
- sleep $spanje
- for (( i=0; i<$tldcount; i++ )); # do for every tld
+ for (( i=0; i<$tldcount; i++ ));
+ do
+ mv freedomains.$tlds[$i] freedomains.$tlds[$i].old
+ echo "---> moved freedomains.$tlds[$i] to freedomains.$tlds[$i].old"
+ done
+ echo "---> Starting... Delay: "$spanje s", TLDs: "$tldcount"."
+ for domain in $list # do for every 2 character possibility
do
- VAL=`whois $domain.${tlds[$i]}`
- while [[ $VAL == *${denieds[$i]}* ]]
- do
- echo -e "\e[95m$domain.${tlds[$i]} DENIED\e[0m"
- if [[ $5 == true ]]; then
+ sleep $spanje
+ for (( i=0; i<$tldcount; i++ )); # do for every tld
+ do
+ VAL=`whois $domain.${tlds[$i]}`
+ while [[ $VAL == *${denieds[$i]}* ]]
+ do
+ echo -e "\e[95m$domain.${tlds[$i]} DENIED\e[0m"
+ if [[ $5 == true ]]; then
+ echo $VAL > "$whoisdatadir/$domain.${tlds[$i]}"
+ fi
+ sleep $spanje
+ VAL=`whois $domain.${tlds[$i]}`
+ done
+ if [[ $5 == true ]]; then
echo $VAL > "$whoisdatadir/$domain.${tlds[$i]}"
- fi
- sleep $spanje
- VAL=`whois $domain.${tlds[$i]}`
- done
- if [[ $5 == true ]]; then
- echo $VAL > "$whoisdatadir/$domain.${tlds[$i]}"
- fi
- if [[ $6 == true ]]; then
- echo $VAL
- fi
- if [[ $VAL == *${availables[$i]}* ]]
- then
- echo -e "\e[92m$domain.${tlds[$i]} FREE\e[0m\007"
- echo "$domain.${tlds[$i]}" >> freedomains.${tlds[$i]}
- else
- echo -e "\e[91m$domain.${tlds[$i]} TAKEN\e[0m"
- fi
- done
- done
- echo -e "\e[39m"
+ fi
+ if [[ $6 == true ]]; then
+ echo $VAL
+ fi
+ if [[ $VAL == *${availables[$i]}* ]]
+ then
+ echo -e "\e[92m$domain.${tlds[$i]} FREE\e[0m\007"
+ echo "$domain.${tlds[$i]}" >> freedomains.${tlds[$i]}
+ else
+ echo -e "\e[91m$domain.${tlds[$i]} TAKEN\e[0m"
+ fi
+ done
+ done
+ echo -e "\e[39m"
fi