1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-22 07:29:01 +00:00
Commit Graph

3106 Commits

Author SHA1 Message Date
david
1073c8283a Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
david
4c5e79b05d In nmap-os-db, change references to MontaVista Linux to emphasize that it's embedded. 2008-09-17 22:32:13 +00:00
david
844467d410 Add jah's enhanced ASN.nse that consolidates answers and gives up if the DNS
server is uncooperative.
2008-09-16 17:35:44 +00:00
david
f40f6e9549 Don't use CXXFLAGS when making makefile.dep, because that doesn't work with
universal binaries. Instead, put -DNOLUA in CPPFLAGS.
2008-09-16 04:25:39 +00:00
david
2f44d6238a Add Ncat to the package maker XML files. 2008-09-16 04:17:32 +00:00
david
4ef8b352e7 Export ncat in the export-% rule. 2008-09-16 04:07:02 +00:00
kris
58057e4b07 Copying over nsis changes for adding Ncat to the Windows installer.
Somehow I missed some Windows changes but not others...
2008-09-16 02:04:33 +00:00
kris
c74ce1f424 Adding Ncat to /nmap. This should have Ncat in the regular build systems for
Windows and UNIX, and install/distro system for the source tarball, RPM, OS X
installer (thanks to David) and the Windows installer.

configure --without-ncat keeps it out on Unix
2008-09-16 01:34:28 +00:00
david
e9f556f519 Fix a typo in docs/nmap-install.xml: "should wor" -> "should work". 2008-09-16 00:26:47 +00:00
david
3a6873fcbf Automatic update of version numbers in mswin32/nmap.rc and
mswin32/nsis/Nmap.nsi.
2008-09-15 19:18:58 +00:00
fyodor
2c00352b8e make timing a little more conservative 2008-09-15 19:05:00 +00:00
david
3121ac156d Make DNS timeouts dependent on the timing template. Patch by jah. See
http://seclists.org/nmap-dev/2008/q3/0702.html.
2008-09-15 18:56:54 +00:00
david
f054d25d1f Adjust the categories of the new SMB scripts. Also fix a couple of
documentation typos.

smb-os-discovery.nse
-categories = {"version","default"}
+categories = {"default", "discovery", "safe"}
 
smb-enum.nse
-categories = {"version","intrusive"}
+categories = {"discovery", "intrusive"}
 
smb-security-mode.nse
-categories = {"version"}
+categories = {"discovery", "safe"}
2008-09-15 18:10:00 +00:00
david
9eff25bbc4 Add Ron Bowes's netbios and smb NSE modules and new scripts that use them. They
were introduced in http://seclists.org/nmap-dev/2008/q3/0827.html.
2008-09-15 17:58:38 +00:00
david
db49b425c1 Remove a debugging function, stack_dump, that I used to step through NSE code.
Something like it should remain a part of NSE, because it helped me to see what
was in the Lua stack inside GDB. I got the function from
http://www.lua.org/pil/24.2.3.html.
2008-09-15 06:43:16 +00:00
david
5c6c52b77f CHANGELOG entry:
o A script could be executed twice if it was given with the --script
  option, also in the "version" category, and version detection (-sV)
  was requested. This has been fixed. [David]
2008-09-15 06:41:03 +00:00
david
43eed4b67b Use a global table of loaded script file names, and don't load a script if its
file name is already in the table. Previously duplicates were only checked for
in a table that was an upvalue of the entry function, allowing duplicates to
sneak in elsewhere.

