1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00
Commit Graph

55 Commits

Author SHA1 Message Date
dmiller
f4619edece Update http urls for nmap.org to https 2015-11-05 20:41:05 +00:00
dmiller
a19e3e5c12 6.49SVN version bump 2015-06-07 15:53:49 +00:00
dmiller
68409b2226 Update copyright date to 2015 2015-06-03 13:01:29 +00:00
dmiller
a4dc1b8ff6 Update zenmap copyright date 2015-02-18 02:57:27 +00:00
dmiller
e81f9fba12 Better way of getting locale's encoding 2014-12-09 15:27:26 +00:00
dmiller
f10513b154 Make get_formatted_date return a unicode string instead of bytes 2014-12-09 14:18:02 +00:00
dmiller
5f7f87b74b Bump version from 6.46 to 6.47SVN 2014-08-29 18:43:18 +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
9de9c77d91 Make Zenmap use SIGTERM (instead of SIGKILL) for "Cancel Scan" so that Nmap has a chance to shutdown cleanly.
However, if Nmap is still running after 5 seconds, send a SIGKILL.
2014-06-28 09:59:00 +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
5e948636cd Speedup Zenmap a little further by using cStringIO in zenmap/zenmapCore/NmapParser.py whenever possible (using StringIO as fallback). 2014-06-09 13:35:34 +00:00
jay
28ab4a621d Rewrote some code in zenmap/zenmapCore/NmapParser.py to speed up opening of scans. Large scans open in seconds instead of hours now. 2014-06-09 06:29: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
fyodor
b23000e08e Update Nmap version number from 6.45 to 6.46 and regen docs 2014-04-18 04:36:33 +00:00
dmiller
d2009ab250 Prevent zenmapCore.NmapParser from looking up remote/system XML entities 2014-04-16 20:37:52 +00:00
fyodor
6bf513b42a Update Nmap version number from 6.41SVN to 6.45 and rebuild docs 2014-04-11 02:59:07 +00:00
dmiller
d39efbb2d8 Fix a DeprecationWarning in zenmap with python -3
DeprecationWarning: reduce() not supported in 3.x; use
functools.reduce()

functools.reduce was added in Python 2.6
2014-03-04 21:15:52 +00:00
dmiller
a72faf3906 Spellcheck on all Python files 2014-02-20 21:22:30 +00:00
dmiller
8a07146936 Define in-use-but-undefined ScriptDBSyntaxError
Subclassed SyntaxError to provide some useful info when this happens. It
was happening with unittest.nse because it wasn't part of any category.
Previously, this would crash Zenmap because ScriptDBSyntaxError was
undefined. Now it crashes because there's really a syntax error (fixed
in previous revision)
2014-01-21 22:17:16 +00:00
dmiller
55c7fb605f Improve performance of StringPool.unique
This saves a function call by using subclassing dict instead of using a
real dict. When a cache hit occurs, there is no overhead beyond a
standard dict lookup, which in most implementations is very fast. Cache
miss is similar performance to previous.

