diff --git a/lib/msf/core/auxiliary/scanner.rb b/lib/msf/core/auxiliary/scanner.rb index 5396504051..53637a1d8e 100644 --- a/lib/msf/core/auxiliary/scanner.rb +++ b/lib/msf/core/auxiliary/scanner.rb @@ -153,7 +153,7 @@ def run # Create a thread for each batch if (batch.length > 0) - t = Thread.new(batch) do |bat| + thread = Thread.new(batch) do |bat| nmod = self.replicant mybatch = bat.dup begin @@ -166,7 +166,7 @@ def run end end t[:batch_size] = batch.length - tl << t + tl << thread end # Exit once we run out of hosts diff --git a/lib/msf/core/exploit/smb.rb b/lib/msf/core/exploit/smb.rb index fdf1836259..67ad88bbfa 100644 --- a/lib/msf/core/exploit/smb.rb +++ b/lib/msf/core/exploit/smb.rb @@ -192,18 +192,18 @@ module Exploit::Remote::SMB # # The correct way, which leads to invalid offsets :-( # - providers = [] - - 0.upto(pcnt-1) do |i| - flags,desc_o,name_o,comm_o = resp[8 + (i*16), 16].unpack("VVVV") - - #desc = read_unicode(resp,8+desc_o).gsub("\x00", '') - #name = read_unicode(resp,8+name_o).gsub("\x00", '') - #comm = read_unicode(resp,8+comm_o).gsub("\x00", '') - #providers << [flags,desc,name,comm] - end - - providers + #providers = [] + # + #0.upto(pcnt-1) do |i| + # flags,desc_o,name_o,comm_o = resp[8 + (i*16), 16].unpack("VVVV") + # + # #desc = read_unicode(resp,8+desc_o).gsub("\x00", '') + # #name = read_unicode(resp,8+name_o).gsub("\x00", '') + # #comm = read_unicode(resp,8+comm_o).gsub("\x00", '') + # #providers << [flags,desc,name,comm] + #end + # + #providers end # This method performs an extensive set of fingerprinting operations diff --git a/lib/msf/ui/console/command_dispatcher/db.rb b/lib/msf/ui/console/command_dispatcher/db.rb index 45fbc7c88f..481fd1dcb4 100644 --- a/lib/msf/ui/console/command_dispatcher/db.rb +++ b/lib/msf/ui/console/command_dispatcher/db.rb @@ -456,7 +456,7 @@ class Db framework.db.services.each do |serv| next if not serv.host - next if not (serv.state == "open" || serv.state == "up") + next if (serv.state != "open" && serv.state != "up") # Match port numbers rports.keys.sort.each do |rport|