how could i use this module to call nmap and show result in my page

Comments

doq’s picture

command_run("nmap");

Result will be outputted as message (drupal_set_message()) and will be logged to watchdog.

haojiang’s picture

sorry to borther you again
in my theme , i create a page call "page-command.tpl.php" and in this page , it contains

<?php
command_run("nmap");
print_r(drupal_set_message());
?>

or

<?php
command_run("nmap");
?>

but just nothing seems to correlate to the command "nmap " show in my normal command like.
did i missunderstand the module , where can i found my results?

right now i want to have command_run("dir"); to show one of my folder's tree out in page "xxx.com/command"
how to?

doq’s picture

Just use php exec() function.