WoYiGuis BLoG
I. Description
This program is used to prevent Riding/CSRF attacks.
Ii. Usage
First download the system: http://projects.playhack.net/project.php? Id = 3, and then include the file in the PHP page to be prevented. If my form file is seride_test.php and my form is seride_recv.php, then I can do this:
Seride_test.php:
<? PHP
Include ("seride. php ");
?>
<Div align = "center">
<Form name = "login" action = "seride_recv.php" method = "POST">
<Input name = "test" type = "text">
<Input type = "submit">
<? = Seride_form ();?>
</Form>
</Div>
First include the seride. php file, and thenJoin One row. Check in seride_recv.php:
Seride_recv.php:
<? PHP
Include ("seride. php ");
Seride_check ();
Echo $ _ POST [test];
?>
When we use seride_test.php to submit a table normally, the page is normally executed. If we create a seride_test.html page, the content is as follows:
<Div align = "center">
<Form name = "login" action = "seride_recv.php" method = "POST">
<Input name = "test" type = "text">
<Input type = "submit">
</Form>
If you submit an external form, the browser will return the following information:
This effectively prevents CSRF attacks.