Skip to content

Commit d248cad

Browse files
author
Tod Beardsley
committed
Fixes rapid7#4472, a broken meterpreter script
2 parents 135faee + e286aeb commit d248cad

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)