1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-09-04 20:18:27 +02:00

patch metsvc to use MeterpreterBinaries.path

fixes #4472
This commit is contained in:
Brent Cook 2014-12-29 11:20:13 -06:00
parent 6613745d56
commit e286aeb837

View File

@ -92,7 +92,8 @@ if client.platform =~ /win32|win64/
to ||= from
print_status(" >> Uploading #{from}...")
fd = client.fs.file.new(tempdir + "\\" + to, "wb")
fd.write(::File.read(File.join(based, from), ::File.size(::File.join(based, from))))
path = (from == 'metsrv.x86.dll') ? MeterpreterBinaries.path('metsrv','x86.dll') : File.join(based, from)
fd.write(::File.read(path, ::File.size(path)))
fd.close
end