Skip to content

Commit 78b0fb0

Browse files
authored
I committed to the wrong branch
1 parent 0bd1106 commit 78b0fb0

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

modules/post/windows/manage/archmigrate.rb

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ class MetasploitModule < Msf::Post
22
include Msf::Post::Windows::Registry
33
include Msf::Post::File
44
include Msf::Post::Common
5-
include Msf::Post::Windows::Priv
65

76
def initialize(info = {})
87
super(update_info(
@@ -22,8 +21,7 @@ def initialize(info = {})
2221
register_options(
2322
[
2423
OptString.new('EXE', [true, 'The executable to start and migrate into', 'C:\windows\sysnative\svchost.exe']),
25-
OptBool.new('FALLBACK', [ true, 'If the selected migration executable does not exist fallback to a sysnative file', true ]),
26-
OptBool.new('IGNORE_SYSTEM', [true, 'Migrate even if you have system priveleges', true])
24+
OptBool.new('FALLBACK', [ true, 'If the selected migration executable does not exist fallback to a sysnative file', true ])
2725
],
2826
self.class
2927
)
@@ -50,7 +48,7 @@ def get_windows_loc
5048
return windir
5149
end
5250

53-
def do_migrate
51+
def run
5452
if check_32_on_64
5553
print_status('The meterpreter is not the same architecture as the OS! Upgrading!')
5654
newproc = datastore['EXE']
@@ -88,20 +86,4 @@ def do_migrate
8886
print_good('The meterpreter is the same architecture as the OS!')
8987
end
9088
end
91-
92-
93-
94-
def run
95-
if datastore['IGNORE_SYSTEM']
96-
do_migrate
97-
elsif !datastore['IGNORE_SYSTEM'] && is_system?
98-
print_error('You are running as SYSTEM! Aborting migration.')
99-
elsif datastore['IGNORE_SYSTEM'] && is_system?
100-
print_error('You are running as SYSTEM! You will lose your priveleges!')
101-
do_migrate
102-
elsif !datastore['IGNORE_SYSTEM'] && !is_system?
103-
print_status('You\'re not running as SYSTEM. Moving on...')
104-
do_migrate
105-
end
106-
end
10789
end

0 commit comments

Comments
 (0)