Armend Admin
Numri i postimeve : 433 Poenat e Antarit : 1591 Thanks : 16 Join date : 24/03/2009 Age : 32 Location : Kosova, Prishtin
| Titulli: Creating A Password Generator Sun May 31, 2009 12:53 pm | |
| --------------------------------------------------------------------------------
Creating A Password Generator
Sherben per krijimin e generatorit te passwordave ....
Creating A Password Generator You Will Need: 2 TextBox's // Text1.Text // txtConf 1 ListBox // List 1 4 Command Buttoms // cmdStart // cmdStop // cmdClear // Command4 (Save List) 6 CheckBox's // ChkSym // chkNum // ChkLett // chkRand // chkCaps // chkLetters 1 Combo Box // cboNum 1 Timer // TmrCount 1 Status Bar // Status
Private Sub chkRand_Click() If chkRand.Value = 1 Then chkLett.Value = 0 chkLetter.Value = 0 chkNum.Value = 0 chkSym.Value = 0 chkCaps.Value = 0 End If End Sub Private Sub cmdClear_Click() List1.Clear Text1.Text = "" End Sub Public Function GenPass() On Error Resume Next Dim Terior As String If chkNum.Value = 1 Then strinputstring = "1234567890" If chkLett.Value = 1 Then strinputstring = "abcdefghijklmnopqrstuvwxyz" If chkSym.Value = 1 Then strinputstring = "~!@#$%^&*()_+=-[]{}\|';:/.,<>?" If chkCaps.Value = 1 Then strinputstring = "ABCDEFGHIJKLMNOPQURSTVWXYZ" If chkNum.Value = 1 And chkSym.Value = 1 Then strinputstring = "12345678901234567890~!@#$%^&*()_+=-[]{}\|';:/.,<>?" If chkNum.Value = 1 And chkCaps.Value = 1 Then strinputstring = "1234567890ABCDEFGHIJKLMNOPQURSTVWXYZ012345678 9" If chkSym.Value = 1 And chkCaps.Value = 1 Then strinputstring = "ABCDEFGHIJKLMNOPQURSTVWXYZ~!@#$%^&*()_+=-[]{}\|';:/.,<>?" If chkLett.Value = 1 And chkCaps.Value = 1 Then strinputstring = "ABCDEFGHIJKLMNOPQURSTVWXYZabcdefghijklmnopqrs tuvw xyz" If chkLett.Value = 1 And chkNum.Value = 1 Then strinputstring = "12345678901234567890abcdefghijklmnopqrstuvwxy z" If chkLett.Value = 1 And chkSym.Value = 1 Then strinputstring = "~!@#$%^&*()_+=-[]{}\|';:/.,<>?abcdefghijklmnopqrstuvwxyz" If chkLett.Value = 1 And chkNum.Value = 1 And chkSym.Value = 1 Then strinputstring = "~!@#$%^&*()_+=-[]{}\|';:/.,<>?12345678901234567890abcdefghijklmnopqrstuvwxy z" If chkLett.Value = 1 And chkCaps.Value = 1 And chkNum.Value = 1 Then strinputstring = "12345678901234567890abcdefghijklmnopqrstuvwxy zABC DEFGHIJKLMNOPQURSTVWXYZ" If chkLett.Value = 1 And chkCaps.Value = 1 And chkSym.Value = 1 Then strinputstring = "!@#$%^&*()_+=-[]{}\|';:/.,<>?abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQUR STVWXYZ" If chkCaps.Value = 1 And chkNum.Value = 1 And chkSym.Value = 1 Then strinputstring = "~!@#$%^&*()_+=-[]{}\|';:/.,<>?12345678901234567890ABCDEFGHIJKLMNOPQURSTVWXY Z" If chkLett.Value = 1 And chkCaps.Value = 1 And chkSym.Value = 1 And chkNum.Value = 1 Then strinputstring = "~!@#$%^&*()_+=-[]{}\|';:/.,<>?12345678901234567890abcdefghijklmnopqrstuvwxy zABCDEFGHIJKLMNOPQURSTVWXYZ" If chkLetter.Value = 1 Then strinputstring = cboLetter.Text & strinputstring If chkRand.Value = 1 Then strinputstring = txtConf.Text intlength = Len(strinputstring) intnamelength = cboNum.Text List1.AddItem Text1.Text Randomize strName = "" For intStep = 1 To intnamelength intRnd = Int((intlength * Rnd) + 1)
strName = strName & Mid(strinputstring, intRnd, 1) Next GenPass = strName End Function Private Sub cmdStart_Click() On Error Resume Next Timer1.Enabled = True End Sub Private Sub cmdStop_Click() On Error Resume Next Status.Panels(1).Text = "Status: Checking For Duplicates Please Wait.." tmrCount.Enabled = False Timer1.Enabled = False Status.Panels(1).Text = "Status: ...Idle..." End Sub Public Sub KillDupes() On Error Resume Next Dim TS As Long Dim TS1 As Long Dim KillDupe As Long KillDupe = 0 For TS& = 0 To List1.ListCount - 1 For TS1& = TS& + 1 To List1.ListCount - 1 KillDupe = KillDupe + 1 If List1.List(TS&) = List1.List(TS1&) Then List1.RemoveItem TS1& TS1& = TS1& - 1 End If Next TS1& Next TS& End Sub Private Sub tmrCount_Timer() On Error Resume Next Status.Panels(1).Text = "Status: " & "Password's Caught... " & List1.ListCount End Sub | |
|