15 lines
246 B
Ruby
15 lines
246 B
Ruby
require 'socket'
|
|
|
|
sock = TCPSocket.new("eculocate.local", 5000)
|
|
|
|
rom_image = File.read(ARGV[1], mode: "rb")
|
|
|
|
image_len = rom_image.size
|
|
|
|
|
|
payload = "ROM0" + ("z" * 64) + [image_len].pack("L>") + rom_image
|
|
|
|
sock.write(payload)
|
|
|
|
puts sock.readline
|