SMASH AND GRAB: WINDOWS DIR LISTS

By | December 3, 2012

Source: Room362.com

In this article “Looking through network shares can be slow, and waiting for individual searches to finish looking through the whole “drive” is redundant. Easier to just use some Windows voodoo to get a good list to look through offline:

start /b cmd /c dir /b /s \\doesnotexist\supersecretshare$ ^> shareinfo.txt

Breaking that down:

start /b – starts a process that won’t hang up our current one, with the “b” flag meaning “background”, yay not visible to the user! (unless your process forces it back)

cmd /c – no reason to explain this one it runs something.. (since dir isn’t an executable but something that resides inside of cmd this is needed)

dir /b /s – the “s” means sub directories and pretty widely known. The one that isn’t as well known is the “b” which means “bare” format. Also known as “puts-path-on-every-line-to-make-it-easy-to-find-and-grep-stuff” mode.”

Leave a Reply