# arirang ruby script example

class Arirang

@ari_port = 22

     def baedal
        ari_title   = "ssh version banner \n"
        ari_desc    = "arirang is not port scanner ^^ \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 = "arirang"
         response = arisend(buf)
         response.each_line do |line|
           x = line.match(/^SSH-(.+)/)
             if x != nil
              y = "#{$ari_host} - #{$ari_sport}/tcp - #{x[1]}\n"    
              ariprint(y)
          end
        end
     end

end

