因此,我的脚本允许人们将内容写入 .txt 文件并将其保存在服务器上。他们目前可以写任何他们想写的东西。这是我用来保存文件的方法。
<?php
$victim = $_POST['victim'];
$user = $_POST['user'];
$comment = $_POST['comment'];
$IP = $_POST['IP'];
$data = "$victim | $user | $comment | $IP\n";
//open the file and choose the mode
$fh = fopen($victim.".txt", "a");
fwrite($fh, $data); //close the file fclose($fh);
print "User Submitted";
echo "URL is mysite.com/".$victim.".txt"
?>
我的问题是——他们能写出什么会破坏我的服务器工作方式的东西吗?