Skip to content

Commit 8ad38ae

Browse files
author
Brent Cook
committed
Land rapid7#7109, Add final filesize to msfvenom output
2 parents d1f65b2 + b58931f commit 8ad38ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/msf/core/payload_generator.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,16 @@ def generate_payload
332332
cli_print "Payload size: #{encoded_payload.length} bytes"
333333
gen_payload = format_payload(encoded_payload)
334334
end
335+
335336
if gen_payload.nil?
336337
raise PayloadGeneratorError, 'The payload could not be generated, check options'
337338
elsif gen_payload.length > @space and not @smallest
338339
raise PayloadSpaceViolation, 'The payload exceeds the specified space'
339340
else
341+
if format.to_s != 'raw'
342+
cli_print "Final size of #{format} file: #{gen_payload.length} bytes"
343+
end
344+
340345
gen_payload
341346
end
342347
end

0 commit comments

Comments
 (0)