This prevents a script from being loaded twice when it is given by name, and is
in the "version" category and version detection is used.
2008-09-15 06:38:08 +00:00
david
3cf57e7009 Improve some documentation in nse_init.cc, because it took me a really long
time to understand some functions.
2008-09-15 05:16:01 +00:00
fyodor
baeb3093a7 small typo fix from Matt Selsky 2008-09-13 23:59:26 +00:00
kris
2123310bf8 Remove comment and bytes=1 from dns-safe-recursion*.nse. The scripts were
sent to nmap-dev before the Comm update to default to bytes=1, but added after
the change.  I tested the scripts out and they still work fine of course.
2008-09-13 17:20:17 +00:00
fyodor
fc4424ef21 Add CXXFLAGS to the makefile.dep creation rule to catch defines such as -DNOLUA which prevents files from trying to include the liblua includes. Suggested by Simon Zilliken 2008-09-13 07:16:35 +00:00
fyodor
cdec5e8958 Add a couple includes which are needed for Philip's nwe get_dns_servers function prototype 2008-09-13 07:13:33 +00:00
david
681296f2c8 Bring back the section on compiled NSE modules and turn it into a how-to for
static modules.
2008-09-13 00:26:00 +00:00
david
f35d3e9440 Remove a \r\r that could be printed by showSMTPversion.nse. 2008-09-12 21:39:48 +00:00
david
0d372367c0 Remove "\r\r" in script output. If you print "\r\n", the Windows C library will
transform it to "\r\r\n". So we just print "\n" with no special case for
Windows.
2008-09-12 21:33:14 +00:00
david
6da849fba7 Remove mention of /usr/local/libexec from macosx/README. 2008-09-12 19:47:03 +00:00
david
94ff6871d8 Remove bogus clean-nmap and clean-zenmap targets from macosx/Makefile. 2008-09-12 19:10:01 +00:00
david
1e02a88e1f Reorganize macosx/Makefile to make it easier to add in new packages like Ncat
and Ndiff.
2008-09-12 19:06:41 +00:00
fyodor
c95a9935bb latest generated files 2008-09-12 08:22:09 +00:00
fyodor
f55b9364ab Undo OpenSSL-in-rpms change for right now. My build systems don't have libkrb5.a, which is used by my openssl libraries and needed
to compile statically against them.  So I need to either build a libkrb5.a or a version of openssl which doesn't depend
on Kerberos.
2008-09-12 08:21:51 +00:00
sven
9a6d9beaa5 bugfixes and typo fixes for datafiles.lua by jah:
- not returning services in the same fashion as parse_services(protocol) did
 - bad logic prevented parse_file( filename, { } ) from returning an array 
   of lines where filename was one of Nmap's data files (as it does for
   other files)
 - creating a table key with a value of nil when the pattern for the key
   matches, but the pattern for the value doesn't - this was made most
   obvious by the recent changes as it prevented them returning the correct
   data
2008-09-12 07:14:25 +00:00
sven
7e74e443be datafiles.lua:
- make get_array() and get_assoc_array() normal functions
 - move nmap.fetch_file() call to read_from_file()
 - remove constraining input checks
2008-09-12 07:02:24 +00:00
fyodor
143aded2b7 Update version number to 4.76 in prep for release 2008-09-12 05:58:06 +00:00
fyodor
5dc35c62e4 Changelog updates in prep for 4.76 release 2008-09-12 05:50:27 +00:00
david
55bb052653 Fix a crash that could occur if an Nmap XML file has a trace element without
any hop elements inside. I don't know how that happened, but we got a crash
report.
2008-09-12 05:43:35 +00:00
fyodor
fb1c9ce619 o Nmap's Windows self-installer now correctly registers/deletes the
npf (Winpcap) service during install/uninstall. Also the silent
  install mode was improved to avoid a case where the Winpcap
  uninstaller was (non-silently) shown. [Rob Nicholls]
2008-09-11 19:41:13 +00:00
david
e83052588c Add CHANGELOG entries for recent Zenmap crash fixes and the "external" script
category.
2008-09-11 17:13:42 +00:00
david
20853ec49f Make xml_convert escape any character > 0x7F, and use xml_convert to escape the
value of the "args" attribute.

On Windows, I created a user account with the name "Kurt Gödel". When I ran a
scan in Zenmap, Nmap created a temporary XML file that started like

<?xml version="1.0" ?>
<?xml-stylesheet href="nmap.xsl" type="text/xsl"?>
<!-- Nmap 4.75 scan initiated Wed Sep 10 11:16:58 2008 as: nmap -T4 -F -oX c:\docume~1\kurtgö~1\locals~1\temp\zenmap-bcbuy6.xml 192.168.0.1 -->
<nmaprun scanner="nmap" args="nmap -T4 -F -oX c:\docume~1\kurtgö~1\locals~1\temp\zenmap-bcbuy6.xml 192.168.0.1" start="1221067018" startstr="Wed Sep 10 11:16:58 2008" version="4.75" xmloutputversion="1.02">

Notice the ö characters in the file names. They were not in UTF-8 but probably
whatever the filesystem encoding is. Because Nmap's XML does not declare an
encoding, it defaults to UTF-8, meaning this particular file was not even
well-formed. In Zenmap it caused a crash like

