Dangerous programming
- by benhowdle89
Ok, i'm talking pure software/web, i'm not on about code to power Life Support machines or NASA rockets.
In terms of software/web development what is the most dangerous single piece of code someone could put into a program (say if they had a grudge against a client/employee)
In PHP, the first thing that comes to mind is some sort of file deletion:
function EmptyDir($dir) {
$handle=opendir($dir);
while (($file = readdir($handle))!==false) {
echo "$file <br>";
@unlink($dir.'/'.$file);
}
closedir($handle);
}
EmptyDir('images');
Or a PHP script that takes a user's sensitive input and posts it to Google sitemap or something?
I hope this doesnt get closed off as subjective as there surely must be a ranking order of dangerous code. So i'm asking for the No.1 spot :)
DISCLAIMER: I have no grudges against anyone, just curious for the answer!