[Reflection.Assembly]::LoadWithPartialName(“System.Web”)
$web1=New-Object System.net.WebClient
$urltmp = “http://www.jiaogui.com/zhuce/getzcm1.aspser_id={0}&jiqima={1}&zhucetype={2}”
for($i= 81968186000;$i -le 819681999598;$i++)
{
#$i
$sum = 0
$sn = 0
$str1 = $i.tostring()
for($j = 0; $j -le 10;$j++)
{
$x = $str1.Substring($j,1)
$sum = $sum + [int]::parse($x)
}
$sum =$sum % 10
$sn = $str1 + $sum
#$sn
$url = [string]::format($urltmp,$sn,””,1)
#$url
$html = “”
$html = $web1.DownloadString($url)
if(-not $html.CompareTo(“此光盘未被注册,可以正常使用!”))
{
$sn|out-file -append Sn.txt
}
#if(($i % 100) -eq 0)
$url + $html
}
因为是单线程群举,而且http的响应很慢,程序开了半天跑了4-5个小时,只跑到聊聊的3个序列
不过还算有效。想快点,改成异步方式应该可行
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!