Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
executable file 32 lines (22 sloc) 0.616 kB
#!/usr/bin/env ruby -wKU
require 'synack'
# require File.join(File.dirname(__FILE__), '..', 'lib', 'synack')
USAGE = %q{
Hi! It looks like you're trying to connect to a Synack server, which is great,
but you didn't specify a URI.
Try this instead:
synack_client 127.0.0.1:11113
You'll probably have better luck that way.
}
if ARGV.empty?
puts USAGE
exit
end
host, port = ARGV.first.split(/:/)
begin
client = Synack::Client.new host: host, port: (port || 11113)
_input = STDIN.gets.chomp
client.say _input
rescue DRb::DRbConnError => e
puts "Some kind of connection error occurred: #{e}"
end
Jump to Line
Something went wrong with that request. Please try again.