Guest User

Untitled

a guest
Dec 14th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. require 'socket'
  2.  
  3. s = TCPSocket.new ARGV[0], 60128
  4.  
  5. def hexify_command(cmd)
  6. cmd = '!1' + cmd unless cmd.start_with? '!1'
  7. "ISCP\x00\x00\x00\x10\x00\x00\x00#{(cmd.length + 1).chr}\x01\x00\x00\x00#{cmd}\x0D"
  8. end
  9.  
  10. s.write hexify_command(ARGV[1])
Add Comment
Please, Sign In to add comment