First, based on the following purposes:
1, in order to increase the ability to understand the HTTP protocol, the request for the modification of QQ secret protection was analyzed.
2, in order to exercise Python's writing ability
3, the understanding of Web comprehensive knowledge
Took a little time to write this script, the following is the procedure for scripting
Second, analysis of the environment
1, the advantage of using Firefox,firefox than Chrome is that Firefox developer tools, the network module has the editing and re-send function, you can quickly verify that the package is correct
2, the use of Pycharm+python3.5,python network library rich, easy to write
3. Python Related Library
rsa==3.4. 2 requests= =2.10. 0 Tea= =0.0. 5 RSA= =3.4. 2 pyasn1= =0.1. 9
Third, the analysis process
1, a page contains documents, pictures, JS, CSS and other types of requests, pictures, JS, CSS types of requests generally do not contain logic.
2, for other types of requests, repeat two operations, if there are changing parameters, then this request may be a critical request
3, for the key request, the page has three ways to change the parameters, one is the URL parameters of the Get method, one is the parameters in the post body, and the parameters in the cookie, note that the parameter changes in the three places
4, it is possible that the status of the terminal request exists in the server, this kind can only rely on guessing
5, the code is divided into three steps: 1) Login State 2) Verify the Secret Insurance 3) modify the security
Iv. Problems in the analysis
Note that when you post data, you need to specify Content-type, which is usually the parameter type, which needs to grab the packet to get "application/x-www-form-urlencoded; Charset=utf-8 "
Five, the Code
Six, the code is inconvenient to share, can communicate and exchange.
qq:480071411
Use Python to modify QQ secret protection (script)