近来看到了一个巧妙地方法,原理是
$var_a ='var_b';
$$var_a ='test';
则echo $var_b;为'test'
因此可以这样处理
复制代码 代码如下:
foreach(array('_COOKIE', '_POST', '_GET') as $_request)
{
foreach($$_request as $_key => $_value)
{
$_key{0} != '_' && $$_key = addslashes($_value);
}
}
这样像test.php?name=name_in&pwd=pwd_in
你就可以直接用$name,$pwd
来引用客户端发送的数据。
注意:这里对客户发送的变量用addslashes()进行了过滤。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download
The most popular open source editor

WebStorm Mac version
Useful JavaScript development tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
