All pastes #421607 Raw Edit

rubypassgen

public ruby v1 · immutable
·published 2007-04-02 22:25 UTC
rendered paste body
#!/usr/bin/env rubylower = "abcdefghijklmnopqrstuvwxyz"upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"nums = "0123456789"len = 10times = 5time = 0until time == times  out = ""  until out.length == len    which = rand(3)    if which == 0      char = lower.slice(rand(lower.length))    end    if which == 1      char = upper.slice(rand(upper.length))    end    if which == 2      char = nums.slice(rand(nums.length))    end    out << char  end  puts out  time = time + 1end