# arirang ruby script example
# export PROXY_TYPE="RELAY"
# required the -X option
# eg) arirang -X yourproxy:3128 -R rbots_relay.rb -h yourhost/24

class Arirang

#@ari_port = 80

     def baedal
        ari_title   = "webserver robots.txt 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://#{$ari_host}/robots.txt HTTP/1.0\r\n\r\n"
         response = arisend(buf)
         response.each do |line|
            if line =~ /200 OK*/
                z = "#{$ari_host} - robots.txt found ^_^;;"
                ariprint(z)
            end
         end

     end

end