|
Nmap Development
mailing list archives
Re: [PATCH] Comm is tokin' and passing to HTTP
From: Sven Klemm <sven () c3d2 de>
Date: Tue, 09 Sep 2008 23:46:15 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Kris,
| I've added a few new options to the Comm NSElib which I liked while
looking at
| the HTTP lib. These in-turn allow Comm to be used as a back-end for
HTTP.
|
| Comm can now take four new options. The first two are simple:
|
| * conntimeout is for specifying a timeout only for the socket connect()
| * reqtimeout is for specifying a timeout only for the receive*()s
and send()s
|
| The next two add the most new functionality:
|
| * buf is for specifying a delimiter for parsing the data into tokens
with the
| lesser-used receive_buf() function. This is used at the same level
as the
| "lines" and "bytes" options, but instead of limiting the amount of
returned
| data, it returns a table of all of the tokenized data (element=token).
|
| * bufkeep is for specifying whether or not to keep the delimiter in the
| returned data. It defaults to false. This means Comm uses
receive_buf()
| itself rather than the stdnse make_buffer() function which HTTP used.
|
| I've attached a patch which adds these options to Comm and uses it
in HTTP.
|
| I've tested it against quite a few machines, with chunked encoding
and not,
| and it all works fine for me.
|
| Please let me know what you think.
Very nice. I like the fact that exchange returns a table with the
lines instead of an iterator. I've tested the patch and it worked
without problems.
I am wondering whether buf is the right name for the separator option.
Cheers,
Sven
- --
Sven Klemm
http://cthulhu.c3d2.de/~sven/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEUEARECAAYFAkjG7qcACgkQevlgTHEIT4ZmZACdGoKmSkZ64YozjEJyqDbzrrXp
Nz8Al0n0bMwABTUBUxRmUCKqeCODG3A=
=jYzx
-----END PGP SIGNATURE-----
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org
By Date
By Thread
Current thread:
|