<div dir="ltr">PS we even have issues between webservers, only about 1 in 3 requests using /usr/bin/whois actually works (Im just reloading the page each time) the rest result in getting nothing from the whois query. <br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 1, 2013 at 8:18 PM, John <span dir="ltr"><<a href="mailto:phoenixoverride@gmail.com" target="_blank">phoenixoverride@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Why are the variables different on different servers? this is just begging to cause headaches. Can we please stop murdering poor kittens and ensure things are uniform between the servers? See <a href="http://commons.wikimedia.org/wiki/File:Server-kitty.jpg" target="_blank">http://commons.wikimedia.org/wiki/File:Server-kitty.jpg</a><br>
</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Sep 1, 2013 at 8:14 PM, Marc A. Pelletier <span dir="ltr"><<a href="mailto:marc@uberbox.org" target="_blank">marc@uberbox.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 09/01/2013 04:08 PM, John wrote:<br>
> result = popen(u'whois -h <a href="http://whois.cymru.com" target="_blank">whois.cymru.com</a> <<a href="http://whois.cymru.com" target="_blank">http://whois.cymru.com</a>> " -v<br>
<div>> -f %s"' % IP).read()<br>
> should give the whois results however I am getting a zero size response<br>
> when run from the web, however when ran from term it works fine......<br>
<br>
</div>You are relying on the PATH variable for your executable which is, IIRC,<br>
set to only /bin by apache. Invoking /usr/bin/whois explicitly will<br>
remove that dependency and be considerably more secure to boot (there is<br>
no risk that a path be injected into your script and make it execute the<br>
wrong binary).<br>
<div><div><br>
-- Marc<br>
<br>
<br>
_______________________________________________<br>
Labs-l mailing list<br>
<a href="mailto:Labs-l@lists.wikimedia.org" target="_blank">Labs-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/labs-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/labs-l</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>