Skip to content

Commit b1c7f13

Browse files
committed
Fix report_vuln and prefer vprint_error
1 parent f7c8bd2 commit b1c7f13

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

modules/auxiliary/scanner/smb/smb_ms17_010.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ def run_host(ip)
4848
if status == "STATUS_INSUFF_SERVER_RESOURCES"
4949
print_warning("Host is likely VULNERABLE to MS17-010!")
5050
report_vuln(
51-
:host => rhost,
52-
:port => rport,
53-
:proto => 'tcp',
54-
:sname => 'SMB',
55-
:info => "Vulnerable to MS17-010",
51+
host: ip,
52+
name: self.name,
53+
refs: self.references,
54+
info: 'STATUS_INSUFF_SERVER_RESOURCES for FID 0 against IPC$'
5655
)
5756
elsif status == "STATUS_ACCESS_DENIED" or status == "STATUS_INVALID_HANDLE"
5857
# STATUS_ACCESS_DENIED (Windows 10) and STATUS_INVALID_HANDLE (others)
@@ -67,7 +66,7 @@ def run_host(ip)
6766
rescue ::Rex::Proto::SMB::Exceptions::LoginError
6867
print_error("An SMB Login Error occurred while connecting to the IPC$ tree.")
6968
rescue ::Exception => e
70-
print_error("#{e.class}: #{e.message}")
69+
vprint_error("#{e.class}: #{e.message}")
7170
ensure
7271
disconnect
7372
end

0 commit comments

Comments
 (0)