socket.send 问题(1分)

  • 主题发起人 juemimima11
  • 开始时间
J

juemimima11

Unregistered / Unconfirmed
GUEST, unregistred user!
socket.send 问题

怎么用 socket.send 提交 http://www.mirdy.cn/add.asp?action=sfadd 里面的表单 注意是 get 后的表单 我用截包后 再用 socket.send 却没任何反映

以下是我写的代码
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, JSocket, StdCtrls;
type
TForm1 = class(TForm)
ClientSocket1: TClientSocket;
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);

private
Function CreateShellCode : String;
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
implementation
{$R *.dfm}
Var
SendData : String;

Function TForm1.CreateShellCode : String;
begin

Result :='gameid=6&name=6544645&ip=218.61.5.159&sdate=2008-04-25&hour=20&minute=00&QQ=5'+#13#10;
Result :=Result+'&addr=5&Service=1&xingzhi=5'+#13#10;
Result :=Result+'&homepage=5&download=5&btn=提交私服信息'+#13#10;

end;


procedure TForm1.Button1Click(Sender: TObject);
Var
ShellCode: String;
PostPage : String;
begin
ClientSocket1.Close;
ClientSocket1.Host := 'www.mirdy.cn';
ClientSocket1.Port := 35000;
//PostPage := Trim(PostPageET.Text);
ShellCode := CreateShellCode;
SendData := 'POST /save.asp HTTP/1.1'+ #13#10;
SendData := SendData + 'Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/msword, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/x-silverlight, */*' + #13#10;
SendData := SendData + 'Referer: http://www.mirdy.cn/add.asp?action=sfadd' + #13#10;
SendData := SendData + 'Accept-Language: zh-cn' + #13#10;
SendData := SendData + 'Content-Type: application/x-www-form-urlencoded' + #13#10;
SendData := SendData + 'Accept-Encoding: gzip, deflate' + #13#10;
SendData := SendData + 'User-Agent: Mozilla/4.0 (compatible;
MSIE 6.0;
Windows NT 5.1;
SV1;
Mozilla/4.0 (compatible;
MSIE 6.0;
Windows NT 5.1;
SV1) ;
IEShow Toolbar;
IEShow AoYooToolBar;
GreenBrowser)' + #13#10;
SendData := SendData + 'Host: www.mirdy.cn' + #13#10;
SendData := SendData+'Content-Length: ' + IntToStr(length(shellcode)) + #13#10;
SendData := SendData + 'Connection: Keep-Alive' + #13#10;
SendData := SendData + 'Cache-Control: no-cache' + #13#10;
SendData := SendData + 'Cookie: AJSTAT_ok_times=3;
AJSTAT_ok_times=3;
ASPSESSIONIDSACCTQRQ=NGLPKCBAPLMCMAMDBOBNENIL;
AJSTAT_ok_pages=9' + #13#10;
SendData := SendData+'Content-Type: application/x-www-form-urlencoded'+#13#10;
SendData := SendData+#13#10;
SendData := SendData+ShellCode + #13#10;
ClientSocket1.Open;
memo1.lines.add(SendData);
clientsocket1.Socket.SendText(SendData);
memo1.lines.add(clientsocket1.Socket.ReceiveText);

end;



end.
 

Similar threads

I
回复
0
查看
555
import
I
I
回复
0
查看
506
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
746
import
I
顶部