1
sobigfish OP 自问自答好了,别说多线程,单线程长时间都会被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> |
2
ufo22940268 2012-02-27 17:08:07 +08:00
自问自答碉堡了
|
3
sobigfish OP |
4
ant_sz 2012-02-27 19:05:39 +08:00
多进程还是多线程啊?
多进程的话,在终端命令结束 使用 & 符号切入后台并重定向输出么(不过有些命令的确不允许后台) 另外可以使用jobs命令查看在后台运行的进程,类似相关的还有bg命令和nohup |
6
ri0day 2012-02-27 19:22:09 +08:00
|