qq空间登陆不了,有代码,请高手(161)

  • 主题发起人 主题发起人 冬月
  • 开始时间 开始时间

冬月

Unregistered / Unconfirmed
GUEST, unregistred user!
QQ空间登陆总是系统繁忙,unit QQ_farm_Unit;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, ToolWin, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, IdBaseComponent, IdCookieManager, Jpeg, IdHashMessageDigest, IdHash;type TForm1 = class(TForm) ToolBar1: TToolBar; ToolButton1: TToolButton; LoginBtn: TButton; CodeImg: TImage; UserEdt: TEdit; PwsEdt: TEdit; CodeEdt: TEdit; ToolButton2: TToolButton; CodePicBtn: TButton; IdCookieManager1: TIdCookieManager; IdHTTP: TIdHTTP; LogMemo: TMemo; TestBtn: TButton; ToolButton3: TToolButton; procedure CodePicBtnClick(Sender: TObject); procedure LoginBtnClick(Sender: TObject); procedure IdHTTPWorkEnd(Sender: TObject; AWorkMode: TWorkMode); procedure TestBtnClick(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}function HashStr2BinStr(Hash:string):string;var buf:array[0..63] of Char; i:Integer;begin Result:=''; FillChar(buf,SizeOf(buf),0); SetLength(Result,Round(Length(Hash)/2)); FillChar(Result[1],Length(Result),0); HexToBin(PChar(Hash),buf,SizeOf(buf)); for i:=0 to Round(Length(Hash)/2)-1 do Result[i+1]:=buf; end;function Fmd5(str:string):string;var md5 : TIdHashMessageDigest5; longWordRec : T4x4LongWordRecord;begin md5 := TIdHashMessageDigest5.Create; try {$IFDEF ID10} Result:=md5.HashStringAsHex(str); {$ELSE} longWordRec:=md5.HashValue(str); Result:=md5.AsHex(longWordRec); {$ENDIF} finally md5.Free; end; end;function md5_3(str:string):string;begin Result:=Fmd5(str); Result:=HashStr2BinStr(Result); Result:=Fmd5(Result); Result:=HashStr2BinStr(Result); Result:=Fmd5(Result);end;function preprocess(pass,verifycode:string):string;begin Result:=Fmd5(md5_3(pass)+UpperCase(verifycode));end;procedure TForm1.CodePicBtnClick(Sender: TObject);var CodePicStream:TMemoryStream; CodePic:TJPEGImage; CodePicUrl, QQ_Cookie:String;begin CodePicStream:=TMemoryStream.Create; CodePicUrl:=Format('http://ptlogin2.qq.com/getimage?aid=15000101&%0.17f',[Time()]); IdHTTP.Get(CodePicUrl,CodePicStream); CodePicStream.Position:=0; CodePic:=TJPEGImage.Create; try CodePic.LoadFromStream(CodePicStream); CodeImg.Picture.Assign(CodePic); finally CodePicStream.Free; CodePic.Free; end; QQ_Cookie:=IdHTTP.Response.RawHeaders.ValueFromIndex[4]; //LogMemo.Lines.Add(QQ_Cookie); //LogMemo.Lines.Add('verifysession='+Copy(QQ_Cookie,0,Length(QQ_Cookie)-24)); QQ_Cookie:='verifysession='+Copy(QQ_Cookie,0,Length(QQ_Cookie)-24); IdHTTP.Request.CustomHeaders.Clear; //IdHTTP.Request.CustomHeaders.Text:='Cookie:'+QQ_Cookie;end;procedure TForm1.LoginBtnClick(Sender: TObject);var Params:TStrings; Url,TmpStr:String;begin IdHTTP.Request.ContentType:='application/x-www-form-urlencoded'; Params :=TStringList.Create; try Params.Append('aid=15000101'); //Params.Append('dumy='); //???? Params.Append('fp=loginerroralert'); Params.Append('from_ui=1'); Params.Append('h=1'); Params.Append('p='+preprocess(PwsEdt.Text,CodeEdt.Text));//密码和校验码MD5值 Params.Append('ptlang=0'); Params.Append('ptredirect=1'); Params.Append('u='+UserEdt.Text);//QQ号码 Params.Append('u1=http://imgcache.qq.com/qzone/v5/loginsucc.html?para=izone'); Params.Append('verifycode='+CodeEdt.Text);//校验码 try Url:='http://ptlogin2.qq.com/login'; IdHTTP.HandleRedirects:=True; TmpStr:=Idhttp.Post(Url,Params); //LogMemo.Lines.Add(TmpStr); //tmp:=idhttp1.Post(url,Params); except end; finally Params.Free; end;end;procedure TForm1.IdHTTPWorkEnd(Sender: TObject; AWorkMode: TWorkMode);begin LogMemo.Lines.Add('****************************(DEBUG开始)***************************'); LogMemo.Lines.Add('=======(访问页面)========='); LogMemo.Lines.Add(IdHTTP.URL.URI); LogMemo.Lines.Add('=======(页面信息)========='); LogMemo.Lines.Add(IdHttp.ResponseText); LogMemo.Lines.Add('=======(页面反馈)========='); LogMemo.Lines.Add('-------[发送过去的信息]---------------'); LogMemo.Lines.AddStrings(IdHTTP.Request.RawHeaders); LogMemo.Lines.Add('-------[发送过去的自定义信息]---------------'); LogMemo.Lines.AddStrings(IdHTTP.Request.CustomHeaders); LogMemo.Lines.Add('-------[返回回来的信息]---------------'); LogMemo.Lines.AddStrings(IdHTTP.Response.RawHeaders); LogMemo.Lines.Add('-------[返回回来的自定义信息]---------------'); LogMemo.Lines.AddStrings(IdHTTP.Response.CustomHeaders); LogMemo.Lines.Add('=======(页面内容)========='); LogMemo.Lines.Add(UTF8Decode(TStringStream(IdHTTP.Response.ContentStream).dataString)); LogMemo.Lines.Add('***************************(DEBUG结束)***************************');end;procedure TForm1.TestBtnClick(Sender: TObject);begin LogMemo.Lines.Add(preprocess(PwsEdt.Text,CodeEdt.Text));end;end.
 
好像某某的代码:QQ农场外挂。。。。[:D][:D][:D]
 
顶起啊,有人会吗
 
unit QQ_farm_Unit;看单词,应该是QQ农场,呵呵 delphi版的哦,支持下,顶起
 
支持,帮助顶一下。请各路大虾露一手
 
后退
顶部