Generator Password

By Annaiidziithaa on Oct 03, 2011

Here I leave my first post on this forum, I hope you enjoy this password generator I did, please comment :P

on $*:text:/^[!@.+](password)/Si:#:{
  tokenize 32 $strip($1-)
  if (!%password) { inc -u10 %password
    set %y $iif($left($1,1) = @,.msg #,.notice $nick)
var %i = 0, %pass | while (%i < 22) { | %pass = %pass $+ $iif($r(1,2) == 1, $r(0,9), $r(A,z)) | inc %i 1 } | %y 12 $nick 1Request made to generate a password for use, password is1 %pass } }

Comments

Sign in to comment.
DragonHeart   -  Nov 11, 2012

Interesting script, anyway to add special characters such as ! @ # $ etc... and even send a password length request?

 Respond  
Jethro   -  Oct 06, 2011

Then I'm the scarface. "Say hello to my little friend. I bury those cockroaches..!!!"

 Respond  
  -  Oct 05, 2011

Hey if its a mafia I'm the Godfather then :P

 Respond  
Jethro   -  Oct 05, 2011

I don't why he keeps calling users here as a gang and crew. What is next, a mafia?

 Respond  
  -  Oct 05, 2011

*Slings poo :P

 Respond  
_Dean_   -  Oct 05, 2011

MakiMaki, the only person here being qualified to instill MSL into Dean's head is jaytea.

did you already see, jaytea posting the same bullsh­it­ as you do?
did you already see jaytea, starting any fight with any member in here, like you always do? cause you always start off-topics here... if you're reading this, please check above and see who started all the off-topic discussion...

and for sure... you and your gang are just kindergarten students near of jaytea

 Respond  
Jethro   -  Oct 05, 2011

MakiMaki, the only person here being qualified to instill MSL into Dean's head is jaytea. All other people are nothing but wannabes to him. It's been going on like this for a long period of time. It's always gotta be Dean's way or the highway.

 Respond  
  -  Oct 05, 2011

It wasnt a challenge, it was to show the validation of why the regsubex was not needed that in the longer sloppy way that did it achieved the goal you wanted and was less code then adding the regsubex in., tho if you want to do a code challenge I am More then game to see how small, Yet most usable the snippet is in the end. tho I think I would like to go for something that is more of a challenge that will really make myself think.

 Respond  
_Dean_   -  Oct 05, 2011

MakiMaki, so now we're working and discussing about how many chars the code can be done...
if yes, challenge accepted

jaytea Thanks for the contribution, i didnt even think in use

$iif($r(/,z) isalnum,$v1)

to remove special characters

 Respond  
Annaiidziithaa   -  Oct 05, 2011

in this forum, trying to better the work we do, there are some comments that seem to those in the nursery school playgrounds, we must understand that if a piece is working correctly, you do not have to criticize others
¿Pride? Am I better than you? think that every idea is good if they work, and save the comments without the slightest logic.

 Respond  
jaytea   -  Oct 05, 2011

a couple more for fun purposes (much more fun for a comment section to digress into a bunch of frivolous code shortening rather than a slew of poo flinging, no? :P):

  $mid($(,$str(iif($r(/,z) isalnum,$v1) $!+ $,138)),25,22)
  $mid($(,$str(if($r(/,z) isalnum,$v1) $!+ $!~i,138)),-22)

each return the random 22 char alnum string. the '~' in the second line can be removed if you have the identifier warning off and no custom alias named 'i'. they each have a 0.000000000000000000000000000000000000000000000000000000000000002504305204445570213476583464475 chance of failing.

 Respond  
  -  Oct 05, 2011

very true less don't always mean better, but for this I think its more the fact of showing that regsubex was not needed to archive the desired output

 Respond  
jaytea   -  Oct 05, 2011

you could slap ~70 chars off your password generation with:

while $len(%p) < 22 var ,%p %p $+ $iif($r(/,z) isalnum,$v1)

does that mean you should? no! code size is not always a good measure of code quality :P

 Respond  
Jethro   -  Oct 05, 2011

lol MakiMaki. I hope you're not detonating the "time bomb" for posting that. Let's pray that it's as dead as a dud.

 Respond  
  -  Oct 05, 2011

Size of password.mrc is: 330 characters <My Version

on $*:text:/^([!@.+])password$/Si:#:{
  if (!%flood) {
    var %i 22, %p | set -u10 %flood 1 
    while (%i) { %p = %p $+ $iif($r(1,2) == 1,$r(0,9),$iif($r(1,2) == 1,$chr($r(65,90)),$chr($r(97,122)))) | dec %i }
    $iif($regml(1) == @,.msg #,.notice $nick) 12 $nick 1Request made to generate a password for use, password is1 %p 
} }

all using the while loop.

  • Size of password.mrc is: 303 characters < Jethros version + flood Protect
  • Size of password.mrc is: 330 characters <My Version *does not add punctuation chars, + flood Protect
  • Size of password.mrc is: 349 characters < Posted version
  • Size of password.mrc is: 369 characters < Deans Version *does not add punctuation chars + flood Protect
 Respond  
Jethro   -  Oct 05, 2011

So, you are up against the idea of a flood control? Or just your pet peeve? :/ I do know some people want it, as kiddos abuse it by way of scrolling big time.

 Respond  
jaytea   -  Oct 05, 2011
 Respond  
Jethro   -  Oct 05, 2011

Ok jaytea, you have a valid point there. I rest my case. :P lol

SunnyD, you can never be too careful as far as the saying goes, especially when it comes to being flooded.

 Respond  
Sorasyn   -  Oct 05, 2011

