Skip to content

Commit e286aeb

Browse files
author
Brent Cook
committed
patch metsvc to use MeterpreterBinaries.path
fixes rapid7#4472
1 parent 6613745 commit e286aeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/meterpreter/metsvc.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ def m_exec(session, cmd)
9292
to ||= from
9393
print_status(" >> Uploading #{from}...")
9494
fd = client.fs.file.new(tempdir + "\\" + to, "wb")
95-
fd.write(::File.read(File.join(based, from), ::File.size(::File.join(based, from))))
95+
path = (from == 'metsrv.x86.dll') ? MeterpreterBinaries.path('metsrv','x86.dll') : File.join(based, from)
96+
fd.write(::File.read(path, ::File.size(path)))
9697
fd.close
9798
end
9899

0 commit comments

Comments
 (0)