mubix/metasploit-framework — pull request #3 by jlee-r7 (2013-05-10 22:07:13+00:00)
Title: Simplify and clean up some

I'd really love to make this work on Linux as well, since it's really
just a file grabber/parser. Unfortunately, the Post API for enumerating
users and homedirs isn't great for cross-platform stuff like this.

A few small changes, all verified on Windows 7:

* Reuse the key storing code instead of copy-paste with minor changes

* Use binary mode when opening the stored prefs

* Don't bother checking for incognito since we're using `steal_token`
anyway

* Check for existence of directories instead of guessing based on OS
match