Skip to content

Commit fb24c55

Browse files
committed
Fixes deleting file
1 parent e0383b4 commit fb24c55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/exploits/multi/http/clinic_pms_sqli_to_rce.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +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
1112
include Msf::Auxiliary::Report
1213

1314
def initialize(info = {})
@@ -153,6 +154,7 @@ def trigger_payload
153154
logout
154155
login_sqli
155156

157+
print_status('Reporting vulnerability')
156158
report_vuln(
157159
host: datastore['RHOSTS'],
158160
name: name,
@@ -182,7 +184,7 @@ def trigger_payload
182184
'method' => 'GET',
183185
'keep_cookies' => true
184186
})
185-
register_file_for_cleanup(payload_path) if datastore['DELETE_FILES']
187+
register_file_for_cleanup(File.basename(payload_path)) if datastore['DELETE_FILES']
186188
end
187189

188190
def exploit

0 commit comments

Comments
 (0)