请问是否可以编出这样一个程序:能够反复登陆某网站! (100分)

  • 主题发起人 主题发起人 stephen001
  • 开始时间 开始时间
一般而论,可以做到。具体要分析页面元素和机制后才可以给出明确答复。
 
不同的网站需要不同的方法!
 
我的e-mail是popstephen@sina.com
qq:7146468
请HostingLian帮帮忙!!
 
简单原理:
你找个嗅探器拦截登陆网站所发送的数据
然后编个程序,不停的发送这些数据就可以了
 
我也不会 大哥你知道的话请指导我!!![:D]
 
请HostingLian留下联系方法,谢谢!!
 
unit MainFrm;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, OleCtrls, SHDocVw;

type
TForm1 = class(TForm)
Label1: TLabel;
lblFlavor: TLabel;
edtFirstName: TEdit;
btnSubmit: TButton;
cmbxFlavor: TComboBox;
WebBrowser1: TWebBrowser;
procedure btnSubmitClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

uses HTTPApp;

{$R *.DFM}

procedure TForm1.btnSubmitClick(Sender: TObject);
var
EncodedDataString: string;
PostData: OleVariant;
Headers: OleVariant;
I: Integer;
begin
// First, create a URL encoded string of the data
EncodedDataString := 'username=' + HTTPEncode(edtFirstName.Text) + '&' +
'password=' + HttpEncode(cmbxFlavor.Text);
// The PostData OleVariant needs to be an array of bytes as large
// as the string (minus the NULL terminator)
PostData := VarArrayCreate([0, Length(EncodedDataString) - 1], varByte);
// Now, move the Ordinal value of the character into the PostData array
for I := 1 to Length(EncodedDataString) do
PostData[I-1] := Ord(EncodedDataString);
Headers := 'Content-Type: application/x-www-form-urlencoded' + #10#13;
// Finally, we just Naviagte to the URL. Note that you may have to modify
// the path to your ASP page's location.
WebBrowser1.Navigate('http://www.xxx.net/login.asp', EmptyParam,
EmptyParam, PostData, Headers);
end;

end.
 
用http的post就可以
 
后退
顶部