Method: Xploit::Sock#initialize
- Defined in:
- lib/xploit/sock.rb
#initialize(host, port, timeout = nil, debug = false) ⇒ Sock
Returns a new instance of Sock.
15 16 17 18 19 20 |
# File 'lib/xploit/sock.rb', line 15 def initialize(host, port, timeout = nil, debug = false) @sock = TCPSocket.open(host, port) @timeout = 0.5 @debug = debug puts "[\e[32m*\e[0m] Connect to #{host}:#{port}" end |