Basic operation Fiddler capture tool

Fiddler

- in the client and server-side HTTP proxy

Agent: All client requests go through fiddler, and then forwarded to the appropriate server

           The server will go through all the appropriate fiddler, and then sent to the client

 

1. Common HTTP packet capture tool: fiddler, charles

 2. Functions

  Record all HTTP requests between client and server, a request for a particular, data analysis request, set a breakpoint, debug web application, to modify the request data, the server returns the modified data

 3. Use

  The default monitor 127.0.0.1:8888

1) Firefox proxy server settings

2) access to the target site 

   When forced F5 to refresh the page, the request again

3) request for session recording is displayed in the request panel

   Session-- on behalf of a browser session

   

 

Common requests resources:

 

 

 

Common response results:

200: The server responds successfully

202: The server has accepted the request, but has not yet processed

302: Redirect, Temporary Mobile

401: Illegal Request parameter (distal bug)

404: resources on the server could not find the requested

405: request method is not allowed (does not support post, get, etc.)

500: Internal server error occurred, the request method does not allow (the back-end code throws an exception)

503: The service did not start the server timed out

Common HTTP status codes: http: //blog.sina.com.cn/s/blog_69081e0601013dj8.html

filter:

1) set a specific domain name

HTTP request to the site to record the specified domain name, domain name filtering other requests

 

 

2) Set the process of requesting

 

 

3) Set the regular expression to the request header

Record the regular expression of that part of the request

 

 

4) The state of blocking request http

 

 

5) Set a request type and size

 

 

6) Set response header

 

 

Statistic data statistics unit

Basic Performance Data: DNS resolution time, establish TCP / IP connection time consumption

 

 

Inspectors viewer

 

 

 

Incoming response parameters and results

 

 

Composer Designer

 

 

Raw the copy request information, into the head Composer, the request parameter in the Request Body

 

 

Click on request

Body Change Request parameter values ​​in the request, responds to changes result

 

 

AutoResponder自动回复器

Fiddler可用于拦截某一请求,并重定向到本地资源。

生成环境服务器上某个css/JavaScript文件有问题需要修改时,通常需要修改文件、重新发布再验证,易影响到生产环境的稳定性。又或者在开发环境中修改文件并验证,然后发布到生产环境,安全却繁琐。

利用Fiddler可修改HTTP数据的特性,可以敏捷的基于生产环境修改并验证,确认后发布。

尽量在真实环境下调试,可最大限度的减少bug发生的可能性。

 

使用:

1) 将请求文件保存在本地

 

 

2)选择AutoResponder,Add Rule,重定向到本地文件

 

此时再发出请求,请求的是本地资源

断点调试

 

 

Before Request:发送请求后,fiddler代理中转之前,此时可以修改请求的数据

设置断点:bpu xxx(对url中包含了xxx的请求设置断点,请求在到达服务器前被中断)

 

再次发出请求,登录无响应

 

取消断点:bpu(无携带参数)

 

再次发出请求,登录正常响应

 

 

After Request:服务器响应之后,在fiddler将响应中转给客户端之前,此时可以修改响应断点结果

设置断点:bpafter xxx(对url中包含了xxx的请求设置断点,响应在到达客户端前被中断)

 

 

取消断点:bpafter(无携带参数)

 

 

 

 

Fiddler常用命令

Select xx:筛选出请求类型

         如:select image  筛选出所有图片请求

?text:匹配出所有url中包含text的请求

>size、<size:选择响应大小符合size条件的请求

=status:选择响应状态等于给定状态status的所有请求

@host:选择包含指定host的全部请求

 

分析测试中的bug

若未抓到请求:先查看过滤器的设置,若设置没问题,则可能是前台未发起后台的请求

若有正常提交的请求,查看请求的响应状态码(404,405,401,500等)

 

具体使用_参考地址:http://www.cnblogs.com/ink-marks/p/6363275.html

Guess you like

Origin www.cnblogs.com/jiuyue-flamen/p/7112622.html