exec() command not functioning in php

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have the following HTML code, which executes a PHP script.
<!--HTML CODE-->
<html><head><title>Vulneraility Scan</title></head>

<body><form method="POST" action="n2.php">
Host<input name="address" type="text" value="IP Address">
    <input type="submit" name="Submit" value="SCAN">
The PHP script is
        $ip = $_POST['address'];
        $com2="echo $ip > targets.txt";

                                                $com3="rm -rf
        echo "<br>This May Take Time";
        $com4="nessus -q -T html localhost 1241 j1 abcd targets.txt
        echo "<br>Finished";


I only see "This May Take Time " and "Finished" words on the screen,
the exec() commands do not execute.

Please Help

Re: exec() command not functioning in php

jzz wrote:
Quoted text here. Click to load it

That makes sense, because it's the only stuff you output.
Do you expect to see the output of the exec calls?
Then you should use something like:

exec($com4, $output);
echo $output;


Re: exec() command not functioning in php

Then what command do i use to see the output???

Site Timeline