Also added a unittest for this functionality.
2014-01-15 15:37:25 +00:00
dmiller
2b2edabc80 Fix typo in Nmap XML parsing in zenmap 2014-01-14 23:18:30 +00:00
dmiller
4d5c493e8e PEP 8 style issues: space after comma, blank lines between defs 2014-01-09 22:33:29 +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
dmiller
51b143353b Replace == and != with is and is not for comparisons with None 2014-01-09 16:47:20 +00:00
dmiller
3c9eeb3608 Remove some unneeded imports of re, and compile one pattern 2014-01-08 23:09:32 +00:00
dmiller
5c662fffdc Apply PEP 8 style guidance to zenmap
Using the pep8 tool (https://pypi.python.org/pypi/pep8), fixed the
following style issues:

Count   Issue
11      E201 whitespace after '['
8       E203 whitespace before ','
41      E211 whitespace before '('
11      E221 multiple spaces before operator
61      E225 missing whitespace around operator
237     E231 missing whitespace after ':'
91      E251 no spaces around keyword / parameter equals
19      E261 at least two spaces before inline comment
41      E301 expected 1 blank line, found 0
200     E302 expected 2 blank lines, found 1
356     E303 too many blank lines (2)
563     E501 line too long (106 characters)
39      E701 multiple statements on one line (colon)
13      E702 multiple statements on one line (semicolon)
4       W291 trailing whitespace
2       W293 blank line contains whitespace
8       W391 blank line at end of file
21      W601 .has_key() is deprecated, use 'in'
2       W602 deprecated form of raising exception

The remaining issues are long lines due to very deep data structures. I
chose not to alter them, as it would involve backslash-continuation
where whitespace is not permitted:

./zenmapGUI/ScanInterface.py:323:80: E501 line too long (90 characters)
./zenmapGUI/ScanInterface.py:456:80: E501 line too long (84 characters)
./zenmapGUI/ScanInterface.py:464:80: E501 line too long (84 characters)
./zenmapGUI/ScanInterface.py:472:80: E501 line too long (122 characters)
./zenmapGUI/ScanInterface.py:479:80: E501 line too long (122 characters)
./zenmapGUI/ScanInterface.py:920:80: E501 line too long (94 characters)
./zenmapGUI/ScanInterface.py:923:80: E501 line too long (93 characters)
./zenmapGUI/MainWindow.py:575:80: E501 line too long (99 characters)
./zenmapGUI/MainWindow.py:906:80: E501 line too long (99 characters)
2014-01-08 19:50:22 +00:00
dmiller
dc0f5b592e Fix incorrect invocation of NmapParser in NetworkInventory.open_from_file 2013-12-20 22:13:28 +00:00
d33tah
ccd0c02a4c Add a lacking space in the license comment. The command I used to do this is:
for file in `grep "* including the terms and conditions of this license text as well.       \*" * -r --files-with-match `; do sed "s/\* including the terms and conditions of this license text as well.       \*/* including the terms and conditions of this license text as well.        */g" -i $file; done
2013-09-11 19:06:20 +00:00
david
4035012050 Remove the "" entry from search_keywords.
Having this entry made it appear as if there was a search criterion
named for the empty string; i.e., a string like ":foobar" would be
parsed as an operator "" with an argument "foobar". There was no match
function defined for the empty string, which led to this crash:

Version: 6.25
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zenmapGUI/ScanInterface.py", line 247, in filter_hosts
    self.inventory.apply_filter(filter_string)
  File "/usr/lib/python2.7/dist-packages/zenmapCore/NetworkInventory.py", line 502, in apply_filter
    if not self._match_all_args(host, operator, args):
  File "/usr/lib/python2.7/dist-packages/zenmapCore/NetworkInventory.py", line 452, in _match_all_args
    if positive != self.__getattribute__("match_%s" % operator)(host, arg):
AttributeError: 'FilteredNetworkInventory' object has no attribute 'match_'

I did some quick tests and plain keyword searching (with no colon) seems
to still work. I'm not sure why the "" entry was ever present.

Reported by Kris Paernell.
http://seclists.org/nmap-dev/2013/q3/38
2013-07-31 21:12:51 +00:00
fyodor
6e01ecd452 Update an email address, fix a typo, and slightly reword a sentence. 2013-07-30 00:02:00 +00:00
fyodor
b01fd55cb6 Change version number to 6.41SVN and regenerate auto-generated files such as man page, script.db, etc. 2013-07-29 06:00:07 +00:00
david
ec3536d31a Remove executable mode. 2013-06-21 23:13:51 +00:00
dmiller
c4c197b213 Fix @arg nsedoc parsing in Zenmap
Zenmap was only showing the first line of @arg nsedoc entries, since it
was capturing the contents with a regular expression, which ends at the
first newline. Fixed by simply returning the entire contents with the
first word (the name of the arg) stripped off.
2013-03-29 20:44:33 +00:00
david
b44d477344 Comment typo. 2013-01-04 18:59:44 +00:00
david
f86b575aa1 Remove -q (quash argv to "pine" option). 2013-01-04 18:59:11 +00:00
fyodor
6a42ef47c0 Update the Nmap and Nsock source code headers to note new Nmap dev mailing list email address and a better URL for Nmap license. 2012-12-06 01:21:42 +00:00
fyodor
e09125e010 Update CHANGELOG to note 6.25 release and also bumped up Nmap SVN version number to avoid confusion and rebuilt files accordingly 2012-11-29 23:40:26 +00:00
fyodor
ea05ae2586 Latest auto-generated files in prep for upcoming 6.20BETA1 release 2012-11-16 00:54:16 +00:00
dmiller
0c1fd3e9d9 Make all host filters case-insensitive
Also some cleanup of unused variables, other minor performance tweaks.
2012-09-13 20:24:19 +00:00
dmiller
74a750a855 Allow negative matching in Zenmap filters
nmap-dev thread: http://seclists.org/nmap-dev/2012/q3/788

Host filter and others can now take things like "os:!linux" to match
hosts without Linux OS.
2012-09-13 20:24:18 +00:00
david
f66691ee08 Remove some ancient commented SearchResult test code. 2012-09-12 21:51:48 +00:00
david
20742bdde0 Ignore failure of locale.getdefaultlocale.
This was reported to be a problem with the en_NG (Nigerian English)
locale by Kayode Adesina and Olisemeka Omo.

http://seclists.org/nmap-dev/2012/q2/965
http://seclists.org/nmap-dev/2012/q3/270

The underlying Python bug is this:

http://bugs.python.org/issue6895
2012-07-20 01:55:25 +00:00
david
aca56d8f6e Handle the special case of an empty services list.
There should be better error handling here in general, but an empty
string is something that Nmap can legitimately emit.
http://seclists.org/nmap-dev/2012/q2/876
2012-06-21 00:56:54 +00:00
fyodor
b70e4f71cf Bump the Nmap version number in SVN up to 6.02 2012-06-16 19:44:58 +00:00
jah
b47d946195 Fixed KeyError: 'osmatches', reported separately by Thomas Neumayer and Jan Reister. 2012-05-22 18:14:48 +00:00
fyodor
22c7faa94b move the svn version number up to 6.01 and rebuild 2012-05-22 09:51:42 +00:00
david
ec027e9085 Let get_best_osmatch keep the original XML ordering.
Ties in accuracy are broken by osmatches' relative position in the XML
file, because Nmap writes results in descending accuracy order.
2012-05-05 18:02:43 +00:00
david
cac71422e8 Make osclasses a substructure of osmatch. 2012-05-05 18:02:41 +00:00
david
be2e413914 Don't crash in the profile editor when script.db is missing. 2012-03-30 07:17:50 +00:00