Nmap Development mailing list archives

Re: zenmap as root error


From: Fyodor <fyodor () insecure org>
Date: Tue, 1 Apr 2008 18:43:12 -0700

On Tue, Apr 01, 2008 at 10:29:14PM -0300, João Medeiros wrote:
You can just check if the DISPLAY environment variable is set. Like this:

----------------------------------------8<----------------------------------------
import os
import sys

if 'DISPLAY' not in os.environ.keys():

    print "Unable to start graphical application. Please, set DISPLAY \
environment variable."
    sys.exit(0)

Thanks, but have you tested this?  One problem is that I'm guessing it
would break Zenmap on Windows.  It might cause trouble on other
platforms too.  I think we need someone who can reproduce the
segmentation fault issue to find a more direct way to solve the
problem.  It is OK for Nmap to quit in this case, we just need a
better error than segmentation fault.  On my systems, I do get a
better error message (exception) from Zenmap.  For example, what if
DISPLAY is set but it is wrong?  Then someone might get a segmentation
fault despite this $DISPLAY check.

Cheers,
-F


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: