Recently, I was studying PHP. When I learned how to set and send cookies, the form sending method was "Post". When I saw the post, it was not calm. So I decided to know how to make the custom POST request successfully sent, so that I could control it myself!
Process:
1. During the first loading, the cookie is not set because no name is input.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/7E/wKiom1RSDD3hFninAAEuYiOI37A978.jpg "Title =" 1.png" style = "float: none;" alt = "wkiom1rsdd3hfninaaeuyioi37a978.jpg"/>
2. After we enter name in the form, the POST request will send the parameter. Here, the value of the form name input box is used as the cookie.
3. We can see that when we submit a form, the cookies are recorded on firebug. Its value is exactly the value in our name input box!
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/7E/wKioL1RSDJaSWyfbAAFSp87MRLI942.jpg "Title =" 2.png" style = "float: none;" alt = "wkiol1rsdjaswyfbaafsp87mrli942.jpg"/>
Before imitating the POST request, we first intercept the POST request with tamperdata. "Uname = input value" appears in the httpheader postdata"
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/7E/wKioL1RSDJfyIbRGAAFbRfBvumI363.jpg "Title =" 4.png" style = "float: none;" alt = "wkiol1rsdjfyibrgaafbrfbvumi363.jpg"/>
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/7E/wKiom1RSDD_ivtYBAAF1yholN0A704.jpg "Title =" 5.png" style = "float: none;" alt = "wkiom1rsdd_ivtybaaf1yholn0a704.jpg"/>
The following describes how to simulate the POST request. If there is no plug-in, you can search for it by extension! The following section lists the operations we want to perform!
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/7E/wKioL1RSDJjRkcSKAAIvLgWEaO8389.jpg "Title =" 6.png" style = "float: none;" alt = "wkiol1rsdjrkcskaaivlgweao8389.jpg"/>
1. Enter the URL we want to request
2. Add a "key-Value Pair" on the parameters tab, enter the "uname" found in the previous step, and enter any value for the value.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/7E/wKiom1RSDECjnrmUAAGPLPpvbCI656.jpg "Title =" 7.png" style = "float: none;" alt = "wkiom1rsdecjnrmuaagplppvbci656.jpg"/>
3. Switch to the "content to send" tab. You can see that there is an option body from parameters, which is blank before you click it!
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/7E/wKioL1RSDJqQAHTwAAG84EhSXLQ049.jpg "Title =" 8.png" style = "float: none;" alt = "wkiol1rsdjqqahtwaag84ehsxlq049.jpg"/>
After clicking, the key-value pairs we enter in "Parameters" will appear on the tab of the sent content! Other poster values will be automatically filled in for us!
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/7E/wKioL1RSDJqzFnQTAAGqprjaDnA499.jpg "Title =" 9.png" style = "float: none;" alt = "wkiol1rsdjqzfnqtaagqprjadna499.jpg"/>
4. Select post in the sending method. We can see that! The cookie option in firebug shows the cookie value we set for sending our own request.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/7E/wKiom1RSDEKjJPyoAAIo9Ie6LAA513.jpg "Title =" 10.png" style = "float: none;" alt = "wkiom1rsdekjjpyoaaio9ie6laa513.jpg"/>
At this point, our introduction to the poster plug-in is complete!
Finally, I want to add some content. If you do not know where to open poster and tamperdata (if you have installed them)
1. Open them in the toolbar.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/7E/wKiom1RSDD6hcK4uAAD9Mm37igY988.jpg "Title =" 3.png" style = "float: none;" alt = "wkiom1rsdd6hck4uaad9mm37igy988.jpg"/>
This article is from the "and enjoy" blog, please be sure to keep this source http://skytina.blog.51cto.com/6834539/1569822
POST request of poster of Firefox