Home page logo
/

nmap-dev logo Nmap Development mailing list archives

[NSE] More shortport.port_or_service problems
From: Jost Krieger <Jost.Krieger+nmap () rub de>
Date: Thu, 3 Feb 2011 12:09:35 +0100

[This is my first post, so please bear with me.]

It seems there are more scripts mistaking functions for their calls:

1.
dns-zone-transfer.nse runs against all ports, which I noticed because I
found a working "chargen" port and nmap didn't come back.

This patch seems to fix it:

--- scripts/dns-zone-transfer.nse       2011-01-31 11:44:26.000000000 +0100
+++ /usr/local/share/nmap/scripts//dns-zone-transfer.nse        2011-02-03 11:42:04.000000000 +0100
@@ -112,7 +112,7 @@
 end
 
 portrule = function(host, port)
-  if shortport.portnumber(53, 'tcp') then
+  if shortport.portnumber(53, 'tcp')(host, port) then
     dns_opts.domain, dns_opts.addall = stdnse.get_script_args(
       {"dns-zone-transfer.domain", "dnszonetransfer.domain"},
       {"dns-zone-transfer.addall","dnszonetransfer.addall"}


2.
ftp-proftpd-backdoor.nse sems to have a similar problem, which probably
will never show up, because there are some tests before.

Here's an untested patch:

--- scripts/ftp-proftpd-backdoor.nse    2011-01-31 11:44:26.000000000 +0100
+++ /usr/local/share/nmap/scripts//ftp-proftpd-backdoor.nse     2011-02-03 12:05:38.000000000 +0100
@@ -43,7 +43,7 @@
                return false
        end
 
-       return shortport.port_or_service(21, "ftp")
+       return shortport.port_or_service(21, "ftp")(host, port)
 end
 
 action = function(host, port)


Jost
-- 
| Jost.Krieger+sig () ruhr-uni-bochum de  Please help stamp out spam! |
| Postmaster, JAPH, resident answer machine    at RUB Comp. Center |
| Sincere words are not sweet, sweet words are not sincere.        |
|                                          Lao Tse, Tao Te King 81 |
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault