rapid7/metasploit-framework — pull request #1042 by bpoole (2012-11-08 00:06:32+00:00)
Title: Speedup code and fix lots of random issues.

- Record the FullName of the account and not the ShortName. The
ShortName is not always allowed to be used for logging in to servers
and is disabled by default post-Domino 6
(http://www-01.ibm.com/support/docview.wss?uid=swg21218067).

NOTE: One issue that has not been cleanly resolved here is that the
FullName parameter is actually a list of names. Currently I do not
process the FullName after retrieving it and store the list of
usernames as the username. Thus an entry for the user 'Joe
Schmoe/US/COMPANY; Joe Schmoe' is created. This isn't particularly
clean or correct IMO but I'm not sure I like either of the other two
options I can think of either:

1) Split on the ; and store the first entry. Downside: loses an
alternate account name that may be useful informational.
2) Split on the ; and store each entry as a separate credential.
Downside: Many duplicates in the credential database. As the names
are not necessarily easy to uniquify this could make reporting on
the credentials more painful.
- Support retrieving entries via Readviewentries in larger batches than
by default. Also actually process the Readviewentries response as a
list of account IDs rather than just grabbing the first account ID
each time. Together these two changes provide a significant speedup on
large sites as it halves the total number of HTTP requests needed.
- Support restarting hash retrieval from a particular index in
Readviewentries. This is very useful if you have say pulled 6000 of
8000 password hashes when the server times out a connection.
- Make exception handling consistent throughout and handle all
connection errors. If we fail partway through a site report the index
we were requesting so that the user can set the index to resume from.
- Support basic and form authentication using the same settings. Use the
HTTP response code to figure out which route to go.
- Fix prints to report the correct protocol when using SSL.
- Check report_service's return before using.