Forum Moderators: coopster
My major concern of course is that I don't want any hacker to be able to run unix commands on my box. Anybody doing this sort of stuff in php scripts and you feel its relatively safe?
commandline="wget [somedomain.com...]
what if $number was input as ";rm -rf /;". That would then run the three commands:
wget [somedomain.com...]
rm -rf /
.gif
Of course, the first and last would fail, but the command line takes semicolons as command separators and would run the middle one. So, if you are depending on external input for the stuff you pass to the command line, make sure to validate it first. Otherwise, you are pretty safe.