Skip to content

Commit 8c5a73b

Browse files
committed
Change exception handling
1 parent 9054254 commit 8c5a73b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/exploits/multi/http/manageengine_search_sqli.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ def on_new_session(cli)
109109
cli.core.use("stdapi") if not cli.ext.aliases.include?("stdapi")
110110
end
111111

112-
begin
113-
@clean_ups.each { |f|
114-
base = File.basename(f)
115-
f = "../webapps/SecurityManager/#{base}"
116-
print_warning("#{rhost}:#{rport} - Deleting: \"#{base}\"")
112+
@clean_ups.each { |f|
113+
base = File.basename(f)
114+
f = "../webapps/SecurityManager/#{base}"
115+
print_warning("#{rhost}:#{rport} - Deleting: \"#{base}\"")
117116

117+
begin
118118
if cli.type == 'meterpreter'
119119
cli.fs.file.rm(f)
120120
else
@@ -124,10 +124,10 @@ def on_new_session(cli)
124124
end
125125

126126
print_good("#{rhost}:#{rport} - \"#{base}\" deleted")
127-
}
128-
rescue ::Exception => e
129-
print_error("Unable to delete: #{e.message}")
130-
end
127+
rescue ::Exception => e
128+
print_error("Unable to delete: #{e.message}")
129+
end
130+
}
131131
end
132132

133133

0 commit comments

Comments
 (0)