# arirang ruby script example
# by pilot
#

class Arirang

    @ari_port = 21

    def baedal
        ari_title = "ftp anonymous check \n"
        ari_desc = "arirang ruby script example for ftp anonymous check\n"
        ari_author = "pilot <pilot@monkey.org>\n"
        ari_license = "BSD \n"

        puts "arirang ruby script title\n - #{ari_title}"
        puts "arirang ruby script desc\n - #{ari_desc}"
        puts "arirang ruby script author\n - #{ari_author}"
    end

    def asadal
        puts "ftp server - #{$ari_host} \n\n"
        ariconnect
        buf = "USER anonymous\r\n"
        response = arisend(buf)
        puts response
        buf = "PASS anonymous\r\n"
        response = arisend(buf)
        puts response 
        sleep(2)
        buf = "\r\n\r\n"
        response = arisend(buf)
        puts response
    end

end