diff --git a/lib/msf/core/payload_set.rb b/lib/msf/core/payload_set.rb index b6d2d55a340c..5c99d7c78935 100644 --- a/lib/msf/core/payload_set.rb +++ b/lib/msf/core/payload_set.rb @@ -88,7 +88,7 @@ def recalculate # 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