# arirang ruby script examples
# by pilot

class Arirang

#@ari_port = 80
@ari_recvsize = 200000
@ari_recvflag = 3

     def baedal
        ari_title   = "main page iframe check\n"
        ari_desc    = "arirang ruby script examples\n"
        ari_author  = "pilot <pilot@monkey.org>\n"

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

     def asadal
         ariconnect
         buf  = "GET / HTTP/1.1\r\n"
         buf += "Host: #{$ari_host}\r\n\r\n"
         response = arisend(buf)
         iframe = response.scan(/<iframe.+src=(.+).+<\/iframe>/)
         puts "#{$ari_host} - iframe url #{iframe} "
     end

end