More lightweight and convenient packet capture software than Wireshark: Charles and wiresharkcharles
Previously I wrote an article through Wireshark packet capture, analysis of network connection of the article "Through WireShark capture iOS network data instance analysis": http://blog.csdn.net/lixing333/article/details/7782539
Recently, some jobs require packet capture. After Wireshark is installed on my Mac, it cannot run. It is found that Wireshark's interface uses X Window, so it needs to run in X11 environment. After X11 was installed, it still flashed back, and there was no result after research, so I turned to find other software. After trying several packet capture software, we found that Charles is the most convenient software, even more useful than Wireshark's old packet capture analysis tool.
Although Wireshark is powerful, it can capture various packages and perform various types of filtering, it also leads to a high learning cost and is not easy to use. Moreover, Wireshark monitors all devices by default, various software and browsers on the computer, as well as network connections on devices connected to computer hotspots, are messy and it is troublesome to find the network connections we need. For example, can you read the following figure? I don't understand it. Filtering and other operations are required.
Charles has no such trouble. Charles is a lightweight software that does not monitor all network connections on the NIC, but only monitors network connections on specific ports (default port 8888, other irrelevant data is blocked first. As follows:
How to Use: preparation is still as "Through WireShark capture iOS network data instance analysis": http://blog.csdn.net/lixing333/article/details/7782539 this article said, network cable, hot spot sharing must have. Charles monitors port 8888 data, so we need to set port 8888 as the proxy on the mobile phone device. On the computer terminal, run the "ifconfig" command to view the lan ip address of your computer's Nic. Note that it is the IP address of the wired Nic en0, rather than the wireless Nic en1. For example:
Take the iPhone as an example. After connecting to the computer, open "Settings"-"network" and edit the connected Wifi:
After this setting, we open the browser and open the Baidu homepage. Then Charles will prompt: Is there a new device requesting connection? Are you sure you want to allow it? Select Allow.
After Baidu is opened, the Charles interface will display a URL, and new network requests will be marked out, which is very convenient. Request and Response are both clear and easy to view:
Now, you can get rid of Wireshark's huge and difficult-to-use stuff. Mom no longer has to worry about not capturing packets!