自问自答好了,别说多线程,单线程长时间都会被ban
还有新问题 下面这个根据http://
shenmeng.org/article/20110509-34.html 改的
就加了1个echo 1个sleep 1 elif。
date格式不对。。貌似和mac bash显示的是中文日期格式有关,怎么改呢?
<pre>
#!/bin/bash
function availability_check(){
whois_info=`whois "$1"`
if (echo "$whois_info"| grep "NOT FOUND" > /dev/null) then
echo "available"
echo $1 >>me.txt
return 1
elif(echo "$whois_info"| grep "Domain Create Date" > /dev/null) then
creation1=`echo "$whois_info" |grep "Domain Create Date"|awk -F":" '{print $2;exit}'`
creation=`date "+%d-%b-%Y" -d "$creation1"`
expiration1=`echo "$whois_info" |grep "Domain Expiration Date"|awk -F":" '{print $2;exit}'`
expiration=`date "+%d-%b-%Y" -d "$expiration1"`
echo "$creation $expiration"
#怎么比较日期呢 echo $1" expiring" >>me.txt
return 2
elif(echo "$whois_info"| grep "reserved" > /dev/null) then
echo "reserved"
return 3
elif(echo "$whois_info"| grep "auditing" > /dev/null) then
echo "auditing"
return 4
elif(echo "$whois_info"| grep "Premium Name" > /dev/null) then
echo "Premium Name"
return 5
else
availability_check "$1"
fi
}
for a1 in `seq 98 122 | awk '{printf "%c\n",$1}'`
do
for a2 in `seq 97 122 | awk '{printf "%c\n",$1}'`
do
for a3 in `seq 97 122 | awk '{printf "%c\n",$1}'`
do
dn="$a1$a2$
a3.me"
echo -n "$dn"
res=`availability_check "$dn"`
echo " $res"
done
sleep 30
done
done
</pre>