Skip to content

Commit c59b8fd

Browse files
committed
Land rapid7#2741, @russell TCP support for nfsmount
2 parents 1e30cd5 + 291a527 commit c59b8fd

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

modules/auxiliary/scanner/nfs/nfsmount.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ def initialize
2626
],
2727
'License' => MSF_LICENSE
2828
)
29+
30+
register_options([
31+
OptEnum.new('PROTOCOL', [ true, 'The protocol to use', 'udp', ['udp', 'tcp']])
32+
])
33+
2934
end
3035

3136
def run_host(ip)
@@ -35,7 +40,7 @@ def run_host(ip)
3540
progver = 1
3641
procedure = 5
3742

38-
sunrpc_create('udp', program, progver)
43+
sunrpc_create(datastore['PROTOCOL'], program, progver)
3944
sunrpc_authnull()
4045
resp = sunrpc_call(procedure, "")
4146

@@ -44,7 +49,7 @@ def run_host(ip)
4449

4550
report_service(
4651
:host => ip,
47-
:proto => 'udp',
52+
:proto => datastore['PROTOCOL'],
4853
:port => 2049,
4954
:name => 'nfsd',
5055
:info => "NFS Daemon #{program} v#{progver}"
@@ -64,7 +69,7 @@ def run_host(ip)
6469
end
6570
report_note(
6671
:host => ip,
67-
:proto => 'udp',
72+
:proto => datastore['PROTOCOL'],
6873
:port => 2049,
6974
:type => 'nfs.exports',
7075
:data => { :exports => shares },

0 commit comments

Comments
 (0)