We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a298129 commit 96c459cCopy full SHA for 96c459c
lib/msf/core/payload_generator.rb
@@ -332,7 +332,9 @@ def generate_payload
332
cli_print "Payload size: #{encoded_payload.length} bytes"
333
gen_payload = format_payload(encoded_payload)
334
end
335
- if gen_payload.length > @space and not @smallest
+ if gen_payload.nil?
336
+ raise PayloadGeneratorError, 'The payload could not be generated, check options'
337
+ elsif gen_payload.length > @space and not @smallest
338
raise PayloadSpaceViolation, 'The payload exceeds the specified space'
339
else
340
gen_payload
0 commit comments