Public feed
#528667
# bash -x test.sh list.txt out.txt 3 com 50
+ input=list.txt
+ output=out.txt
+ combos=3
+ suffix=com
+ retries=50
+ array=($(<"$input"))
++ mix 3
++ (( 3 < 1 ))
++ for x in '"${array[@]}"'
+++ combos 2 blue
test.sh: line 16: combos: command not found
++ echo ''
++ for x in '"${array[@]}"'
+++ combos 2 flower
test.sh: line 16: combos: command not found
++ echo ''
++ for x in '"${array[@]}"'
+++ combos 2 test
test.sh: line 16: combos: command not found
++ echo ''
++ for x in '"${array[@]}"'
+++ combos 2 love
test.sh: line 16: combos: command not found
++ echo ''
+ names=
+ for name in '"${names[@]}"'
+ tries=0
+ (( tries<retries ))
++ whois ''
+ result='whois: can'\''t search for a null string'
+ (( tries++ ))
+ sleep 1
--
# Usage: domains_list.sh <input> <output> <combos> <suffix> <retries>
input=$1; output=$2; combos=$3; suffix=$4; retries=$5;
# Read from input
#
array=($(<"$input"));
# Mix the names together
#
function mix () {
if (($1 < 1)); then echo "$name"
else for x in "${array[@]}"; do echo "$(combos $(($1-1)) $x$name)"; done
fi
}
names=$(mix $combos);
# If they're available, let us know
#
for name in "${names[@]}"; do
tries=0
while ((tries<retries)); do
result=$(whois "$name" 2>&1) || { ((tries++)); sleep 1; continue; }
if grep -q 'No match' <<< "$result"; then echo "+ $name"; echo $name >> "$output"; else echo "- $name"; fi
break
done
# If there's an error
#
if ((tries==3)); then echo "/ $name"; fi
# Get some rest
#
sleep $delay
done