Personally I don't see the need to incorporate flood control. All it does is occupy space and add unnecessary bytes to an otherwise small/simple snippet. There's a fine line for when it's called for and when it's just in the way. The only time I would actually use such a technique is if the snippet proves to be exceedingly popular and processes a high amount of traffic.

 Respond  
jaytea   -  Oct 04, 2011

jaytea, I see what you were getting at now. I could've added the -p switch to ignore the PM only for 10 seconds after sending a trigger control warning notice as shown in my 2nd approach.

'added'!? that's worse! look:

hey guys, try out my new !password script ok !password random password is: kdsjhdslhefew haha nick1 can't see what i say for 10 seconds hey nick1, your mom's a slag

i really don't know how to explain it in simpler terms

 Respond  
  -  Oct 04, 2011

Okies your right there how ever still not needed.

%pass = %pass $+ $iif($r(1,2) == 1, $r(0,9),$iif($r(1,2) == 1, $chr($r(65,90)),$chr($r(97,122)))
 Respond  
_Dean_   -  Oct 04, 2011

its not special characters its punctuation...

http://en.wikipedia.org/wiki/Ascii

$r(A,z) will include:
[]^_`

by the way, i just added an option where ppl can choose how many characters their passwords can be done

 Respond  
  -  Oct 04, 2011

Dean it was pointless, as one 0-9 and A-z eh No special characters to strip out.
I most certainly did analyze your code and went wtf what was the point in doing that and using the while, you added regsubex to something that did not need it as well wasted the the use of it to strip the special characters that were not even there

on $*:text:/^([!@.+])password\s(\d+)$/Si:#:{
  if (!%password) { 
    inc -u10 %password
    var %y $iif($left($1,1) = @,.msg #,.notice $nick), %i = 0, %pass
    while (%i < $regml(2)) { 
      %pass = %pass $+ $iif($r(1,2) == 1, $r(0,9),$r(A,z)) 
      inc %i 
    } 
    %y 12 $nick 1Request made to generate a password for use, password is1 $regsubex(%pass,/[[:punct:]]/g,$r(a,z))
  }
}

Your code there please tell me were a special character will be gen, that you would even need to strip it out?
you really did go left field on this whole thing.

 Respond  
Jethro   -  Oct 04, 2011

Dean wrote:> for the "smartest" guys, i was waiting till someone post something like thisAre you suggesting all of us are acting smart to call you stupid, which you aren't?

 Respond  
_Dean_   -  Oct 04, 2011

Jethro stop with your off-comments as ever, trying to put ppl against me

No one in his freaking mind should be smarter than he is.

i didnt say that, i just said that ppl didnt analize why i put the $regsubex and then told it was pointless...
if you want to know why i used $regsubex re-read the post above

 Respond  
Jethro   -  Oct 04, 2011

jaytea, I see what you were getting at now. I could've added the -p switch to ignore the PM only for 10 seconds after sending a trigger control warning notice as shown in my 2nd approach.

 Respond  
Jethro   -  Oct 04, 2011

MakiMaki, I told you so. You can't offer your own suggestion toward Dean's. No one in his freaking mind should be smarter than he is. He sees his own examples and suggestion to be supreme and other people's as the lowest of the low. And yet he tells people to behave normally like an adult, not be crazy. Look at his post and you should think twice. All I can say is, people, ignore him, pretending you have seen nothing of his posts.

jaytea, that was the idea to completely ignore a person for 10 seconds after triggering the script.

 Respond  
  -  Oct 04, 2011

Google, Yahoo,MSN,Any Mail.com, Godaddy, Dyndot,Buzzen,VibeSn,Phreik,,My own Cpanel. Lots of forums,
allow Passwords like this: K7#g2'q2&E9&C3)r1,t2(t3#_9.e6$I5)]7/ <<< was Gen using the regesubex I posted.
in fact use the password gen for Mysql? it will gen a password like that. there for your baseless claim is just that, baseless.
No site I have been on allow just special characters. and none of us posted any thing that gen such. So get out of left field please.
If I need to Dean I will make accounts with all those listed and post the login info just so you can see.
Further more I simply comment that the while loop is pointless if your going to use regesubex as in your post you show my point.
Before jumping the gun and getting Upset read and understand whats being posted

 Respond  
_Dean_   -  Oct 04, 2011

and Dean the while loop is not needed if your using regesubex

i kept the code in the way it is, if you want a pass generator doesnt even need that amount of code MakiMaki
if you check what i said, i put the $regsubex to replace the punctuation thats some websites doesnt allow it...

MakiMaki, if I make that comment on Dean's, all hell breaks loose.

it happens when ppl try to be the smartest person on the entire website, when you already know it, like MakiMaki
did, without even check the entire code... i just added an option so you can type !password N and it will generate N characters password

That was a baseless claim. Some websites do suggest the use of punctuation characters to make a password more secure.

some websites allow the * as password, but i didnt even see one, that allow %$#@!?:.><[]{}-+

if you find at least 10 websites that allow passwords like that, so i change my mind

for the "smartest" guys, i was waiting till someone post something like this

on $*:text:/^!password\s(\d+)$/iS:#:{
  notice $nick password: $regsubex($str(.,$($regml(1))),/./g,$iif($r(1,2) == 1,$r(A,z),$r(0,9)))
}

but they didnt... as i said, if someone post their codes, our advice is make this code better, in the way it is
and not modifying the entire script

 Respond  
jaytea   -  Oct 04, 2011

The reason I've used the ignore command for the trigger protection is that it equates to the use of:

if (!%flood) inc -u10 %flood

not at all. have you forgotten that /ignore discards messages from the user and causes them to not appear on your screen??

 Respond  
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.