Nmap Development mailing list archives

Re: Accessing Information Between Scripts


From: Toni Ruottu <toni.ruottu () iki fi>
Date: Thu, 27 Jan 2011 16:21:48 +0200

I get the following output. I have attached the versions of your
scripts that I am running. I did not change anything other than the
dependencies.

$ nmap 127.0.0.1 -p80 --script t.nse,t2.nse

Starting Nmap 5.21 ( http://nmap.org ) at 2011-01-27 16:19 EET
The Response is----->   200
NSE: Starting runlevel 2 (of 2) scan.
NSE: Script Scanning completed.
Nmap scan report for localhost.localdomain (127.0.0.1)
Host is up (0.000043s latency).
PORT   STATE SERVICE
80/tcp open  http
|_t: Got response 200
|_t2: GOT THE VALUE

Nmap done: 1 IP address (1 host up) scanned in 0.05 seconds


On Thu, Jan 27, 2011 at 3:14 PM, m k <mpmab1 () gmail com> wrote:
Hi All,

My apologies about this email.  Based on the feedback I have received so far
there was a small problem - i was declaring my dependencies incorrectly.I
fixed this.

I can now run the first and second scripts - however the second script just
hangs. Using the -d option the error message I get is :

   "attempt to index field 'httpInfo' (a nil value)"

My attempts to print the value for httpInfo table using the command :

print ("RESPONSE status code from second script is ",
nmap.registry.httpInfo[1])

results in no output and this is also true when i  tried

nsedebug.tostr (nmap.registry.httpInfo[1])

Please note that using the same print ("RESPONSE status code from first
script is ", nmap.registry.httpInfo[1]) works just fine.
Basically from what i can gather the value is not passed to the second
script .

I have attached the scripts. Any guidance would be greatly appreciated.
Cheers
M


On Wed, Jan 26, 2011 at 9:17 PM, Toni Ruottu <toni.ruottu () iki fi> wrote:

Send the script files to the list so we can test them conveniently. It is
easy to overlook something when reading code.

On 26 Jan 2011 07:26, "m k" <mpmab1 () gmail com> wrote:
Hi , My apologies - that was a typo on my behalf . I am using "--script"
but
to no avail :( Does anyone have any other ideas?
Cheers Mk

On Wed, Jan 26, 2011 at 6:27 AM, Patrick Donnelly
<batrick () batbytes com>wrote:

On Tue, Jan 25, 2011 at 4:16 AM, m k <mpmab1 () gmail com> wrote:
nmap 127.0.0.1 -p80 script FIRST.nse, SECOND.nse

I am not sure what I am doing incorrectly. Can anyone please help ?

You are apparently calling nmap incorrectly. You should be using:

nmap 127.0.0.1 -p80 --script FIRST.nse,SECOND.nse


--
- Patrick Donnelly

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


Attachment: t.nse
Description:

Attachment: t2.nse
Description:

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

Current thread: