On 09/01/2013 04:08 PM, John wrote: > result = popen(u'whois -h whois.cymru.com <http://whois.cymru.com> " -v > -f %s"' % IP).read() > should give the whois results however I am getting a zero size response > when run from the web, however when ran from term it works fine......
You are relying on the PATH variable for your executable which is, IIRC, set to only /bin by apache. Invoking /usr/bin/whois explicitly will remove that dependency and be considerably more secure to boot (there is no risk that a path be injected into your script and make it execute the wrong binary). -- Marc _______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
