Skip to content

Commit

Permalink
Merge pull request #3 from jlee-r7/scriptjunkie-migrator
Browse files Browse the repository at this point in the history
Proposed changes for PrependMigrate
  • Loading branch information
scriptjunkie committed Jan 22, 2013
2 parents 66d5f39 + ff7756c commit 75fe7e8
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 502 deletions.
9 changes: 0 additions & 9 deletions lib/msf/core/exploit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1242,15 +1242,6 @@ def handler_enabled?
not datastore['DisablePayloadHandler']
end

#
# Returns the state of the PrependMigrate option
# See https://github.com/rapid7/metasploit-framework/pull/917
# for discussion.
#
def prepend_migrate?
!!(datastore['PrependMigrate'] && datastore['PrependMigrate'].to_s.downcase == 'true')
end

##
#
# Handler interaction
Expand Down
10 changes: 8 additions & 2 deletions lib/msf/core/payload/windows.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: binary -*-
require 'msf/core'
require 'msf/core/payload/windows/prependmigrate'

###
#
Expand All @@ -12,7 +11,9 @@
###
module Msf::Payload::Windows

include Msf::Payload::PrependMigrate
require 'msf/core/payload/windows/prepend_migrate'
# Provides the #prepends method
include Msf::Payload::Windows::PrependMigrate

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


def generate
return prepends(super)
end

#
# This mixin is chained within payloads that target the Windows platform.
# It provides special variable substitution for things like EXITFUNC and
Expand Down
Loading

0 comments on commit 75fe7e8

Please sign in to comment.