From e2eaff6b3a506dcdc2e8bee960ad1507d6d2f2fd Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Mon, 20 Apr 2015 15:16:21 -0500 Subject: [PATCH] Don't modify datastore options --- .../gather/apple_safari_ftp_url_cookie_theft.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb b/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb index f7c4a56f62..777677cdc0 100644 --- a/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb +++ b/modules/auxiliary/gather/apple_safari_ftp_url_cookie_theft.rb @@ -156,7 +156,7 @@ class Metasploit3 < Msf::Auxiliary # clear my resource, deregister ref, stop/close the HTTP socket begin - @http_service.remove_resource(datastore['URIPATH']) + @http_service.remove_resource(@uri_path) @http_service.deref @http_service.stop @http_service.close @@ -182,10 +182,11 @@ class Metasploit3 < Msf::Auxiliary # Returns the configured (or random, if not configured) URI path # def resource_uri - path = datastore['URIPATH'] || Rex::Text.rand_text_alphanumeric(8+rand(8)) - path = '/' + path if path !~ /^\// - datastore['URIPATH'] = path - path + return @uri_path if @uri_path + + @uri_path = datastore['URIPATH'] || Rex::Text.rand_text_alphanumeric(8+rand(8)) + @uri_path = '/' + @uri_path if @uri_path !~ /^\// + @uri_path end