CRASH REPORTED:
SYS.PLATFORM: win32
OS.NAME: nt
Zenmap Version: 4.75
TRACEBACK:
Traceback (most recent call last):
  File "C:\cygwin\home\david\nmap\zenmap\zenmapGUI\ScanNotebook.py", line 387, in verify_execution
    self.load_from_command(scan)
  File "C:\cygwin\home\david\nmap\zenmap\zenmapGUI\ScanNotebook.py", line 400, in load_from_command
    parsed = self._parse(command.get_xml_output_filename())
  File "C:\cygwin\home\david\nmap\zenmap\zenmapGUI\ScanNotebook.py", line 444, in _parse
    parsed.parse_file(file_to_parse)
  File "C:\cygwin\home\david\nmap\zenmap\zenmapCore\NmapParser.py", line 749, in parse_file
    self.parse(f)
  File "C:\cygwin\home\david\nmap\zenmap\zenmapCore\NmapParser.py", line 743, in parse
    self.parser.parse(f)
  File "c:\Python25\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "c:\Python25\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "c:\Python25\lib\xml\sax\expatreader.py", line 211, in feed
    self._err_handler.fatalError(exc)
  File "c:\Python25\lib\xml\sax\handler.py", line 38, in fatalError
    raise exception
SAXParseException: c:\docume~1\kurtgö~1\locals~1\temp\zenmap-bcbuy6.xml:3:92: not well-formed (invalid token)

Plus Internet Explorer wouldn't even open it.

This change escapes the XML so it looks like

<?xml version="1.0" ?>
<?xml-stylesheet href="nmap.xsl" type="text/xsl"?>
<!-- Nmap 4.75 scan initiated Wed Sep 10 11:52:19 2008 as: nmap -PE -PA21,23,80,3389 -A -v -T4 -oX c:\docume~1\kurtg&#xF6;~1\locals~1\temp\zenmap-zih7f5.xml 192.168.0.1 -->
<nmaprun scanner="nmap" args="nmap -PE -PA21,23,80,3389 -A -v -T4 -oX c:\docume~1\kurtg&#xF6;~1\locals~1\temp\zenmap-zih7f5.xml 192.168.0.1" start="1221069139" startstr="Wed Sep 10 11:52:19 2008" version="4.75" xmloutputversion="1.02">
2008-09-10 18:32:35 +00:00
david
ab4c4c141e Remove Psyco from the list of dependencies in mswin32/buildguide.txt. 2008-09-09 23:34:34 +00:00
david
d6e3760151 Add HTTP_open_proxy.nse to the external script category, because it potentially
involves traffic between the target and a third-party host. It's fairly
innocuous because there's no third-party traffic from the scanning computer, so
I left it in the default category.
2008-09-09 17:10:45 +00:00
david
b491d82218 Document the external script category in docs/scripting.xml. 2008-09-09 17:01:12 +00:00
sven
711223b6fe change datafiles.lua to use nmap.fetch_file() directly 2008-09-09 16:55:05 +00:00
sven
11d2f1c6f0 replace deprecated use of luaL_openlib with luaL_register
This fixes a build problem when LUA_COMPAT_OPENLIB is not defined
2008-09-09 13:23:14 +00:00
sven
5e4d342ce7 change classification of nginx from http-proxy to http 2008-09-09 11:46:34 +00:00
fyodor
bb9ea123e2 o Nmap's Windows self-installer now checks whether the MS Visual C++
runtime components have already been installed to avoid running it
  again (which doesn't hurt anything, but slows down
  installation). [Rob Nicholls]
2008-09-09 07:26:53 +00:00
david
06c7264e2e Put the following scripts in the new "external" category:
ASN.nse
dns-safe-recursion-port.nse
dns-safe-recursion-txid.nse
ripeQuery.nse
whois.nse
2008-09-09 05:13:24 +00:00
david
25cb95db56 Make configure fail with an error if the user requests --with-openssl (without
giving a directory) and OpenSSL is not found. This is meant to guard against
mistakenly building an RPM without OpenSSL on a machine where it is not
available.

If you don't give any arguments, configure still works the same way: it checks
for OpenSSL and doesn't use it if it's not present. If you use
--with-openssl=DIR or --without-openssl then configure takes you at your word
without checking anything. If you say --with-openssl and OpenSSL is fine then
Nmap is built with OpenSSL. The only difference this change introduces is if
you say --with-openssl and OpenSSL is not found. Now the configure script
quits, where previously it would continue with a warning.
2008-09-08 23:37:03 +00:00
david
f3d8cf7674 Build RPMs with OpenSSL support. nmap.spec.in says --with-openssl explicitly,
because I want it to fail if OpenSSL isn't available, but it doesn't do that
yet.
2008-09-08 23:08:18 +00:00
david
da312ac02e Remove a debugging statement from brutePOP3.nse. 2008-09-08 19:32:16 +00:00
david
da19b9a23d Fix an assertion failure where raw TCP timing ping probes were wrongly used
during a TCP connect scan:
nmap: scan_engine.cc:2843: UltraProbe* sendIPScanProbe(UltraScanInfo*, HostScanStats*, const probespec*, u8, u8): Assertion `USI->scantype != CONNECT_SCAN' failed.
2008-09-08 15:53:32 +00:00