Sha256: 59f32c3194cc34deecb667f496a82e2413e83387ffa78e522d6f1df9fc20edb7
Contents?: true
Size: 529 Bytes
Versions: 10
Compression:
Stored size: 529 Bytes
Contents
class Gratan::Identifier::Auto def initialize(output, options = {}) @options = options if output == '-' @output = $stdout else @output = open(output, 'w') end end def identify(user, host) password = mkpasswd puts_password(user, host, password) password end private def mkpasswd(len = 8) [*1..9, *'A'..'Z', *'a'..'z'].shuffle.slice(0, len).join end def puts_password(user, host, password) @output.puts("#{user}@#{host},#{password}") @output.flush end end
Version data entries
10 entries across 10 versions & 1 rubygems