rapid7/metasploit-framework — pull request #2150 by webstersprodigy (2013-07-24 04:43:20+00:00)
Title: Fixed smb_enumshares to support dir list in SRVSVC

There's a kind of "by design" bug with smb_enumshares where it wasn't listing directories when using srvsvc, which some environments need by default. After some debugging, it seems like the problem is because srvsvc adds a null byte. When accounting for this, it seems to work.

Tested with and without USE_SRVSVC_ONLY with windows xp, and with server 2008 r2.