Ultimate Password Generator

Platform:  mIRC
Published  Sep 06, 2011
Updated  Sep 07, 2011
The only mIRC password generator where you can customize the passwords exactly the way you want it, to meet your security needs AND be able to safely store your password. Saving a password which can be seen in the image will be saved like n>Z¶1.F¶Ni*W¶A1.j¶qQH* and can only be decoded using your keyword.

(background not included)


Generate the password you want, store it safely and use it whenever you need it! It couldn't be easier to secure everything you need.

Uses my super safe encodex/decodex alias which can also be found here on hawkee. dialog pwgenerate {
title "Password Generator by Dani l11"
size -1 -1 151 291
option dbu
radio "Between", 1, 5 40 33 10, group
radio "Around", 2, 5 50 31 10
edit "5", 3, 38 40 13 9, limit 2
edit "15", 4, 64 40 13 9, limit 2
text "and", 5, 52 41 10 8
edit "10", 7, 38 51 14 9, limit 2
text "%", 8, 78 41 8 8
text "%", 9, 55 52 8 8
box "Uppercase", 6, 2 31 144 31
box "Numbers", 10, 2 65 144 31
radio "Between", 11, 5 74 33 10, group
radio "Around", 12, 4 83 32 10
edit "5", 13, 38 74 13 9, limit 2
edit "15", 14, 64 74 13 9, limit 2
text "and", 15, 52 75 10 8
edit "10", 16, 38 85 14 9, limit 2
text "%", 17, 78 75 8 8
text "%", 18, 53 86 8 8
box "Lowercase", 19, 2 5 144 22
edit "", 25, 33 14 14 9, disable limit 2
text "%", 27, 48 15 8 8
box "Symbols", 28, 2 98 144 42
radio "Around", 29, 5 117 31 10, group
edit "5", 30, 38 107 13 9, limit 2
text "and", 31, 52 108 10 8
edit "10", 32, 38 118 14 9, limit 2
text "%", 33, 78 108 8 8
text "%", 34, 54 119 8 8
edit "15", 35, 64 107 13 9, limit 2
radio "Between", 36, 5 107 33 10
text "This symbols will be used:", 37, 6 128 64 8
edit "!@#$%^&*()`~-_+=[]{}\|/?><.,;'", 38, 73 127 69 10, autohs
box "Characters", 39, 2 141 144 31
radio "Exactly", 40, 5 160 33 10, group
edit "20", 41, 38 150 13 9, limit 2
text "and", 42, 52 151 10 8
edit "25", 43, 38 160 14 9, limit 2
text "long", 45, 53 161 14 8
edit "30", 46, 63 150 13 9, limit 2
radio "Between", 47, 5 150 33 10
text "long", 44, 77 151 14 8
text "Around", 20, 6 15 25 8
list 21, 4 176 143 80, size hsbar
button "Generate", 22, 14 258 34 12
edit "40", 23, 52 260 18 9
button "Clipboard", 24, 74 258 51 12
button "Generate on a larger list", 48, 14 274 74 12
button "Save password", 26, 91 274 43 12
}


