Created
August 14, 2013 17:47
-
-
Save mubix/6233565 to your computer and use it in GitHub Desktop.
Useful meterpreter script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = client.railgun.kernel32.GetLogicalDrives()["return"] | |
# Math magic to convert the binary to letters | |
drives = [] | |
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
(0..25).each do |i| | |
test = letters[i,1] | |
rem = a % (2**(i+1)) | |
if rem > 0 | |
drives << test | |
a = a - rem | |
end | |
end | |
print_line("Drives Available = #{drives.inspect}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment