1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-10 09:49:05 +00:00
Commit Graph

74 Commits

Author SHA1 Message Date
dmiller
ef52628bbc Remove unused variable. #1834 2020-01-01 23:04:52 +00:00
dmiller
c89035b6dd Avoid 'import *' where __all__ not defined. #1834 2019-12-30 15:54:34 +00:00
dmiller
d75e255113 Avoid handling BaseException, so SysExit and KeyboardInterrupt are propagated. #1834 2019-12-30 06:46:36 +00:00
dmiller
02212559d2 Delete unused variables and unreachable statements. #1834 2019-12-30 06:46:33 +00:00
dmiller
33aca7c8f5 Avoid using for/else when loop doesn't break. #1834 2019-12-30 06:46:32 +00:00
dmiller
d3267a93c4 Fix a crash, config_parser referenced before assignment. 2019-12-30 05:05:39 +00:00
dmiller
085cd7fd34 Suppress unused import LGTM.com alert for I18N
I18N installs the `_` function into the builtin namespace, so it looks
like it's unused when it's not. #1834
2019-12-30 00:53:25 +00:00
dmiller
92270f313e Fix some 'import *' messiness. #1834 2019-12-29 19:56:26 +00:00
dmiller
2a0c1eca5c Remove unused variables. #1834 2019-12-29 19:28:56 +00:00
dmiller
fa7cdb2c9f Remove unneeded delete (var goes out of scope). #1834 2019-12-29 15:57:31 +00:00
dmiller
92bf83aaba Remove unused imports 2019-12-28 02:42:14 +00:00
dmiller
162aa15d25 Delete unreferenced file. 2019-12-20 19:37:40 +00:00
dmiller
6a971163ac Fix calls to super from old-style classes. 2019-12-20 19:36:48 +00:00
dmiller
d0c61b9cbb Avoid DeprecationWarning due to accessing BaseException.message 2019-12-19 05:25:21 +00:00
dmiller
260fa12cce Fix up some unused test code to silence LGTM. See #1834 2019-12-16 05:55:46 +00:00
dmiller
fa0353badd Fix 'Missing call to __init__ during object initialization' from LGTM. See #1834 2019-12-16 05:55:45 +00:00
dmiller
ff61845ce2 Avoid encoding errors in exception handler. See #1839 2019-12-10 20:51:56 +00:00
dmiller
d639a53088 Bump copyright date in license headers 2019-05-28 21:36:04 +00:00
dmiller
bff7dcad4e Avoid crashing when PATH contains non-ascii/utf-8. Decode if possible 2018-11-15 16:23:32 +00:00
dmiller
adfc39f4f3 Fix crash when using dir: operator 2018-11-15 05:03:46 +00:00
dmiller
f45da78f5b Catch a file error when saving recent scans. Fixes #1177 2018-04-09 16:17:09 +00:00
fyodor
ff62300249 Bump copyright dates to 2018 and slightly improve wording (doesn't change meaning) of Nmap license header text 2018-01-28 21:18:17 +00:00
dmiller
9c7ea727a7 Update license terms for 2017 2017-06-07 12:32:38 +00:00
dmiller
4a42504cc2 Fix a crash with non-ascii paths. Fixes #638 2017-02-05 05:56:20 +00:00
dmiller
7760fdf7b4 Zenmap: catch error when no temp directory is found. Fixes #639. Closes #640. Closes #641 2017-01-12 14:53:06 +00:00
dmiller
cb8904ebae Update license headers 2016-12-29 17:18:02 +00:00
dmiller
20de140ae6 Fix file permissions again for zenmap.conf. Handle it in one place only. 2016-10-17 16:14:58 +00:00
dmiller
fd37e977c9 Avoid crashing if we can't write to zenmap.conf. Fixes #449 2016-08-31 15:21:23 +00:00
vincent
d0774e7ed5 Closes #342 by thebinarymutant: Fix semantic for python3 2016-07-01 10:37:25 +00:00
dmiller
6e33d6ac3c Bump date in copyright headers 2016-04-04 15:38:44 +00:00
dmiller
30e9e9fd84 Optionally repair broken zenmap.conf
First, make sure we don't have residual junk configs, resulting in ConfigParser
values coming back as lists instead of strings. Then offer the user the option
to copy the global config file, which should be uncorrupted.
2016-03-29 14:26:38 +00:00
dmiller
3567d72b17 Fix pep8 errors in all of zenmap 2015-12-11 23:11:47 +00:00
dmiller
24f5f35d3e Remember zenmap window geometry. Closes #247. Closes #239. 2015-12-11 23:11:45 +00:00
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
15eb10e9fb Fix a crash in Zenmap Compare Results. 2015-09-23 20:23:00 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
41e06e9e9c Fix saving of host comments in Zenmap. Fixes #133
Sometimes (all the time?) hosts are "cloned" or deep-copied instead of being
copied by reference, so testing whether a host is "in" a scan is insufficient.
Now we check by address, the same way that Zenmap uses to determine 2 hosts are
the "same" for merging their output.

Also, avoid considering a scan as having unsaved changes if the comment field is
merely focused but unchanged.
2015-05-31 02:47:26 +00:00
dmiller
5adfb3b1de Update copyright notice to 2014 2014-08-16 01:52:33 +00:00
fyodor
f6f59a7cd7 Auto regeneration with latest template files, etc. 2014-08-13 22:57:43 +00:00
jay
2b30085d90 Catch Zenmap's MemoryError (caused by large Nmap Output) and provide the user a more useful error message so that we get less of the out-of-memory "crash reports" 2014-07-01 16:53:10 +00:00
dmiller
ec9074f718 Correct "it's" to "its" where necessary
it's = it is
its = belonging to it
2014-06-19 04:58:46 +00:00
jay
f29a494d2b Modifying r32985 based on Henri Doreau's comment
"For sequences, (strings, lists, tuples), use the fact that empty
sequences are false." PEP-0008 says[1].

[1] http://legacy.python.org/dev/peps/pep-0008/
2014-06-10 09:15:20 +00:00
jay
2274fa2461 Updated some code in zenmap/zenmapGUI/DiffCompare.py and zenmap/zenmapGUI/ScanNmapOutputPage.py to work properly with the code from r32983 2014-06-10 08:21:57 +00:00
jay
381bf2fd23 Correct a bug in the code for NmapOutputViewer.go_to_host that was put in revision 32936.
The following steps caused the bug with the r32936 code:
    1. Start a scan (say Quick Scan for simplicity) for a certain target (say A)
    2. Wait for scan to complete
    3. Start a scan for a different target (say B).
    4. Wait for scan to complete
    5. Click on host A in the Hosts list on the left (while scan B is still visible on the right)
    6. BOOM!
2014-06-04 11:41:29 +00:00
dmiller
f51de3bc0e Make NmapOutputViewer.go_to_host more efficient
Instead of loading the entire output into a new string with
gtk.TextBuffer.get_text, we use the gtk.TextIter.forward_search method.
This works because we don't need to use regular expressions to find a
static string.
2014-06-03 17:22:20 +00:00
dmiller
2f23d996bd Prevent PyXML from importing, causing crashes
http://seclists.org/nmap-dev/2014/q2/318

Essentially, we import the xml name, then override its search path,
stripping out the _xmlplus paths that PyXML uses. This leaves only the
Python 2 standard library path, which is what Zenmap was written for.
2014-05-21 03:53:58 +00:00
dmiller
b09926a241 Fix crash in Zenmap DiffViewer
http://seclists.org/nmap-dev/2014/q2/185
2014-04-23 12:10:49 +00:00
dmiller
a72faf3906 Spellcheck on all Python files 2014-02-20 21:22:30 +00:00
dmiller
8b70dfa0a4 Replace exception-as-flow-control pattern
In general, it's better to use explicit flow control than to throw
and/or catch generic exceptions. Example:

try:
    thing = d["key"]
except:
    pass

This 1. catches an inspecific exception (probably KeyError), 2. can be
replaced with a check for ("key" is in d), and 3. can often be replaced
with d.get("key", some_default_value).
2014-01-13 15:37:39 +00:00
dmiller
314a519dfc Delay loading modules and objects until gettext is loaded
This was resulting in strings not getting translated, especially when
the calls to gettext came at the lowest indent level of the module.
2014-01-09 22:27:15 +00:00