use GetFileAttributesW and CreateFileW

bug/bundler_fix
Bazin Danil 2015-02-08 17:36:49 +01:00
parent 8cefe637df
commit cc4fc1aefa
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class Metasploit3 < Msf::Post
file_path = datastore['FILE_PATH']
r = client.railgun.kernel32.GetFileAttributesA(file_path)
r = client.railgun.kernel32.GetFileAttributesW(file_path)
if r['GetLastError'] != 0
fail_with(
@ -49,7 +49,7 @@ class Metasploit3 < Msf::Post
drive = file_path[0, 2]
r = client.railgun.kernel32.CreateFileA("\\\\.\\#{drive}",
r = client.railgun.kernel32.CreateFileW("\\\\.\\#{drive}",
'GENERIC_READ',
'FILE_SHARE_DELETE|FILE_SHARE_READ|FILE_SHARE_WRITE',
nil,