Transferred from: http://blog.csdn.net/jiangwei0910410003/article/details/41620363/
Take a look today at how to grab a packet on your Mac, before an article about using Fidder to grab a packet
http://blog.csdn.net/jiangwei0910410003/article/details/19806999
But unfortunately, Fidder use C # developed, so it can not be used on the Mac, but there is another grab package artifact, is Charles, it is Java development, so cross-platform, not only can be used on Mac, Linux and window can be used, Of course, the JDK needs to be installed to run, and one problem is that he is charged.
First, download
First to its official website http://www.charlesproxy.com/can be downloaded to the latest version, this download is a bit slow, I have put it in the network disk: Http://pan.baidu.com/s/1gdu0S4V
This is 3.9.3 version, download down, install not much said, very easy .... Open the interface:
Second, crack
But this charge, then start cracking it, in fact, the crack is very simple is to replace a file can be searched online: Charles3.9.3 cracked jar file
I'm here, too. Download good: HTTP://PAN.BAIDU.COM/S/1I3GJEFJ
After downloading it, we can hack it:
Open the application, select Charles, and select Show Package Contents:
Then click Contents->resources->java:
Then replace the Charles.jar we have downloaded with the Charles.jar here. And then open Charles again, it will not be too prompt 30 days to use the deadline, crack fix
Three, grasping the bag
Here's a look at how to grab a bag
First, HTTP grab packet
1. Open the Charles Program
2, check the IP address of Mac computer, System Preferences and network can be viewed, such as my IP address is: 192.168.1.7
3, open the iOS settings, enter the current WiFi connection (Mac in a LAN), set up the HTTP proxy group, the server is filled with the IP obtained in the previous step, that is, 192.168.1.7, Port fill 8888:
4. iOS device open the app you want to grab the package for network operation
5, Charles Pop-Up confirmation box, click the Allow button to
Proxy settings for Android:
2. Using Charles's computer, agent to grab the packet anroid mobile phone network connection:
First look at the network IP address of the PC, turn on the phone settings, go to the current WiFi connection, set the agent as manual, fill the server with the IP obtained in the previous step, the port defaults to 8888 (this port number can be changed in Charles Proxy setting). When Charles pops up the confirmation box, click the Allow button to
Second, HTTPS grab packet
Need to download Charles certificate Http://www.charlesproxy.com/ssl.zip, unzip and import into iOS device, here I also downloaded:
Http://pan.baidu.com/s/1sjJiZYt,
HTTPS Grab pack on Android:
- Download the Charles Certificate Http://www.charlesproxy.com/ssl.zip, unzip and import into the phone, then set up security------credential store, install from storage device, check certificate.
- On Charles's toolbar, click the Settings button, select proxy Settings, switch to the SSL tab, select Enable SSL proxying, tab locations form can fill in the domain name and port to grab the package, click the Add button, In the pop-up form, host fills in the domain name, such as fill Api.instagram.com,port 443. The default: Represents all addresses applied to
The installation on the iOS device is as follows:
Click to open: Click Install:
Click Install again, the certificate is installed successfully
Then click on the Proxy button on Charles's toolbar to select the proxy Settings ...
Switch to the SSL tab, select Enable SSL proxying, don't worry, don't turn it off before you finish, and the next step.
This step is different from Fiddler, fiddler Install the certificate will be able to catch the HTTPS URL package, Charles is troublesome, need to be in the SSL tab of the previous step locations form fill in the domain name and port to grab the package, click the Add button, In the pop-up form, host fills in the domain name, for example fill Api.instagram.com,port 443
At this time we open the NetEase app:
You can see the data, and then grab the bag work is done.
3. Chinese garbled problem solving
Vmoption add-dfile.encoding=utf-8 in Charles ' Content/info.plist
Grab Bag tool Charles