Use the Fiddler packet capture function to capture mobile phone data.

Source: Internet
Author: User

Use the Fiddler packet capture function to capture mobile phone data.

Fiddler can not only intercept HTTP requests from various browsers, but also intercept HTTP/HTTPS requests from various smart phones.

Fiddler can capture requests sent by IOS devices, such as IPhone, IPad, MacBook, and other Apple devices. Similarly, you can also intercept the HTTP/HTTPS sent by devices such as Andriod and Windows Phone.

The prerequisite is that the Fiddler machine is installed on the same network as the Iphone. Otherwise, the IPhone cannot send HTTP to the Fiddler machine.

Purpose 1: Mobile Phone software programmers can use Fiddler to intercept HTTP packets sent by mobile phones and Debug programs.

Use 2: Software testers are used to test software on smartphones.

Use 3: rankings can be used in App stores

Purpose 4: after intercepting HTTP/HTTPS, you can do whatever you want, such as modifying the Request or Response.

Configure Fiddler to allow "remote connection"

Open Fiddler, Tools-> Fiddler Options. (Remember to restart Fiddler after configuration ).

Select "Decrpt HTTPS traffic", and Fiddler can intercept HTTPS requests.

Select "Allow remote computers to connect" to Allow other machines to send HTTP/HTTPS requests to Fiddler.



Obtain the IP address of the machine where Fiddler is located

Open Network -- click network connection -- View Details to obtain the IP address of the machine.


On android, set the proxy and click "wifi connection" to select the connected Wi-Fi network (the wifi must be in the same network as the machine) -- select proxy settings service fill in the local IP Address -- port fill in four digits in the connections setting in fiddler listens on port in Fiddler options

When it is used up, remember to disable the Fiddler agent to prevent the mobile phone from failing to access the Internet.




Install the Fiddler certificate on the IPhone

This step allows Fiddler to capture HTTPS requests. If you only need to intercept HTTP requests, ignore this step.

1. First, you need to know the IP address of the machine where Fiddler is located: If the IP address of the machine where Fiddler is installed is 192.168.1.104

2. Open Safari on the IPhone and access http: // 192.168.1.104: 8888. Click "FiddlerRoot certificate" and install the certificate.



On the IPhone, configure Fiddler to open the IPhone as a proxy, find your network connection, open the HTTP proxy, enter the IP address of the machine where Fiddler is located (for example, 192.168.1.104), and the port number of Fiddler 8888.


Success! Start to capture packets

HTTP/HTTPS sent by IPhone applications (such as Safari, Firefox, Itunes, and App Store) can be obtained by Fiddler.

Instance: Open Safari,

1. Enter the http://www.cnblogs.com/tankxiao to see if Fiddler can capture it.

2. Enter the https://dynamic.12306.cn/otsweb/ to see if Fiddler can capture it.

Are both HTTP and HTTPS intercepted ????, You can not only intercept, but also break the breakpoint, modify the Request, modify the Response, Do what you want.

When it is used up, remember to disable the Fiddler proxy on the IPhone to prevent the IPhone from going online.

View the captured data. For example, you can view the request address, request method, and data obtained.

Only HTTP can be captured, but HTTPS cannot be captured.

Sometimes it is found that Fiddler can only capture HTTP requests sent by the IPhone, but cannot capture HTTPS requests, probably because the certificate is not installed properly. Solution:

1. delete all the Fiddler certificates on the IPhone (take out the IPhone and click "set"-> "general"-> "description file ")

2. Install the above method and reinstall the Fiddler certificate.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.