Turn from "http://blog.csdn.net/feixue1232/article/details/8535212"
Goal: Use the Httpreques\json-handle\tcpdump\wireshark tool, crawl the mobile phone to access the network packet, analyze request and response requests, through the httprequester to achieve the simulation and receive.
For mobile phone development, analysis of mobile phone access to network data, it is necessary!
1. Use TCPDUMP packet crawl network packet, phone to root, the crawl process see: http://blog.csdn.net/feixue1232/article/details/8514967
2. Through the Wireshark tool to open the packet just crawled, can be http&&ip.addr==119.161.212.35 (mobile network access to the destination IP address) Such a statement filtering, accurate to obtain useful data
3. Navigate to a specific package, double-click to find the HTTP address of the request, as well as the JSON data, in this case the data is that some of the requests are more user-set school and department information, address available, you can try to repair the contents of the JSON.
Http://kechengbiao.me/popular.json
{"From_app": True, "Department_name": "EECS", "School_name": "Peking University", "token": "EHFWUCVRRSKATAOHAGTBSR", "user": {"Grade ":", "Sex": 1, "name": "Mingyong"}, "locale": "CH"}
4. Open Firefox to use its plugin httprequester and json-handle to simulate the phone to submit a POST request, and check the annual return data
The above HTTP address and JSON are entered into HttpRequest,
5. The fourth step is to actually update the school's post request in this example to see if the update was successful based on a known HTTP request:
http://kechengbiao.me/popular.json?token=EHFWUCVRRSKATAOHAGTBSR&locale=ch&from_app=true&version= 1.51
Since Firefox has Json-handle installed, the JSON data is parsed by default when the Web page is opened.
Use the Firefox plugin httperrequest to simulate sending and receiving JSON requests "go"