Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: zenmap as root error

Re: zenmap as root error

From: Fyodor <fyodor_at_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
Received on Apr 01 2008

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]