Android uses fiddler for network data capture

Source: Internet
Author: User

This method is mainly about how to carry out network data capture on Android and iphone , for example, if we want to catch a network communication request for an app (Weibo, ink weather).

The advantages of the tcpdump with the Wireshark clutch are:(1) no root (2) for Android and iphone (3) easier and easier to operate (the first installation configuration, the second time just set up the agent) (4) The view of the packet is more clear and understandable, The Fiddler UI is simpler and more straightforward (5) to view HTTPS requests . If you insist on using tcpdump also visible: Use Tcpdump and Wireshark to crawl network packets.

 

ps: Requires 1 PCs to assist, and the PC needs to be in the same LAN as the phone or have a separate public IP
1, PC-side installation Fiddler
: Fiddler.exe, the following is a brief introduction to Fiddler:
Fiddler is one of the powerful and useful Web debugging tools that can record HTTP and HTTPS requests from clients and servers, allow you to monitor, set breakpoints, and even modify input and output data, Fiddler contains a powerful event-based scripting subsystem, And can be extended using the. NET language, which is often used in conjunction with Firebug in web development and tuning. The
Fiddler is actually the HTTP proxy that listens on the 8888 port on this machine. For PC-side fiddler startup, the default IE proxy is set to 127.0.0.1:8888, and other browsers need to be set manually, so if you need to listen to the PC-side Chrome network request, its agent to 127.0.0.1:8888 can listen to the data, The mobile terminal can complete the HTTP proxy of the whole system according to the following settings.

2. Configure PC-side fiddler and mobile phone
(1) Configure Fiddler to allow monitoring of HTTPS
Open the Fiddler menu item Tools->fiddler Options, select decrypt HTTPS traffic and ignore server certificate errors two items, such as:

For the first time, you will be prompted to trust the fiddler certificate and Security reminder, select Yes, and then manage it in the system's certificate management.

(2) Configure Fiddler allow remote Connection
Click Connections in the menu, select Allow remote computers to connect, the default listening port is 8888, if it is occupied can also be set, configured to restart the fiddler, such as:

(3) Configure the phone side
PC-side command line ipconfig view fiddler machine IP, native IP is 10.0.4.37, as

Mobile browser access http://10.0.4.37:8888, that is, the Fiddler machine IP plus port, proxy Internet. Display as page:

Click Fiddlerroot Certificate to download the certificate and rename it

If the lock screen password is not set, you may be prompted to "you need to set the lock screen password to use the credential store" and click OK to set it up.
After opening the phone connected to the same LAN WiFi, and modify the WiFi network details, display advanced options, select Manual proxy Settings, hostname fill fiddler machine IP, Port fill fiddler port, default 8888, such as:

At this point, the network access on the phone can be viewed in fiddler, such as micro-Hirokazu network requests:

You can double-click a line of network requests, and the right side will display the specific request contents (requests header) and the returned content (Response header and content), such as:

You can find that fiddler can view the data returned by the network request in various formats, including header, TextView (text), ImageView (picture), Hexview (hex), WebView (Web Form), Auth ( Proxy-authenticate header), Caching (header cache), Cookies, Raw (original data format), JSON (JSON format), XML (XML format) is very convenient.

Stop network Monitoring, remove the proxy settings of WiFi, or fiddler quit after the phone on the screen Oh.

If you need to restore the phone without password status, the Android side can be set by the system-security-trusted credentials-users, click on the certificate to delete or clear the credentials to remove all user certificates, and then set the password to none.


Android uses fiddler for network data capture

Related Article

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.