Skip to content

Commit c97be83

Browse files
committed
Fix error calculating payload sizes.
Error meant most Windows payloads were marked as incompatible with many exploits.
1 parent 725d4d7 commit c97be83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/payload/windows.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate(*args)
7575
if (test_arch.include?(ARCH_X86))
7676

7777
# PrependMigrate
78-
if (datastore['PrependMigrate'])
78+
if datastore['PrependMigrate'] and datastore['PrependMigrate'].to_s.downcase == 'true'
7979
payloadsize = "0x%04x" % buf.length
8080
procname = datastore['PrependMigrateProc'] || 'rundll32'
8181

0 commit comments

Comments
 (0)