os.system() problem in mod_python

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devoloperbattu
    New Member
    • May 2007
    • 1

    #1

    os.system() problem in mod_python

    in my project i have to nmap an ip give and in this code

    cmd = "nmap -O " + myip + "> /usr/local/apache2/htdocs/test/temp/tmp.txt"
    os.system(cmd)

    i scan for the os on the remote system.

    Iran this code in python it is working but when i run this in mod_python
    through apache it is not showing any errors but not giving the correct
    result.

    but the same cmd when changed like this ,
    cmd = "nmap -sP " + myip + "> /usr/local/apache2/htdocs/test/temp/tmp.txt"
    os.system(cmd)

    which is nothing but a ping scan of the ip
    It is working properly in mod_python also.
    but i want to detect the os .
    please help me.
Working...