Skip to content

Commit 376d05f

Browse files
author
HD Moore
committed
Avoid instantiating the module during recalculate
1 parent f676dc0 commit 376d05f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/payload_set.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def recalculate
8888

8989
# Cache the payload's size
9090
begin
91-
sizes[name] = p.new.size
91+
sizes[name] = p.cached_size || p.new.size
9292
# Don't cache generic payload sizes.
9393
rescue NoCompatiblePayloadError
9494
end

0 commit comments

Comments
 (0)