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: Guilherme Polo <ggpolo_at_gmail.com>
Date: Tue, 1 Apr 2008 23:21:55 -0300

2008/4/1, Joćo Medeiros <ignotus21_at_gmail.com>:
> On Tue, Apr 1, 2008 at 10:52 PM, Guilherme Polo <ggpolo_at_gmail.com> wrote:
> > But, for PyGtk 2.8 and earlier I would suggest doing this in a
> > different manner (and much simpler and less error-prone):
> >
> > try:
> > import gtk
> > except ImportError, e:
> > print e
> >
> > For PyGtk 2.10 and newer, ImportError is actually a warning so the
> > code changes a bit:
> >
> > import warnings
> > warnings.filterwarnings('error', module='gtk')
> > try:
> > import gtk
> > except Warning, w:
> > print w
> > warnings.resetwarnings()
> >
>
>
> I think that just display the an eventually warning is not enough. We
> have to leave segfault.

If this Warning happens, it implies the gtk engine couldn't start and
the app wouldn't run anyway (or could try and segfault). Also, you
could just call exit after your print that message, it was just a
correct template on how to proceed when importing gtk fails.

> By this way we have to check if the waring is
> associated to display too.

Why ? Just checking for DISPLAY, like you proposed, doesn't solve this.

>
> Att, Joćo Medeiros.
>

-- 
-- Guilherme H. Polo Goncalves
_______________________________________________
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 ]