Use Fiddler to request a grab packet for Android mobile network

Source: Internet
Author: User

This article reproduces the blog of Arrogant Bull Trinea: Android uses fiddler for network data capture

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

MAC please use Charles instead of Fiddler,charles free activation code for registered Name:a!nthony Ortolani License KEY:A!4036B2761C9583FDA (requires the name And the A in key! are changed to a)

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 mobile phone or have an independent public network IP
1, PC-side installation Fiddler
: Fiddler.exe, here is a brief introduction to Fiddler (not interested can skip directly):
Fiddler is one of the powerful and useful Web debugging tools, It 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 phone
(1) Configure Fiddler allow monitoring of HTTPS
Open Fiddler menu item Tools->fiddler Options, select decrypt HTTPS traffic and ignore server Certificate errors two items, such as:

The first time you will be prompted to trust the Fiddler certificate and Security reminders, select Yes, and then can be managed 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 used can also be set up, configured to restart ( must pay attention to restart or not work ) 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

Open your phone to connect to the same LAN WiFi, and modify the WiFi network details (long press WiFi selection, modify network), display advanced options, select Manual proxy settings, host name 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.

If you only need to monitor one software, you can turn off other application network access by combining system traffic monitoring.



From for notes (Wiz)

Use Fiddler to request a grab packet for Android mobile network

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.