Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zenmap "import os" crash in Nmap 7.90 Profile editor #2148

Closed
fyodor opened this issue Oct 8, 2020 · 2 comments
Closed

Zenmap "import os" crash in Nmap 7.90 Profile editor #2148

fyodor opened this issue Oct 8, 2020 · 2 comments
Labels

Comments

@fyodor
Copy link
Member

fyodor commented Oct 8, 2020

When profile editor is used in Zenmap 7.90 (multiplatform), Zenmap tends to crash with a traceback like:

Version: 7.90
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/zenmapGUI/ScriptInterface.py",
line 261, in script_list_timer_callback
callback(True, process)
File "/usr/lib/python2.6/site-packages/zenmapGUI/ScriptInterface.py",
line 270, in initial_script_list_cb
if status and self.handle_initial_script_list_output(process):
File "/usr/lib/python2.6/site-packages/zenmapGUI/ScriptInterface.py",
line 307, in handle_initial_script_list_output
basename = os.path.basename(filename)
NameError: global name 'os' is not defined

This was actually caused by "improvements" we made as part of our recent LGTM code quality efforts. We removed a bunch of "from X import *" statements for various libraries because those can pollute the namespace by importing way more than intended. But it turns out we were relying on one of those secondary imports then importing "os" itself. So we should fix this and also try to make sure there aren't other cases of this problem that we missed.

@fyodor fyodor added the Nmap label Oct 8, 2020
@fyodor
Copy link
Member Author

fyodor commented Oct 14, 2020

Update: this is now fixed in Nmap 7.91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@fyodor and others