Jump to content
Sign in to follow this  
ashley

Pass maker

Recommended Posts

ashley

ok, i another passmake on the fourm so i desided to make one for my self...

Its still very buggy...

heres my code:(not fully finished yet(help would be nice))

#include <GUIConstants.au3>



#Region ### START Koda GUI section ### Form=
$Passgen = GUICreate("Pass gen - RuneCheater", 175, 209, 193, 115)
$Simple = GUICtrlCreateCheckbox("Simple", 8, 8, 97, 17)
$Normal = GUICtrlCreateCheckbox("Normal", 8, 32, 97, 17)
$Expert = GUICtrlCreateCheckbox("Expert", 8, 56, 97, 17)
$include = GUICtrlCreateLabel("The password must include:", 8, 80, 136, 17)
$letter1 = GUICtrlCreateInput("", 8, 104, 25, 21)
$letter2 = GUICtrlCreateInput("", 40, 104, 25, 21)
$Letter3 = GUICtrlCreateInput("", 72, 104, 25, 21)
$Letter4 = GUICtrlCreateInput("", 104, 104, 25, 21)
$Letter5 = GUICtrlCreateInput("", 136, 104, 25, 21)
$Newpass = GUICtrlCreateButton("Whats my password?", 8, 136, 155, 25, 0)
$Newpass1 = GUICtrlCreateInput("", 8, 176, 153, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Newpass
        If Not GUICtrlRead($letter1) = "" Then
        $1 = GUICtrlRead($letter1)
        $2 = GUICtrlRead($letter2)
        $3 = GUICtrlRead($letter3)
        $4 = GUICtrlRead($letter4)
        $5 = GUICtrlRead($letter5)
        
        GUICtrlSetData($Newpass1, $1 + $5 + $4 + $2 + $3)
    Else
        GUICtrlSetData($newpass1, genPassword(5))
EndIf

    EndSwitch
WEnd
Func genPassword($length)
    $array = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","")

    $newPassword = ""
    For $X = 1 to $length
        $newPassword &= $array[Random (1, $array[0], 1)]
    Next

    return $newPassword
EndFunc

thanks to weaponx

Edited by ashley

Share this post


Link to post
Share on other sites
AlmarM

Lol I brought you on ideas :P ?

Only the The password must include: wont work lol..

And why a 5 lenght pass? At my script you can choose yourself how long it sould be ;)

Anyway I like the way you did the 5 things at the same time


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
SmOke_N

What is this supposed to do?

GUICtrlSetData($Newpass1, $1 + $5 + $4 + $2 + $3)

Also, how does the password not change for that person? Every time it is ran, it would end up being something different more than likely because of your random function.

You may want to take some time and re-think what you are doing.

Edit:

I also see that you used something from weaponx: http://www.autoitscript.com/forum/index.ph...st&p=433343 without giving him credit for it.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
SmOke_N

opps sorry about that weaponx.

thats ment to read the letters that they want in it but that dont work...

You don't find it weird that you are using addition there rather than concatenation?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
AlmarM

I also see that you used something from weaponx: http://www.autoitscript.com/forum/index.ph...st&p=433343 without giving him credit for it.

Hahaha I already saw that only I tought it was from him lol :P

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
weaponx

It's not a big deal. Although I did write that piece from scratch I didn't include any author info in it. I just like to encourage people to use the least amount of code possible.

Here is your proper code:

#include <GUIConstants.au3>

$Passgen = GUICreate("Pass gen - RuneCheater", 175, 209, 193, 115)
GUISetState(@SW_SHOW)

