Skip to content

Commit fcea6fd

Browse files
author
Austin
authored
actually create new file ;-;
1 parent 39a4d19 commit fcea6fd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/windows/fileformat/office_ms17_11882.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ def generate_rtf
134134
payload = (payload + ("\x00" * (197 - payload.length))).unpack('H*').first
135135
payload = header + payload + footer
136136

137-
rtf = File.new(datastore['FILENAME'], 'w')
138-
rtf.write(payload)
139-
rtf.close
140-
rtf
137+
::File.open(datastore['FILENAME'], 'wb') do |fd|
138+
fd.write(payload)
139+
fd.close
140+
end
141141
end
142142

143143

0 commit comments

Comments
 (0)