Skip to content

Commit e2eaff6

Browse files
committed
Don't modify datastore options
1 parent 88c52ae commit e2eaff6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def cleanup
156156

157157
# clear my resource, deregister ref, stop/close the HTTP socket
158158
begin
159-
@http_service.remove_resource(datastore['URIPATH'])
159+
@http_service.remove_resource(@uri_path)
160160
@http_service.deref
161161
@http_service.stop
162162
@http_service.close
@@ -182,10 +182,11 @@ def use_zlib
182182
# Returns the configured (or random, if not configured) URI path
183183
#
184184
def resource_uri
185-
path = datastore['URIPATH'] || Rex::Text.rand_text_alphanumeric(8+rand(8))
186-
path = '/' + path if path !~ /^\//
187-
datastore['URIPATH'] = path
188-
path
185+
return @uri_path if @uri_path
186+
187+
@uri_path = datastore['URIPATH'] || Rex::Text.rand_text_alphanumeric(8+rand(8))
188+
@uri_path = '/' + @uri_path if @uri_path !~ /^\//
189+
@uri_path
189190
end
190191

191192

0 commit comments

Comments
 (0)