diff --git a/lib/msf/core/payload_set.rb b/lib/msf/core/payload_set.rb index b6d2d55a34..5c99d7c789 100644 --- a/lib/msf/core/payload_set.rb +++ b/lib/msf/core/payload_set.rb @@ -88,7 +88,7 @@ class PayloadSet < ModuleSet # Cache the payload's size begin - sizes[name] = p.new.size + sizes[name] = p.cached_size || p.new.size # Don't cache generic payload sizes. rescue NoCompatiblePayloadError end