use*_*743 2 url perl http urlencode request
我正在编写一个小的perl工具,它可以帮助我在盲目的SQL注入攻击期间加速某些进程(这是一个道德工具.这是我的工作).
我的脚本管理已经使用十六进制值(%xx)进行url编码的HTTP请求.因此,当我使用HTTP::Request它将其发送到Web浏览器时,我的请求被编码两次.
我用这种代码:
my $ua = LWP::UserAgent->new;
my $httpreq = new HTTP::Request GET => 'http://192.168.0.1/lab/sqli.php?id=1%20and%20(select%20ascii(substring(user,3,1))%20from%20mysql.user%20limit%201)>100%23';
my $res = $ua->request($httpreq)
Run Code Online (Sandbox Code Playgroud)
如何在请求中禁用perl URL编码?
HTTP :: Request不会修改提供的URL.
任何URL编码必须在组装URL之前完成 - 它实际上是被编码的URL组件 - 因此HTTP :: Request期望编码已经完成.
>perl -MHTTP::Request -e"print HTTP::Request->new(GET => 'http://192.168.0.1/lab/sqli.php?id=1%20and%20(select%20ascii(substring(user,3,1))%20from%20mysql.user%20limit%201)>100%23')->as_string;"
GET http://192.168.0.1/lab/sqli.php?id=1%20and%20(select%20ascii(substring(user,3,1))%20from%20mysql.user%20limit%201)%3E100%23
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
753 次 |
| 最近记录: |