@@ -34,6 +34,7 @@ def initialize
34
34
)
35
35
36
36
deregister_options ( 'RPORT' )
37
+ deregister_options ( 'SMBDIRECT' )
37
38
@smb_port = 445
38
39
end
39
40
@@ -42,7 +43,7 @@ def rport
42
43
end
43
44
44
45
def smb_direct
45
- @smbdirect || datastore [ 'SMBDirect' ]
46
+ ( @smb_port == 445 )
46
47
end
47
48
48
49
# Fingerprint a single host
@@ -55,10 +56,10 @@ def run_host(ip)
55
56
56
57
begin
57
58
res = smb_fingerprint ( )
58
-
59
+
59
60
#
60
61
# Create the note hash for smb.fingerprint
61
- #
62
+ #
62
63
conf = {
63
64
:native_os => res [ 'native_os' ] ,
64
65
:native_lm => res [ 'native_lm' ]
@@ -82,7 +83,7 @@ def run_host(ip)
82
83
match_conf [ 'os.edition' ] = res [ 'edition' ]
83
84
end
84
85
85
- if res [ 'sp' ] . to_s . length > 0
86
+ if res [ 'sp' ] . to_s . length > 0
86
87
desc << " #{ res [ 'sp' ] . downcase . gsub ( 'service pack ' , 'SP' ) } "
87
88
conf [ :os_sp ] = res [ 'sp' ]
88
89
match_conf [ 'os.version' ] = res [ 'sp' ]
@@ -95,7 +96,7 @@ def run_host(ip)
95
96
end
96
97
97
98
if res [ 'lang' ] . to_s . length > 0 and res [ 'lang' ] != 'Unknown'
98
- desc << " (language:#{ res [ 'lang' ] } "
99
+ desc << " (language:#{ res [ 'lang' ] } ) "
99
100
conf [ :os_lang ] = res [ 'lang' ]
100
101
match_conf [ 'os.language' ] = conf [ :os_lang ]
101
102
end
@@ -130,7 +131,7 @@ def run_host(ip)
130
131
:port => rport ,
131
132
:proto => 'tcp' ,
132
133
:ntype => 'fingerprint.match' ,
133
- :data => match_conf
134
+ :data => match_conf
134
135
)
135
136
else
136
137
desc = "#{ res [ 'native_os' ] } (#{ res [ 'native_lm' ] } )"
0 commit comments