# arirang ruby script example

class Arirang

     def baedal
        ari_title   = "arirang script examples \n"
        ari_desc    = "send null bytes\n"
        ari_author  = "pilot <pilot@monkey.org>\n"

        puts "title: #{ari_title}"
        puts "desc: #{ari_desc}"
        puts "author: #{ari_author}"
    
     end

     def asadal
         ariconnect
         # a r i r a n g
         packet = "00610072006900720061006e006700"
         hex = packet.scan(/../).map { |s| s.to_i(16) }
         buf = hex.pack("C*")
         response = arisend(buf)
         response[0..52].each_byte do |x|
            str = sprintf("%02X", x)
            ariprint(str)
         end
         ariprint("\n")
         ariclose
     end

end