Sorasyn commented on a Page, Yet another Random password generator  -  May 13, 2013

Seems much more compact than the one I rigged up a few days ago for a snippet I used to generate MD5 Hashes from random strings, or passwords if you will.

Matt5150  -  May 13, 2013

Yeah! There are a lot of random string snippet XD
I was bored, so I decided to make my own "random pass generator"
As you can see, there is 1/3 chance to return a number otherwise a letter (50% uppercase 50% lowercase).
XD

Sorasyn  -  May 13, 2013

I don't think arrays are built in to mIRC which is a shame. I believe I used a pre-existing character set builder class to specify which set to build from. So it can be modified to use only upper, lower, both, numerical, alpha numerical, or all characters (to a certain degree). Chosen at random, of course.

Gummo  -  May 16, 2013

I don't understand the use of $regex() in

$iif($regex($r(1,2),1),$r(a,z),$r(A,Z))

when you can use

$iif($r(0,1),$r(a,z),$r(A,Z))

The same goes for the if statement further up. If you want it to be more readable, use $r(0,1) == 1 for example.

Matt5150  -  May 16, 2013

Yeah I know that, but I used regex to make it "a little" different from the others :P
there are a lot of ways, for example letters $r(a,b)
or things a little more elaborate, like this ($right($calc($r(1,10) / 2),2) = .5)

Sorasyn  -  May 16, 2013

If you're wanting to stand out, efficiency is the place to do it. Regular expressions do a lot of string parsing, which ultimately means you end up doing much more work than necessary. Size is nothing, speed is everything.

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.