Skip to content

Commit 75fe7e8

Browse files
committed
Merge pull request #3 from jlee-r7/scriptjunkie-migrator
Proposed changes for PrependMigrate
2 parents 66d5f39 + ff7756c commit 75fe7e8

File tree

4 files changed

+502
-502
lines changed

4 files changed

+502
-502
lines changed

lib/msf/core/exploit.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,15 +1242,6 @@ def handler_enabled?
12421242
not datastore['DisablePayloadHandler']
12431243
end
12441244

1245-
#
1246-
# Returns the state of the PrependMigrate option
1247-
# See https://github.com/rapid7/metasploit-framework/pull/917
1248-
# for discussion.
1249-
#
1250-
def prepend_migrate?
1251-
!!(datastore['PrependMigrate'] && datastore['PrependMigrate'].to_s.downcase == 'true')
1252-
end
1253-
12541245
##
12551246
#
12561247
# Handler interaction

lib/msf/core/payload/windows.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# -*- coding: binary -*-
22
require 'msf/core'
3-
require 'msf/core/payload/windows/prependmigrate'
43

54
###
65
#
@@ -12,7 +11,9 @@
1211
###
1312
module Msf::Payload::Windows
1413

15-
include Msf::Payload::PrependMigrate
14+
require 'msf/core/payload/windows/prepend_migrate'
15+
# Provides the #prepends method
16+
include Msf::Payload::Windows::PrependMigrate
1617

1718
#
1819
# ROR hash associations for some of the exit technique routines.
@@ -25,6 +26,11 @@ module Msf::Payload::Windows
2526
'none' => 0x5DE2C5AA, # GetLastError
2627
}
2728

29+
30+
def generate
31+
return prepends(super)
32+
end
33+
2834
#
2935
# This mixin is chained within payloads that target the Windows platform.
3036
# It provides special variable substitution for things like EXITFUNC and

0 commit comments

Comments
 (0)