From b4c60f49e53b9b0397ba5941a0379ef69e65e707 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 20 Aug 2008 03:37:59 +0000 Subject: [PATCH] Canonicalize capitalization of protocol names. Generally we use capitalized forms in probes. When quoting from Nmap output we use whatever Nmap uses and enclose it in or similar tags. --- docs/refguide.xml | 10 +++++----- docs/scripting.xml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/refguide.xml b/docs/refguide.xml index b0c2f996e..613efa93f 100644 --- a/docs/refguide.xml +++ b/docs/refguide.xml @@ -631,7 +631,7 @@ you would expect. services simply ignore the empty packet and fail to return any response. This is why the default probe port is 31338, which is highly unlikely to be in use. A few services, such - as chargen, will respond to an empty UDP packet, and thus + as the Character Generator (chargen) protocol, will respond to an empty UDP packet, and thus disclose to Nmap that the machine is available. The primary advantage of this scan type is that it @@ -915,7 +915,7 @@ even if this option is not specified. These states are not intrinsic properties of the port itself, but describe how Nmap sees them. For example, an Nmap scan from the same network as the target may show -port 135/tcp as open, while a scan at the same time with the same +port 135/tcp as open, while a scan at the same time with the same options from across the Internet might show that port as filtered. The six port states recognized by Nmap @@ -1575,7 +1575,7 @@ way. Ports can also be specified by name according to what the port is referred to in the nmap-services. You can even use the wildcards * and ? with the names. For example, to scan - FTP and all ports whose names begin with http, use . + FTP and all ports whose names begin with http, use . Be careful about shell expansions and quote the argument to if unsure. Ranges of ports can be surrounded by square brackets to indicate @@ -1634,7 +1634,7 @@ way. Point Nmap at a remote machine and it might tell you - that ports 25/tcp, 80/tcp, and 53/udp are open. Using its + that ports 25/tcp, 80/tcp, and 53/udp are open. Using its nmap-servicesnmap-services database of about 2,200 well-known services,well-known ports @@ -1664,7 +1664,7 @@ way. database contains probes for querying various services and match expressions to recognize and parse responses. Nmap tries to determine the service protocol - (e.g. FTP, SSH, telnet, HTTP), the application name (e.g. ISC + (e.g. FTP, SSH, Telnet, HTTP), the application name (e.g. ISC BIND, Apache httpd, Solaris telnetd), the version number, hostname, device type (e.g. printer, router), the OS family (e.g. Windows, Linux) and sometimes miscellaneous details like diff --git a/docs/scripting.xml b/docs/scripting.xml index 25a096469..574a715ef 100644 --- a/docs/scripting.xml +++ b/docs/scripting.xml @@ -1223,7 +1223,7 @@ if(s) code_to_be_done_on_match end determined by Nmap's version scan or (if no version scan information is available) the service assigned to the port in nmap-services - (e.g. "http" for TCP port 80). + (e.g. "http" for TCP port 80). @@ -1654,7 +1654,7 @@ if(s) code_to_be_done_on_match end is used to provide the minimum number of bytes required for a read. lines does the same, but for the minimum number of lines. If neither are provided, these functions attempt to read as many bytes as are available. proto - is used to set the protocol to communicate with, defaulting to "tcp" if not provided. + is used to set the protocol to communicate with, defaulting to "tcp" if not provided. timeout is used to set the socket timeout (see the socket function set_timeout() for details). @@ -1809,7 +1809,7 @@ if(s) code_to_be_done_on_match end tcp{} and udp{}. tcp{} contains services indexed by TCP port numbers. udp{} is the same, but for UDP. - You can pass "tcp" or "udp" as an argument to + You can pass "tcp" or "udp" as an argument to parse_services() to only get the corresponding table. If bool is false, an error message is returned as the second value instead of the table. @@ -2099,7 +2099,7 @@ if(s) code_to_be_done_on_match end Defines the protocol of the port. Valid values are - tcp and udp. + "tcp" and "udp". @@ -2161,7 +2161,7 @@ if(s) code_to_be_done_on_match end service_tunnel - Contains the string none or ssl based on whether or not Nmap used SSL tunneling to detect the service. + Contains the string "none" or "ssl" based on whether or not Nmap used SSL tunneling to detect the service. @@ -3627,7 +3627,7 @@ end simple pattern matching syntax. Some protocols require a more complex approach, and a generalized scripting language is perfect for this. Skype v2 is one such protocol. It pretends to - be an http server, requiring multiple queries to determine its + be an HTTP server, requiring multiple queries to determine its true nature. NSE has been integrated into Nmap's version detection framework to handle these cases. The scripts which extend the version scanner belong to the reserved category @@ -3637,10 +3637,10 @@ end version scan. The following listing shows a simple script which demonstrates the use of the NSE version detection API. If either the TCP port 80 is open or the service has been determined to be - http, the script is triggered. Although it could be extended to - recognize different http servers, its only purpose is to show off + HTTP, the script is triggered. Although it could be extended to + recognize different HTTP servers, its only purpose is to show off the version detection API. It is not advisable to use NSE for - version detection in the simple case of http servers. The + version detection in the simple case of HTTP servers. The version detection variables have been filled with dummy entries to illustrate their effect on the Nmap output. @@ -3786,7 +3786,7 @@ require "shortport" We want to run the script against the finger service. So we -test whether it is using the well-known finger port (79/tcp), or +test whether it is using the well-known finger port (79/tcp), or whether the service is named finger based on version detection results or in the port number's listing in nmap-services.