Password Generator

By PowerDragon on Feb 19, 2007

put in remotes (ALT+R)
just type /createpass to use it

alias createpass {
  var %a
  if ($1 == -alnum) {
    %a = 1
    tokenize 32 $2-
  }
  var %i = $iif($1 isnum 5-50,$int($1),$rand(10,15)),%r,%t,%z,%o
  while (%i) {
    %t = $r(1,$iif(%a,4,5))
    if (%t isnum 1-2) { %z = $r(0,9) }
    elseif (%t == 3) { %z = $r(a,z) }
    elseif (%t == 4) { %z = $r(A,Z) }
    else { %z = $mid([]()<>?!+-*:=~$&/_|%#,$r(1,21),1) }
    if (%o !=== %z) && ($count(%r,%z) < 2) { %r = %r $+ %z }
    else { continue }
    %o = %z
    dec %i
  }
  $iif($isid,return,thmecho -a Created random $iif(%a,alpha-numeric) password:) %r
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.