Dangerous programming
Posted
by
benhowdle89
on Programmers
See other posts from Programmers
or by benhowdle89
Published on 2011-03-01T10:08:45Z
Indexed on
2011/03/01
15:32 UTC
Read the original article
Hit count: 436
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!
© Programmers or respective owner