$Simple = GUICtrlCreateCheckbox("Simple", 8, 8, 97, 17)
$Normal = GUICtrlCreateCheckbox("Normal", 8, 32, 97, 17)
$Expert = GUICtrlCreateCheckbox("Expert", 8, 56, 97, 17)
$include = GUICtrlCreateLabel("The password must include:", 8, 80, 136, 17)
$letter1 = GUICtrlCreateInput("", 8, 104, 25, 21)
$letter2 = GUICtrlCreateInput("", 40, 104, 25, 21)
$Letter3 = GUICtrlCreateInput("", 72, 104, 25, 21)
$Letter4 = GUICtrlCreateInput("", 104, 104, 25, 21)
$Letter5 = GUICtrlCreateInput("", 136, 104, 25, 21)
$Newpass = GUICtrlCreateButton("Whats my password?", 8, 136, 155, 25, 0)
$Newpass1 = GUICtrlCreateInput("", 8, 176, 153, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Newpass
            If Not GUICtrlRead($letter1) = "" Then
            $1 = GUICtrlRead($letter1)
            $2 = GUICtrlRead($letter2)
            $3 = GUICtrlRead($letter3)
            $4 = GUICtrlRead($letter4)
            $5 = GUICtrlRead($letter5)
       
        ;I hope these are meant to be out of order        
        GUICtrlSetData($Newpass1, $1 & $5 & $4 & $2 & $3)
    Else
        GUICtrlSetData($newpass1, genPassword(5))
EndIf

    EndSwitch
WEnd
Func genPassword($length)
    $array = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","")

    $newPassword = ""
    For $X = 1 to $length
        $newPassword &= $array[Random (1, $array[0], 1)]
    Next

    return $newPassword
EndFunc
Edited by weaponx

Share this post


Link to post
Share on other sites
AlmarM

It's not a big deal. Although I did write that piece from scratch I didn't include any author info in it. I just like to encourage people to use the least amount of code possible.

Here is your proper code:

#include <GUIConstants.au3>

$Passgen = GUICreate("Pass gen - RuneCheater", 175, 209, 193, 115)
GUISetState(@SW_SHOW)

$Simple = GUICtrlCreateCheckbox("Simple", 8, 8, 97, 17)
$Normal = GUICtrlCreateCheckbox("Normal", 8, 32, 97, 17)
$Expert = GUICtrlCreateCheckbox("Expert", 8, 56, 97, 17)
$include = GUICtrlCreateLabel("The password must include:", 8, 80, 136, 17)
$letter1 = GUICtrlCreateInput("", 8, 104, 25, 21)
$letter2 = GUICtrlCreateInput("", 40, 104, 25, 21)
$Letter3 = GUICtrlCreateInput("", 72, 104, 25, 21)
$Letter4 = GUICtrlCreateInput("", 104, 104, 25, 21)
$Letter5 = GUICtrlCreateInput("", 136, 104, 25, 21)
$Newpass = GUICtrlCreateButton("Whats my password?", 8, 136, 155, 25, 0)
$Newpass1 = GUICtrlCreateInput("", 8, 176, 153, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Newpass
            If Not GUICtrlRead($letter1) = "" Then
            $1 = GUICtrlRead($letter1)
            $2 = GUICtrlRead($letter2)
            $3 = GUICtrlRead($letter3)
            $4 = GUICtrlRead($letter4)
            $5 = GUICtrlRead($letter5)
       
        ;I hope these are meant to be out of order        
        GUICtrlSetData($Newpass1, $1 & $5 & $4 & $2 & $3)
    Else
        GUICtrlSetData($newpass1, genPassword(5))
EndIf

    EndSwitch
WEnd
Func genPassword($length)
    $array = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","")

    $newPassword = ""
    For $X = 1 to $length
        $newPassword &= $array[Random (1, $array[0], 1)]
    Next

    return $newPassword
EndFunc
@weaponx

Nice ;)

And take a look at the credits I put on my Topic

I used the _Randomize($Length) from you ^^

@ashley

We sould make a script together :)

And I did take something from your script as well :P

Take a look at the credits ^^


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
ashley

Neaver mind... ive done what i needed..

A friend needed one a while back... and AlmarM remined me....

Ive mnade it for him now.. anyways..

Thanks for all the help

Share this post


Link to post
Share on other sites
weaponx

hmm... why not?

#include <String.au3>
Func GetPassword($length)
    Return StringLeft((_StringEncrypt(1,Random(0,1),Random(0,1))),$length)
EndFuncoÝ÷ Ûú®¢×·
+ÌR-¯+hjú"v¯xz§uéÜë%G­«R¶¸§    l Z½êÞqéí(ZuÊ&¦XjبÌ"¶®Ö¢ÈZ­§--«e¢)§éÞ­«b
Z²Ì(­Û¢¹ÞÁé©zĨºÈ§Øb±û§rب
.Ø"½é¶­ç¢kh¢yrjYhÁÇ«µ¨§r«iË^®È    è­ìÞ®§tê'y©Ý©Ýqªbµ©bjëh×6Func genPassword($length)
    $array = StringSplit("abcdefghijkmnopqrstuvwxyzABCDEFGHIJKMNPQRSTUVWXYZ23456789","")

    $newPassword = ""
    For $X = 1 to $length
        $newPassword &= $array[Random (1, $array[0], 1)]
    Next

    return $newPassword
EndFunc

Share this post


Link to post
Share on other sites
karman

func rndstring($l)
    local $password = ''
    for $i = 1 to $l
        $rnd = random(0, 3, 1) ; Number or char ?
        switch $rnd
            case 0
                $password &= chr(random(97,122, 1))
            case 1
                $password &= random(0, 9, 1) ; 0-9
            case 2 
                $password &= chr(random(65,90,1)); uppercase char
            case 3
                $password &= chr(random(35,43,1)) ; some signs
        EndSwitch
    Next
    return $password
endfunc

updated a bit. will return strings like

aJ30u+#wf'
5M($B*T*v3
l)*KL*VlV$
&**42DNSL1
4xcv'i0+(x
P8)lIx(55)
011R0)9&A1
S#j5HIw5W4
5n0e$Y638t
zwz)%H%7as
Edited by karman

