[Plugins-writers] new script: errors closing registry, opening hku

From: Scott Sibert (ppcxws@private)
Date: Fri Oct 22 2004 - 06:46:55 PDT


Hello all.

I've taken my successful HKLM-reading script and started adding some
code after all of the get_key_contents() of the HLKM entries I want:


registry_close(soc:soc, uid:uid, tid:tid, pipe:pipe);


#handle = registry_open_hku(soc:soc, uid:uid, tid:tid, pipe:pipe);

#entries = get_key_contents(key:"S-1-5-20");


Running this I get:

> nasl -t 199.111.134.162 -T ../myout.02 scott1-registry.nasl
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)
[6261](scott1-registry.nasl) ord() usage : ord(char)

several second pause...

[6261](scott1-registry.nasl) Usage: substr(string, idx_start [,idx_end])
The remote host is running Windows 5.1 (Service Pack 1)

and the expected data from HKLM.

When I run the script without that registry_close function I do not
get any of those messages, just the info starting with "The remote
host is running...."

I don't know how to use the registry_close function and I found and
copied it from smb_hotfixes.nasl so I could very well not be using it
correctly.  I figured I needed to close this registry stuff because
I'm opening a new registry (HKU vs HKLM).  I was then (as you can see
from my commented out next two lines) going to open the registry again
but using the new registry_open_hku.

Does anyone have any suggestions?
Thanks.
--Scott
_______________________________________________
Plugins-writers mailing list
Plugins-writers@private
http://mail.nessus.org/mailman/listinfo/plugins-writers



This archive was generated by hypermail 2.1.3 : Fri Oct 22 2004 - 06:47:52 PDT