感谢V总教会我用brupsuite.谢谢这位没有任何脾气的大牛。。这个软件说实话真不是很会用,纯英文比较蛋疼。。。刚学会使用,抓包写了个旁站查询的小玩具,大牛见笑了~
原始的数据包如下:
POST /Same/ HTTP/1.1Host: tool.chinaz.comUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:18.0)Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-cn,en-us;q=0.7,en;q=0.3Accept-Encoding: gzip, deflateReferer: http://tool.chinaz.com/Same/Connection: keep-aliveContent-Type: application/x-www-form-urlencodedContent-Length: 13s=www.163.com
Perl写出的工具如下:
#!/usr/bin/perluse LWP::UserAgent;use HTTP::Request;use HTTP::Response;use HTTP::Request::Common;print "Set the URL:";chomp($task_name=);$agent=new LWP::UserAgent;$request=POST('http://tool.chinaz.com/Same/',[s=>$task_name]);$request->header('User-Agent'=>'Mozilla/5.0 (X11; Linux x86_64; rv:18.0)');$request->header('Accept-Encoding'=>'zh-cn,en-us;q=0.7,en;q=0.3');$response=$agent->request($request);if($response->is_success){ $url_tmp=$response->content; if($url_tmp=~m# #){ grep_task($1); }}else{ print "Error!!\n";}#grep of the task url.sub grep_task{ local($url_other)=shift; @other_list=split(/
- (.*)
/,$url_other); foreach my $url(@other_list){ if($url=~m#href='(.*)'#){ print "URL:$1\n"; } }}
这个脚本主要用到的是一些未曾用过的模块,就当练习了~谢谢V总~V总威武。。。:)
使用后的结果:
smart@smart:~/perl$ ./PostWeb2.pl Set the URL:www.163.comURL:http://www.sihongfeng.comURL:http://imga5.4399.comURL:http://xiuxiu.dl.meitu.comURL:http://www.4m6m.comURL:http://mimg.126.netURL:http://ci.aizhan.comURL:http://my.91wan.comURL:http://swf.games.sina.com.cnURL:http://img.t.sinajs.cnURL:http://www.qq937.comURL:http://xy.163.comURL:http://xiuxiu.meitu.comURL:http://icp.aizhan.comURL:http://www.kan300.comURL:http://lifestyle.rayli.com.cnURL:http://images4.tuniucdn.comURL:http://www.kkgame.cnURL:http://mimg.127.netURL:http://163mail.help.163.com