Share this post


Link to post
Share on other sites
themax90

#Include <GUIConstants.au3>
; Combine types using BitOr.
Global Const $PasswordLettersUp = 1; Uppercase
Global Const $PasswordLettersDown = 2; Lower Case
Global Const $PasswordNumbers = 4; Numbers
Local $PasswordType = 0
Global $GUI = GUICreate("Password Generator", 400, 55)
Global $PwFin = GUICtrlCreateInput("", 10, 10, 200, 20, $ES_READONLY)
Global $Nums = GUICtrlCreateInput("", 220, 10, 50, 20)
Global $Go = GUICtrlCreateButton("Generate", 280, 10, 110, 20)
Global $Upper = GUICtrlCreateCheckbox("Uppercase", 10, 30, 100)
Global $Lower = GUICtrlCreateCheckbox("Lowercase", 110, 30, 110)
Global $Numbers = GUICtrlCreateCheckbox("Numbers", 220, 30, 220)
GUISetState(@SW_SHOW, $GUI)
While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Go
        If GUICtrlRead($Upper) = $GUI_CHECKED Then $PasswordType = BitOr($PasswordType, $PasswordLettersUp)
        If GUICtrlRead($Lower) = $GUI_CHECKED Then $PasswordType = BitOr($PasswordType, $PasswordLettersDown)
        If GUICtrlRead($Numbers) = $GUI_CHECKED Then $PasswordType = BitOr($PasswordType, $PasswordNumbers)
        GUICtrlSetData($PwFin, GetPass(GUICtrlRead($Nums), $PasswordType))
        $PasswordType = 0
    EndSelect
WEnd
Exit
; ============================================================================
; Combine types using BitOr.
; Global Const $PasswordLettersUp = 1; Uppercase
; Global Const $PasswordLettersDown = 2; Lower Case
; Global Const $PasswordNumbers = 4; Numbers
; ============================================================================
; AutoIt Version : 3.1.1.130
; Author :      Max Gardner(AutoIt Smith;king.of.all@comcast.net)
; Description :
;       This function will create a completely random password based on number of
;   characters and the type you want.
;
; $PassworcharLimit = Number of characters in your password
; $PasswordType = Upper-Lower Case and Number mix.
; 1 = Uppercase $PasswordLettersUp
; 2 = Lowercase $PasswordLettersDown
; 3 = Uppercase and Lowercase BitOr($PasswordLettersUp, $PasswordLettersDown)
; 4 = Numbers $PasswordNumbers
; 5 = Uppercase and Numbers BitOr($PasswordLettersUp, $PasswordNumbers)
; 6 = Lowercase and Numbers BitOr($PasswordLettersDown, $PasswordNumbers)
; 7 = Uppercase, Lowercase, and Numbers BitOr($PasswordLettersUp, $PasswordLettersDown, $PasswordNumbers)
; ============================================================================
Func GetPass($PasswordCharLimit = 16, $PasswordType = 7)
    Local $Track = 1
    Local $Password = ""
    For $Track = 1 To $PasswordCharLimit Step 1
        $Password = $Password & GetChar($PasswordType)
    Next
    Return $Password
EndFunc  ;==>GetPass
Func GetChar($PwType)
    Local $Pw[3]
    Select
        Case $PwType = 1
            Return Chr(Random(65, 90, 1))
        Case $PwType = 2
            Return Chr(Random(97, 122, 1))
        Case $PwType = 3
            $Pw[0] = Random(65, 90, 1)
            $Pw[1] = Random(97, 122, 1)
            Return Chr($Pw[Random(0, 1, 1) ])
        Case $PwType = 4
            Return Chr(Random(48, 57, 1))
        Case $PwType = 5
            $Pw[0] = Random(48, 57, 1)
            $Pw[1] = Random(65, 90, 1)
            Return Chr($Pw[Random(0, 1, 1) ])
        Case $PwType = 6
            $Pw[0] = Random(48, 57, 1)
            $Pw[1] = Random(97, 122, 1)
            Return Chr($Pw[Random(0, 1, 1) ])
        Case $PwType = 7
            $Pw[0] = Random(48, 57, 1)
            $Pw[1] = Random(65, 90, 1)
            $Pw[2] = Random(97, 122, 1)
            Return Chr($Pw[Random(0, 2, 1) ])
    EndSelect
EndFunc  ;==>GetChar

Char based one I made a while ago. Radios tell what type you will use, lower, upper, and numerics. Are used in combination. The second input is the how many characters.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×