Skip to content

Commit d6fd2a4

Browse files
author
forzoni
committed
Add final filesize, useful when using different formats.
1 parent 8d8e1f8 commit d6fd2a4

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,6 +332,11 @@ def generate_payload
332332
cli_print "Payload size: #{encoded_payload.length} bytes"
333333
gen_payload = format_payload(encoded_payload)
334334
end
335+
336+
if encoded_payload.length != gen_payload.length
337+
cli_print "Final size of #{format}: #{gen_payload.length} bytes"
338+
end
339+
335340
if gen_payload.nil?
336341
raise PayloadGeneratorError, 'The payload could not be generated, check options'
337342
elsif gen_payload.length > @space and not @smallest

0 commit comments

Comments
 (0)