on *:dialog:pwgenerate:init:0:{
var %y = 3 4 13 1 14 7 16 30 35 32 38 41 46 43 23
var %x = 1
while ($gettok(%y,%x,32)) {
if ($readini(pwgenerate.ini,edit,$v1)) did -ra $dname $gettok(%y,%x,32) $v1
inc %x
}
var %y = 1 2 11 12 36 29 40 47,%x = 1
while ($gettok(%y,%x,32)) {
if ($readini(pwgenerate.ini,state,$v1)) did -c $dname $gettok(%y,%x,32)
inc %x
}
var %x = 1,%tpc
var %list = 1[3-4 2[7 11[13-14 12[16 36[30-35 29[32
while ($gettok(%list,%x,32)) {
var %l = $v1
if ($did($gettok(%l,1,91)).state) {
var %ids = $gettok(%l,2,91)
inc %tpc $round($calc(( $did($gettok(%ids,2,45)) + $did($gettok(%ids,1,45)) ) / $numtok(%ids,45)),0)
}
inc %x
}
if (%tpc >= 100) var %ta = 0
else var %ta = $calc(100 - %tpc)
did -ra $dname 25 %ta

}
on *:dialog:*:sclick:*:{
if ($dname == generatorxxl) goto xxl
if ($dname != pwgenerate) halt
if ($did == 26) pwsave $left($did(21).seltext,-4)
var %states = 1 2 11 12 36 29 40 47
if ($istok(%states,$did,32)) {
var %x = 1
while ($gettok(%states,%x,32)) {
writeini pwgenerate.ini state $v1 $did($v1).state
inc %x
}
}
if ($istok(1 2 11 12 36 29,$did,32)) {
var %x = 1,%tpc
var %list = 1[3-4 2[7 11[13-14 12[16 36[30-35 29[32
while ($gettok(%list,%x,32)) {
var %l = $v1
if ($did($gettok(%l,1,91)).state) {
var %ids = $gettok(%l,2,91)
inc %tpc $round($calc(( $did($gettok(%ids,2,45)) + $did($gettok(%ids,1,45)) ) / $numtok(%ids,45)),0)
}
inc %x
}
if (%tpc >= 100) var %ta = 0
else var %ta = $calc(100 - %tpc)
did -ra $dname 25 %ta
}
if ($did == 24) {
clipboard $left($did(21).seltext,-4)
}
:xxl
if (($did == 22 || $did == 48) && ($dname == pwgenerate)) || ($did == 2 && $dname == generatorxxl) {
if ($dname == pwgenerate && $did == 48) && (!$dialog(generatorxxl)) dialog -md generatorxxl generatorxxl
if ($did == 48) var %lg = true
var %counter = 1
did -r $dname $iif($dname == generatorxxl,4,21)
if ($dname == pwgenerate) var %maxi = $iif($did(23),$v1,1)
else var %maxi = $iif($did(3),$v1,1)
while (%counter <= %maxi) {
var %chrlen,%numlen,%uplen,%mlen,%cl,%lclen
var %pwlen = $iif($did(pwgenerate,47).state,$r($did(pwgenerate,41),$did(pwgenerate,46)),$did(pwgenerate,43))
if ($did(pwgenerate,36).state) var %chrlen = $round($calc(%pwlen * ($r($did(pwgenerate,30),$did(pwgenerate,35)) / 100)),0)
else var %chrlen = $round($calc(%pwlen * (($did(pwgenerate,16) $iif($r(0,1),+,-) $r(0,5)) / 100)),0)
if (%chrlen < $did(pwgenerate,30)) inc %chrlen
if (%chrlen > $did(pwgenerate,35)) dec %chrlen

if ($did(pwgenerate,1).state) var %uplen = $round($calc(%pwlen * ($r($did(pwgenerate,3),$did(pwgenerate,4)) / 100)),0)
else var %uplen = $round($calc(%pwlen * (($did(pwgenerate,7) $iif($r(0,1),+,-) $r(0,5)) / 100)),0)
if (%uplen < $did(pwgenerate,3)) inc %uplen
if (%uplen > $did(pwgenerate,4)) dec %uplen

if ($did(pwgenerate,11).state) var %numlen = $round($calc(%pwlen * ($r($did(pwgenerate,13),$did(pwgenerate,14)) / 100)),0)
else var %numlen = $round($calc(%pwlen * (($did(pwgenerate,16) $iif($r(0,1),+,-) $r(0,5)) / 100)),0)
if (%numlen < $did(pwgenerate,13)) inc %numlen
if (%numlen > $did(pwgenerate,14)) dec %numlen
if ($calc(%chrlen + %uplen + %numlen) > $iif($did(pwgenerate,47).state,$did(pwgenerate,46),$did(pwgenerate,43))) {
var %mlen = $v2
if (!%wmsg) {
set -u120 %wmsg spam
noop $tip(Password,Password Generator,Some passswords are longer than the specified max,10)
noop $tip(Password,Password Generator,You can prevent this from happening by editting the percentages,10)
noop $tip(Password,Password Generator,A few characters of passwords will be,10)
}
if ($calc(%chrlen + %uplen + %numlen) !> %mlen) goto next
:short
var %st = $iif(%uplen > 0,$+(%,uplen)) $iif(%chrlen > 0,$+(%,chrlen)) $iif(%numlen > 0,$+(%,numlen))
dec $gettok(%st,$r(1,$numtok(%st,32)),32)
if ($calc(%chrlen + %uplen + %numlen) > %mlen) goto short
:next
}
if ($calc(%pwlen - (%chrlen + %uplen + %numlen)) > 0) { var %lclen = $v1 }
var %cl = $len($did(pwgenerate,38))
var %pw = $+($regsubex($str(.,%uplen),/./g,$r(A,Z)),$regsubex($str(.,%lclen),/./g,$r(a,z)),$regsubex($str(.,%numlen),/./g,$r(0,9)),$regsubex($str(.,%chrlen),/./g,$mid($did(pwgenerate,38),$r(1,%cl),1)))
var %x = 1,%rpw,%l
while ($len(%pw)) {
var %l = $r(1,$len(%pw))
var %rpw = %rpw $+ $mid(%pw,%l,1)
var %pw = $left(%pw,$calc(%l - 1)) $+ $right(%pw,$calc($v1 - %l))
inc %x
}
var %goingon = $iif($dname == generatorxxl || %lg,generatorxxl,pwgenerate)
if (!$dialog(pwgenerate)) || (!$dialog($dname)) halt
if (!$dialog(generatorxxl)) && (%lg) halt
did -a %goingon $iif($dname == generatorxxl || %lg,4,21) %rpw ( $+ $len(%rpw) $+ )
inc %counter
}
}
if ($dname == generatorxxl) && ($did == 1) clipboard $left($did(4).seltext,-4)
}
on *:dialog:pwgenerate:edit:*:{
var %edits = 3 4 13 1 14 7 16 30 35 32 41 46 43 23
if ($did == 38) {
did -ra $dname $did $regsubex($did($did),/[\w ]/gi,)
writeini pwgenerate.ini edit $did $iif($did($did),$v1,0)
}
elseif ($istok(%edits,$did,32)) {
if ($did($did) !isnum) && ($v1) { did -ra $dname $did 0 | halt }
writeini pwgenerate.ini edit $did $iif($did($did),$v1,0)
}
var %x = 1,%tpc
var %list = 1[3-4 2[7 11[13-14 12[16 36[30-35 29[32
while ($gettok(%list,%x,32)) {
var %l = $v1
if ($did($gettok(%l,1,91)).state) {
var %ids = $gettok(%l,2,91)
inc %tpc $round($calc(( $did($gettok(%ids,2,45)) + $did($gettok(%ids,1,45)) ) / $numtok(%ids,45)),0)
}
inc %x
}
if (%tpc >= 100) var %ta = 0
else var %ta = $calc(100 - %tpc)
did -ra $dname 25 %ta
}

menu * {
-
Password Generator: passwordgenerator
}
alias generator generate
alias generate passwordgenerator
alias passwordgenerator dialog -mn pwgenerate pwgenerate
alias pwsave password $1-
alias password {
if ($1) {
if ($read($scriptdirpwfile.txt)) { if (!$input(There already is a password saved. Do you want to delete it?,y)) halt }
var %sdir = $sdir(hi,Select the dir were you want to save your password)
if (!%sdir) halt
var %exc = $input(Enter a keyword which you need to access the password.,e)
if (!%exc) halt
if (%exc != $input(Re-enter the keyword.,e)) { echo -a keywords did not match | halt }
write -c $qt($scriptdirpwfile.txt) $qt(%sdir)
write -c $qt(%sdir $+ mpwr.txt) $encodex(%exc,$1)
echo -a 4Password successfully saved. To load the password use /password
}
if (!$1) {
if (!$read($scriptdirpwfile.txt)) { echo -a No password saved | halt }
var %exc = $input(Enter your keyword,e)
clipboard $decodex(%exc,$read($qt($read($sciptdirpwfile.txt) $+ mpwr.txt)))
echo -a 4Password has been copied to your clipboard. You can paste it anywhere you want.
}
}


dialog generatorxxl {
title "Password Generator by Dani l11"
size -1 -1 258 324
option dbu
button "Copy to clipboard", 1, 158 309 66 12
button "Generate", 2, 8 309 47 12
edit "", 3, 59 310 50 10
list 4, 6 3 245 302, size hsbar vsbar
}


alias encodex {
if (!$isid) tokenize 44 $1-
var %kwoord = $lower($1)
var %encode = $replace($2,$chr(32),¬)
var %x = 1,%y = 1
while (%x <= $len(%encode)) {
if (%y > $len(%kwoord)) var %y = 1
var %c. [ $+ [ %y ] ] %c. [ $+ [ %y ] ] $+ $mid(%encode,%x,1)
inc %x
inc %y
}
var %kwoords = $regsubex($sorttok($left($regsubex(%kwoord,/(.)/g,$asc(\1) $+ - $+ \n $+ .),-1),46,n),/\d*-/g,)
var %x = 1,%msg
while (%x <= $numtok(%kwoords,46)) {
var %msg = %msg $+ $chr(32) %c. [ $+ [ $gettok(%kwoords,%x,46) ] ] $+ ¶
inc %x
}
var %msg = $left(%msg,-1)
var %nr = $left($regsubex($md5(%kwoord),/\D/g,),1)
$iif($isid,return,echo -a) $replace($regsubex(%msg,/([^¬¶])/g,$chr($calc($asc(\1) - %nr))),$chr(44),¾¿@zrL¢#)
}
alias decodex {
if (!$isid) tokenize 44 $1-
var %kwoord = $lower($1)
var %nr = $left($regsubex($md5(%kwoord),/\D/g,),1)
var %decode $regsubex($replace($2-,¾¿@zrL¢#,$chr(44)),/([^¬¶])/g,$chr($calc($asc(\1) + %nr)))
var %kwoords = $regsubex($sorttok($left($regsubex(%kwoord,/(.)/g,$asc(\1) $+ - $+ \n $+ .),-1),46,n),/\d*-/g,)
var %x = 1
while (%x <= $numtok(%decode,182)) {
var %c. [ $+ [ $gettok(%kwoords,%x,46) ] ] $gettok(%decode,%x,182)
inc %x
}
var %x = 1
while (%x <= $len($remove(%decode,$chr(32)))) {
var %y = 1
while (%y <= $numtok(%decode,182)) {
var %msg = %msg $+ $mid(%c. [ $+ [ %y ] ],%x,1)
inc %y
}
inc %x
}
$iif($isid,return,echo -a) $replace(%msg,¬,$chr(32))
}

Comments

Sign in to comment.
Dani_l11   -  Nov 25, 2012
Edit it, so it responds on text commands
 Respond  
DragonHeart   -  Nov 23, 2012
how can I add this to my IRC bot?
 Respond  
AnaBotNowYourGone   -  Sep 14, 2011
good script

also i still don't know what's up with the mudkips :s
 Respond  
troll   -  Sep 07, 2011
im interested in how you got the clipboard option
 Respond  
Jethro   -  Sep 07, 2011
You lazybones!
 Respond  
Dani_l11   -  Sep 07, 2011
so people can open the dialog aswell by typing /generator

Yes you're right, could've called passwordgenerator aswell, but that's more typing!
 Respond  
Frenetic   -  Sep 07, 2011
Nice script, all though; why have an alias call an alias calling another alias?
Code
 
 Respond  
Aha2Y   -  Sep 07, 2011
My Mudkip is getting popular :O

Good script.
 Respond  
troll   -  Sep 07, 2011
nice
 Respond  
Spoof   -  Sep 06, 2011
Awesome job.
 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.