I need a help of a vb developer ..

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

TheLord

Thread Starter
Joined
Jan 29, 2005
Messages
98
Hi guys,
i'm a network admin, i would like to have a file that generates random passwords of 8 characters containing letters, digits, symbols...it should generate 100 unique passwords everytime i press the generate button.. my purpose of this is to use it for local administrator account on each pc within my company..
i think it's possible and doable by vb developer..

hope some one can help me out.

Your help is much appreciated..
thanks
 
Joined
Oct 12, 2003
Messages
3,015
Yes it's possible. Do you want to always have the password contain upper and lower case letters AND symbols AND numbers?
 

TheLord

Thread Starter
Joined
Jan 29, 2005
Messages
98
only lower case letters, and yes, it should be a mix of all, always. thnx alot for ur help..
 

TheLord

Thread Starter
Joined
Jan 29, 2005
Messages
98
output shud be in a text window, where i'll be able to highlight and copy the text..
i attached an image i made, it's possible to be in this way..

thanks

to give u credit for it, place ur name and email address if u want..

cheerz
 

Attachments

Joined
Aug 17, 2001
Messages
7,486
Should you also compare it to the Passwords which already exist so you don't duplicate?
 
Joined
Sep 4, 2003
Messages
4,916
Here is a sample password generator I made. It will create a password of whatever length you choose and will include 2 numbers and letters. If you want to check for duplicate passwords, you will need to store you existing passwords in a database or excel file and check for matches against the password that is generated by the program.

Rollin
 

Attachments

Joined
Oct 12, 2003
Messages
3,015
This program generates a random number between 1 and 3 then:

1 = alphabetic characters
2 = symbols
3 = numerics

Generates a random number to select one character from the approprriate set and repeats until it has generated an 8 character string. Then 100 passwords are generated and displayed in the list box. The program does not enforce that each password must contain at least one element from each group nor does it check for a duplicate in the list box but the laws of probablity suggest that both items will be in compliance with your requirements. The first character of each password must be alphabetic and there may be characters in the symbols that are invalid -- I haven't spent the time to test each one. I've included the source code so if there are invalid characters you may remove them.
 

Attachments

Joined
Sep 4, 2003
Messages
4,916
Coder,

Is it possible for you to post your code? I don't have VB installed on my home machine and would like to see the source.

Rollin
 
Joined
Oct 12, 2003
Messages
3,015
Code:
Option Explicit
Const alphas = "abcdefghijklmnopqrstuvwxyz"
Const symbols = "~_`[email protected]#$%^&*()+=><:;][}{"
Const numbers = "0123456789"
Private Sub Form_Resize()
   List1.Height = Me.ScaleHeight
   List1.Width = Me.ScaleWidth
End Sub
Private Sub mnuAbout_Click()
   frmAbout.Show vbModal
End Sub

Private Sub mnuExit_Click()
   Unload Me
End Sub
Private Function GenerateRandomStrongPassword() As String
   Dim strLocal As String
   Dim intSeed As Integer
   Dim intIndex As Integer
   Dim count As Integer
   
   strLocal = ""
   
   count = 0
   Do Until count > 7
      If count = 0 Then intSeed = 1 Else intSeed = GetRandomNumber(3)
      
      Select Case intSeed
         Case 1
            strLocal = strLocal & Mid(alphas, GetRandomNumber(Len(alphas)), 1)
         Case 2
            strLocal = strLocal & Mid(symbols, GetRandomNumber(Len(symbols)), 1)
         Case 3
            strLocal = strLocal & Mid(numbers, GetRandomNumber(Len(numbers)), 1)
      End Select
      count = count + 1
   Loop
   
   GenerateRandomStrongPassword = strLocal
End Function
Private Sub mnuGenerate_Click()
   Dim count As Integer
   count = 0
   List1.Clear
   
   Do Until count > 99
      List1.AddItem GenerateRandomStrongPassword
      count = count + 1
   Loop
End Sub
Private Function GetRandomNumber(max As Integer)
   Dim n As Long
   
   Randomize (Timer)
   Do Until n > 0 And n <= max
      n = max * Rnd
   Loop
   
   GetRandomNumber = n
End Function
 

TheLord

Thread Starter
Joined
Jan 29, 2005
Messages
98
rollin, i like ur idea but i hate to use it as a macro, cuz my secuirty is set to high and that's according to the policy.. if i get it as an executable it would be great ...

coderitr , I LOVE IT !!!!! thanks very much, i really appreciate your hard work on that .. just a little addition to it, i'm unable to select multipul strings to do copy&paste..
what shall i do ?

thanks again, i owe u.
 
Joined
Oct 12, 2003
Messages
3,015
You can't copy/paste froma list box. I can change it to put the password in a text biox so you'll be able to copy/paste but:

(1) you still won't be able to select more than one
(2) an array of 100 text boxes will make the memory resources required by this program unjustifiably large

Let me know.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top