Skip to content

Commit fee804a

Browse files
author
Tod Beardsley
committed
Land rapid7#1926, Auxiliary::Web changes
Since none of these changes appear to be reachable from Metasploit Framework, this seems like a nop for me.
2 parents 0895184 + 6aa7c74 commit fee804a

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

lib/anemone/rex_http.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ def connection(url)
195195

196196
conn.set_config(
197197
'vhost' => virtual_host(url),
198-
'agent' => user_agent
198+
'agent' => user_agent,
199+
'domain' => @opts[:domain]
199200
)
200201

201202
conn

lib/msf/core/auxiliary/crawler.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def initialize(info = {})
2424
OptInt.new('MAX_MINUTES', [ true, 'The maximum number of minutes to spend on each URL', 5]),
2525
OptInt.new('MAX_THREADS', [ true, 'The maximum number of concurrent requests', 4]),
2626
OptString.new('USERNAME', [false, 'The HTTP username to specify for authentication']),
27-
OptString.new('PASSWORD', [false, 'The HTTP password to specify for authentication'])
27+
OptString.new('PASSWORD', [false, 'The HTTP password to specify for authentication']),
28+
OptString.new('DOMAIN', [ true, 'The domain to use for windows authentication', 'WORKSTATION'])
29+
2830
], self.class
2931
)
3032

@@ -123,6 +125,7 @@ def run
123125
if datastore['USERNAME'] and datastore['USERNAME'] != ''
124126
t[:username] = datastore['USERNAME'].to_s
125127
t[:password] = datastore['PASSWORD'].to_s
128+
t[:domain] = datastore['DOMAIN'].to_s
126129
end
127130

128131
if datastore['HTTPCookie']
@@ -282,7 +285,8 @@ def crawler_options(t)
282285
end
283286

284287
opts[:username] = t[:username] || ''
285-
opts[:password] =t[:password] || ''
288+
opts[:password] = t[:password] || ''
289+
opts[:domain] = t[:domain] || 'WORKSTATION'
286290

287291
opts
288292
end

lib/msf/core/auxiliary/web/http.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def timed_out
7070
attr_reader :parent
7171

7272
attr_accessor :redirect_limit
73-
attr_accessor :username , :password
73+
attr_accessor :username , :password, :domain
7474

7575
def initialize( opts = {} )
7676
@opts = opts.dup
@@ -89,6 +89,7 @@ def initialize( opts = {} )
8989
if opts[:auth].is_a? Hash
9090
@username = opts[:auth][:user].to_s
9191
@password = opts[:auth][:password].to_s
92+
@domain = opts[:auth][:domain].to_s
9293
end
9394

9495
self.redirect_limit = opts[:redirect_limit] || 20
@@ -117,6 +118,7 @@ def connect
117118
c.set_config({
118119
'vhost' => opts[:target].vhost,
119120
'agent' => opts[:user_agent] || 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)',
121+
'domain' => domain
120122
})
121123
c
122124
end

0 commit comments

Comments
 (0)