Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'socket'
- s = TCPSocket.new ARGV[0], 60128
- def hexify_command(cmd)
- cmd = '!1' + cmd unless cmd.start_with? '!1'
- "ISCP\x00\x00\x00\x10\x00\x00\x00#{(cmd.length + 1).chr}\x01\x00\x00\x00#{cmd}\x0D"
- end
- s.write hexify_command(ARGV[1])
Add Comment
Please, Sign In to add comment