Nmap Development mailing list archives

Re: NSE Socket Operation on a non-socket


From: Joao Correa <joao () livewire com br>
Date: Sun, 19 Jul 2009 04:13:18 -0300

I've tried to reproduce the errors using the commands David mentioned.
I also used the common ips file provided by Patrick. The only error
I've found was:

./nselib/stdnse.lua:61: bad argument #4 to 'format' (string expected, got table)
stack traceback:
        [C]: in function 'format'
        ./nselib/stdnse.lua:61: in function 'print_debug'
        ./scripts\html-title.nse:180: in function 'is_vhost'
        ./scripts\html-title.nse:114: in function 'rule'
        ./scripts\html-title.nse:156: in function 'redirect_ok'
        ./scripts\html-title.nse:55: in function <./scripts\html-title.nse:45>
        (tail call): ?

This error happens due to a return from dns.query(). I'm not very
familiar with dns.lua, so I'm not able to point the 'cause of the
problem. Also, this problem only happens while running on windows XP
SP2, and not on linux. Anyway, both errors does not seem to be
connected...

While running only html-title.nse, the error only happens to a
percentage of the tests, just like David mentioned.

On Sun, Jul 19, 2009 at 2:05 AM, David Fifield<david () bamsoftware com> wrote:
On Sat, Jul 18, 2009 at 04:54:41AM +0100, jah wrote:
I've been struggling with an error which I can reliably reproduce with
the following (r14408) nmap command against a windows machine with tcp
ports 445 and 3389 open:

nmap -sSV -p 445,3389 -PN -n --script banner,smb-enum-shares -d <target>

The error looks like this:

NSOCK (-1950392.4020s) nsock_loop error 10038: An operation was
attempted on something that is not a socket.
NSE: Script Engine Scan Aborted.
An error was thrown by the engine: a fatal error occurred in nsock_loop
stack traceback:
        [C]: ?
        [C]: in function 'nsock_loop'
        C:\Program Files\Nmap\nse_main.lua:605: in function 'run'
        C:\Program Files\Nmap\nse_main.lua:734: in function <C:\Program Files\Nmap\nse_main.lua:693>
        [C]: ?

I got this error too on Windows a few days ago while running an NSE
benchmark test for Patrick. It happened every time with

nmap.exe -v -d --datadir . -n -PN --host-timeout 10m --min-hostgroup 512 \
--max-parallelism 10 -p 20-25,53,80,443,113,8080,110,995 --script \
"(safe or default) and not whois" -iL common_ips.txt

nmap.exe -v -d --datadir . -n -PN --host-timeout 10m --min-hostgroup 512 \
--max-parallelism 100 -p 20-25,53,80,443,113,8080,110,995 --script \
"not intrusive" -iL common_ips.txt

It happened maybe 10% of the time with

nmap.exe -v -d --datadir . -n -PN --host-timeout 10m --min-hostgroup 512 \
--max-parallelism 100 -p 80 --script html-title -iL common_ips.txt

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: