hello i decided to make my old mkpass thing with no alias and you really can't beat this
same command !mkpass
but select the number of digits
!mkpass 1
!nkpass 2
!mkpass 3
!mkpass 4
!mkpass 5
!mkpass 6
!mkpass 7
!mkpass 8
!mkpass 9
!mkpass 10
!mkpass 11
see simple
on 1:TEXT:!mkpass 1:#:{
msg $chan your generated password is... $r(A,Z)
}
on 1:TEXT:!mkpass 2:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z)
}
on 1:TEXT:!mkpass 3:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9)
}
on 1:TEXT:!mkpass 4:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z)
}
on 1:TEXT:!mkpass 5:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z)
}
on 1:TEXT:!mkpass 6:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9)
}
on 1:TEXT:!mkpass 7:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z)
}
on 1:TEXT:!mkpass 8:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z)
}
on 1:TEXT:!mkpass 9:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9)
}
on 1:TEXT:!mkpass 10:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z)
}
on 1:TEXT:!mkpass 11:#:{
msg $chan your generated password is... $r(A,Z) $+$r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z) $+ $r(0,9) $+ $r(A,Z) $+ $r(a,z)
}
I personally would suggest other examples, that exhibit a more random function than this particular snippet. Not only is it limited (and a large snippet for the simple function it provides), but notice there is a pattern to it. Usually random passwords rely on the fact that in using alphanumeric characters, a password of given length (say 3 characters for simplicity) will have 62^3, or 238328 possible combinations. Compare that to !mkpass 3 here, where you get 26 26 10, or 6760 combinations (only 2.8% of the total of true random). It guarantees to someone looking to break your password that your first letter will ALWAYS be an uppercase letter, your second a lowercase letter, and your third a number, and in repeating order.
Dont know what made me comment when I haven't in so long but anyhow....
Here is the makepass alias I came up with some time ago on a whim.
It defaults to a random pass between 12 and 18 characters but you can select the ammount of characters like '$makepass(10)' or '/makepass 10'.
It randomizes using numbers and upper and lower case letters.
It's also set to output differently depending on how it is used. If you use it like $makepass() it will simply return it, and if u use it like /makepass it will echo it.
alias makepass {
var %go $iif($1 isnum,$v1,$r(12,18))
while (%go) {
var %pass %pass $+ $iif($r(1,3) == 1,$r(a,z),$iif($v1 == 2,$r(A,Z),$iif($v1 == 3,$r(0,9))))
dec %go
}
$iif($isid,return,echo -a) %pass
}
I think macs-rock was putting all the code together through the copying and pasting in a hurry that he forgot to leave a space between:> $+$r(a,z) there is a space between $+ and $r(a,z) without the space, that identifier will be negated.
One thing about using $str() is that all the generated password will appear the same. Take jonesy's example, and we make it 5, it'll generate a set of 5 random letters like so, > mmmmmLastly, the approach macs-rock's gone for is rather repetitive and inefficient, making the code bigger than it should.
You could of just set a var and made it add a specfic pattern of different rands of chrs per the $2 number, as this would be not only very limited but also not completly random at all, since it will also be letter - letter - number ...etc which was showed in the previous version of this script, where you should have posted the updated one instead of creating a new post.