Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Apache uses POST data

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will give you a detailed explanation of how Apache uses POST data. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Test environment

WEB environment server, and deploy the SHOP system

Connect to the server using Xshell

Start testing.

Login.ab content, which needs to be crawled using the package grab tool when logging in. Here, I first use loadrunner to record and capture the recording code:

Web_submit_data ("user.php"

"Action= {ip} user.php"

"Method=POST"

"TargetFrame="

"RecContentType=text/html"

"Referer= {ip} user.php"

"Snapshot=t3.inf"

"Mode=HTML"

ITEMDATA

"Name=username", "Value= {userLoginText}", ENDITEM, / / login user name

"Name=password", "Value=123123", ENDITEM, / / login password

"Name=act", "Value=act_login", ENDITEM

"Name=back_act", "Value= {ip}", ENDITEM, / / return address after login

"Name=submit", "Value=", ENDITEM

LAST)

After analysis, we find that the key values are:

"Name=username", "Value= {userLoginText}", ENDITEM, / / login user name

"Name=password", "Value=123123", ENDITEM, / / login password

"Name=act", "Value=act_login", ENDITEM

OK, with these fields, we can use the tool to debug first. Here, we use postman to debug to see what the effect is. YES, successful, it seems that our data processing is effective, so we can deal with the content of login.ab, here is also a simple way, also through postman processing, less nonsense, look at the picture:

Then we copy the contents of the red area in the text box to login.ab. Then you can start the test, with the code:

Test commands:

Ab-n 10-c 10-k-p "/ root/login.ab"-T "application/x-www-form-urlencoded"http://192.168.219.130/xiaoqiangshop/user.php""

Explain the parameters a little bit:

-n requests Number of requests to perform

/ / the number of requests executed in the test session. By default, only one request is executed

-c concurrency Number of multiple requests to make

/ / the number of requests generated at a time. The default is one at a time.

-k Use HTTP KeepAlive feature

-p postfile File containing data to POST

/ / A file that contains data that requires POST.

-T content-type Content-type header for POSTing

/ / Content-type header information used by POST data.

Since the login data is tested, in order to see the test results intuitively, we select the last_login field in the data table, which records the latest login time. First, let's take a look at the original record of the database:

Execute a command

View the latest record

We were surprised to find that our test was successful and we successfully sent post data using the ab command.

This is the end of the article on "how Apache uses POST data". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report