Skip to content

Commit 4bd50b0

Browse files
author
zerosum0x0
committed
Merge branch 'ms17-010' of github.com:RiskSense-Ops/metasploit-framework into ms17-010
2 parents a125566 + ef7de6d commit 4bd50b0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/auxiliary/scanner/smb/smb_ms17_010.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def initialize(info = {})
2828
[ 'CVE', '2017-0146'],
2929
[ 'CVE', '2017-0147'],
3030
[ 'CVE', '2017-0148'],
31+
[ 'MSB', 'MS17-010'],
3132
[ 'URL', 'https://technet.microsoft.com/en-us/library/security/ms17-010.aspx']
3233
],
3334
'License' => MSF_LICENSE
@@ -37,7 +38,6 @@ def initialize(info = {})
3738
def run_host(ip)
3839
begin
3940
status = do_smb_probe(ip)
40-
print_status("Received #{status} with FID = 0")
4141

4242
# STATUS_ACCESS_DENIED (Windows 10) and STATUS_INVALID_HANDLE (others)
4343
if status == "STATUS_ACCESS_DENIED" or status == "STATUS_INVALID_HANDLE"
@@ -58,7 +58,7 @@ def run_host(ip)
5858
end
5959
end
6060

61-
def do_smb_probe(ip, opts={})
61+
def do_smb_probe(ip)
6262
connect
6363

6464
# logon as user \
@@ -83,7 +83,10 @@ def do_smb_probe(ip, opts={})
8383
# convert error code to string
8484
code = pkt['SMB'].v['ErrorClass']
8585
smberr = Rex::Proto::SMB::Exceptions::ErrorCode.new
86-
smberr.get_error(code)
86+
status = smberr.get_error(code)
87+
88+
print_status("Received #{status} with FID = 0")
89+
status
8790
end
8891

8992
def make_smb_trans_ms17_010(tree_id)

0 commit comments

Comments
 (0)