Fiddler HTTP interface to the packet capture tool

The basic functions of Fiddler's introduction:

 

Fiddler is the best one of the most powerful Web debugging tool, it can record all http and https requests the client and server, allowing you to monitor, set breakpoints, and even modify the input and output data, Fiddler includes a powerful web-based time scripting subsystem, and can be extended using .NET languages. More understanding of the HTTP protocol, the more will be able to master the use of Fiddler's. The use Fiddler, the more it can help understand the HTTP protocol. Fiddler both for developers or testers, is a very useful tool.

Fiddler's works: Fiddler is a web server proxy form work, it uses the proxy local address: 127.0.0.1, port xxxx, as shown below.

HTTP proxy support any program of packets can be sniffed Fiddler, Fiddler Fiddler port operation mechanism is set to listen on the native HTTP proxy.

 

 

 

 

1 android phone and fiddler connection:

 

Download: Fiddler.exe, http: //www.telerik.com/download/fiddler

 

Development needs to do to crawl http / https phone app packets, want to see what http requests and responses are issued by APP, which requires Ethereal, which can get some unknown api, for example, can also dry some. " bad thing ", such as that of the micro-letter envelopes look at photos, successfully break through the interface packet capture, red envelopes can not see photos.

Required tools: Fiddler capture software, using the steps described below

Fiddler installed on your PC

Installation file path: https: //pan.baidu.com/s/1o7USimA

Fiddler configuration (remember to restart after the Fiddler)

First, how to use Fiddler2

Once downloaded, the installation process is not a map.

1 choose to download the correct version of the fiddler started; Help -About view the version number

                          

▲ Figure 7-2

 

2 fiddler Options

 

▲ Figure 7-3

Conventional 3, select the computer to allow remote connection

 

▲ Figure 7-4

4 Click on the link, check the proxy options, port number 8888, click OK, here on the proxy setup is complete, restart the software must be configured to take effect

 

▲ Figure 7-5

5运行cmd 查看电脑的ip地址

 

▲图7-6

6 Android 手机一台,手机端代理设置,以华为手机为例子

1、如下图华为手机设置:

找到你的Wifi,必须电脑和手机处于同一个Wifi下。最好是电脑发一个Wifi出来。

 打开android手机,设置-WLAN-连接的wifi

 长按wifi热点,选择修改网络,下拉 勾选显示高级选项

 代理设置为:手动;代理主机名为你的电脑Ip,端口就是刚才Fiddler设置的端口8888,点击保存按钮

▲图7-7

7.重启fiddler,以及启动手机app应用程序,即可在fiddler界面看到手机请求数据和响应数据,左侧是主机 URL;右侧嗅探是Headers查看头信息,WebForms查看参数名和值,TextView查看接口响应数据等

 

▲图7-8

8如果只看相应app的数据,可在fiddler设置勾选过滤器,使用过滤器,仅仅显示以下主机

 

▲图7-9

为能捕获HTTPS会话,如未安装证书,访问网站会提示”您的连接不是私密链接“,可点击高级选择继续访问,访问时会提示访问的网站是不安全的,提示证书无效,Fiddler也抓捕不到https请求。

需要安装证书,在浏览器中输入本地ip:Fiddler中设置的端口号(127.0.0.1:8080),点击图中框图部分下载证书点击安装。

安装时会出现以下界面。

 

 

-------------------------------------------------------------------------

2 IOS手机和fiddler连接

Fiddler不但能截获各种浏览器发出的HTTP请求, 也可以截获各种智能手机发出的HTTP/HTTPS请求。Fiddler能捕获IOS设备发出的请求,比如IPhone, IPad, MacBook. 等等苹果的设备。  同理,也可以截获Andriod,Windows Phone的等设备发出的HTTP/HTTPS。

最关键的是,对IOS应用抓包时直接在Windows PC上进行,不需要非得在MAC上。下

 

iphone手机配置

(1) 网络代理设置

安装Fiddler的机器,跟Iphone 必须在同一个网络里, 否则IPhone不能把HTTP发送到Fiddler的机器上来。一般情况,我们手头上是台式机和手机,台式机只有网线,没有无线wifi,所以和手机不在同一个网络,这时,我们就需要设置代理了

打开IPhone,  找到你的网络连接, 打开HTTP代理,输入Fiddler所在机器的IP地址以及Fiddler的端口号8888

▲图7-10

(2) Fiddler证书安装

这一步是为了让Fiddler能捕获HTTPS请求。如果你只需要截获HTTP请求, 可以忽略这一步

1. 首先要知道Fiddler所在的机器的IP地址:我安装了Fiddler的机器的IP地址是:172.29.58.79

2. 打开IPhone的Safari, 访问  http://172.29.58.79:8888, 点"FiddlerRoot certificate" 然后安装证书

 

▲图7-11

 

现在大功告成,可以抓包了。IPhone上的应用App发出的HTTP/HTTPS都可以被Fiddler获取,打开手机上的app,看看fiddler能否捕获。

 

fiddler网络限速:

fiddler还为我们提供了一个很方便的网络限速的功能,通过网络限速,可以来模拟用户的一些真实环境。fiddler提供了网络限速的插件,具体不详细介绍了。官网下载地址:http://www.telerik.com/fiddler/add-ons

 

注意事项

用完了之后要退出fiddler以及把IPhone上的Fiddler代理关闭, 以免IPhone或电脑不了网。

如果只能捕获HTTP,而不能捕获HTTPS,原因可能是证书没有安装好。解决办法可以尝试重新安装fiddler证书:先删除IPhone上的Fiddler证书 (”设置“->“通用”->"描述文件")后再重新安装。

Guess you like

Origin www.cnblogs.com/finer/p/11261835.html