By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,898 Members | 1,183 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,898 IT Pros & Developers. It's quick & easy.

os.system() problem in mod_python

P: 1
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.
May 27 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.