Nmap Development mailing list archives

Re: afp-serverinfo.nse script -- new AFP library


From: Patrik Karlsson <patrik () cqure net>
Date: Tue, 30 Mar 2010 21:52:16 +0200


On 30 mar 2010, at 21.34, David Fifield wrote:

On Tue, Mar 30, 2010 at 12:31:48AM +0200, Patrik Karlsson wrote:

On 29 mar 2010, at 23.12, David Fifield wrote:

Yes, I have that same reference. The even-byte padding got fixed by you
and Andrew. The other thing that looked like an alignment issue but
really wasn't was the two-byte length for the UTF-8 server name.

The only other problem I saw was the reversed byte order in the server
flags, which is trivial to fix. Again see
http://seclists.org/nmap-dev/2010/q1/665.

We had some off-list mail correspondence and I don't know if the last
version made it back to the list.
Anyway, I'm happy to bring the patch back in to my latest release of
the library and help out ironing out the last few problems.

If you've got it in a convenient format then please send it to the list
so we can work it in.

I'm attaching a patch to afp.lua and a patch to the script so that it
uses the new library.
The script currently calls the fp_get_server_info method of the Proto
class directly rather than going through the Helper class.
As it does not need to have a session established before being called
adding a function to the helper class would simply act as a wrapper.

I committed it. I removed the +1 and +2 offset block, and replaced it
with code that just does this typical thing for Lua: adds 1 to
zero-based indexes wherever they are used. I made the server_signature
be returned as a byte string instead of a hex-encoded string. In the
script, I added an @output section.

Thanks Andrew and Patrik!

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/
Mac OS X works great but Netatalk dumps:

NSE: afp-serverinfo against 10.46.200.50:548 threw an error!
./nselib/afp.lua:691: 'for' limit must be a number
stack traceback:
        ./nselib/afp.lua:691: in function 'fp_get_server_info'
        ./scripts/afp-serverinfo.nse:73: in function <./scripts/afp-serverinfo.nse:51>
        (tail call): ?

Completed NSE at 21:41, 0.01s elapsed

I'm attaching a patch that corrects this.

Attachment: afp-netatalk.patch
Description:



//Patrik
--
Patrik Karlsson
http://www.cqure.net
http://www.twitter.com/nevdull77





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

Current thread: