|
Posted by Matt on 05/27/07 17:54
Schraalhans Keukenmeester wrote:
> At Sun, 27 May 2007 08:03:29 -0700, Matt let h(is|er) monkeys type:
>
> If you tried the example I posted I have no explanation why it won't work.
> It definitely does on my local machine AND my isp's server. You're running
> on a Linux box or...?
>
> Sh.
Yes, unfortunately I just get the end result printed when going through
a browser. Running the script through CLI seems like it prints each
line separately.
I would like each line printed because if I were to perform a 100 count
ping, I may want to see a running result at count 20 as opposed to
waiting the 30 seconds or so time it takes for all 100 pings to complete.
As far as the security warning you elaborated on, I added the following:
$ping_ip_addr = escapeshellcmd($_GET['Host']);
[snip....]
if (preg_match("$regex", $ping_ip_addr) OR preg_match("$regex2",
$ping_ip_addr)) {
exec($ping, $result);
else....fail.
Am I headed the right direction in securing my script? I do prefer it
being a GET since I do want the option of having users modify the url as
opposed to always entering values on the form.
Thanks again!
Matt
Navigation:
[Reply to this message]
|