5,927
社区成员




Randomize;
repeat
idHttp1.Get('http://avatar.csdn.net/6/8/9/1_erhan.jpg',mFaceStream);//取得图像
将流保存到Image1中;
//判断图像是否为缺省头像,简单地通过某点的颜色即可判断出来。
if 缺省头像 then
begin
idHttp1 post数据到登录页面(验证码识别难啊!);
从Response中取Cookie,写入idHttp1的Request的head里伪造session;
通过http://passport.csdn.net/account/profile#avatar上传本地图;
Sleep(2000);
Continue;
end;
//TWebBrowser上传的方案
{
if 缺省头像 then
begin
//因为以前登录过,2周内不用再登录鸟
WebBrowser1.Navigate('http://passport.csdn.net/account/profile#avatar');
doc := WebBrowser1.Document as IHTMLDocument2;
设置相应的input项并执行submit
//靠,粗看了下,按钮居然在iframe里,好在前几天回贴帮别人做了用WebBrowser点击iframe里按钮的,搜下代码
end;
}
sleep(Random(60)*60*1000);
until False;