vForums Support > Programming & Coding :: Programming Discussion :: > Password Generator

Password Generator - Posted By Marc (cr0w) on 11th Mar 08 at 11:59pm
http://hosting.cr0wonline.com/programs/PassGen.exe

Just a little VB password generator I made. {Smile}

C&C appreciated. {Tongue Out}

Re: Password Generator - Posted By Michael (wrighty) on 12th Mar 08 at 12:06am
It well and truly sucks...

for 2 reasons mainly:

#1 - you need .net framework for it
#2 - I don't have the above, therefore meaning I can't run it.

Re: Password Generator - Posted By Marc (cr0w) on 12th Mar 08 at 12:06am
 
It well and truly sucks...

for 2 reasons mainly:

#1 - you need .net framework for it
#2 - I don't have the above, therefore meaning I can't run it.


No you don't. {Unsure}

I made sure of it; even sent it to a friend without it to test. o.O

Re: Password Generator - Posted By Michael (wrighty) on 12th Mar 08 at 12:09am
 
 
It well and truly sucks...

for 2 reasons mainly:

#1 - you need .net framework for it
#2 - I don't have the above, therefore meaning I can't run it.


No you don't. {Unsure}

I made sure of it; even sent it to a friend without it to test. o.O



Says I do! *goes to ACTUALLY read the error message*

Re: Password Generator - Posted By Marc (cr0w) on 12th Mar 08 at 12:09am
Let me know exactly what it says, I'll see if I can get it fixed. {Smile}

Re: Password Generator - Posted By Ross (admin) on 12th Mar 08 at 12:12am
Quote:
The application failed to initialize properly (0xc0000135). Click on Ok to terminate the application


{Sad}

Re: Password Generator - Posted By Michael (wrighty) on 12th Mar 08 at 12:13am
 
Let me know exactly what it says, I'll see if I can get it fixed. {Smile}


sent screenshot over MSN

Re: Password Generator - Posted By Marc (cr0w) on 12th Mar 08 at 12:15am
Gahh, I hates VB right now. {Sad}

Give me a bit, I'll try to fix it. {Tongue Out}

EDIT: To those who know VB, why would this need .NET?

Code:
 
  1. Option Explicit On
  2.  
  3. Public Class frmPass
  4.  
  5.     Function Random(ByVal Lowerbound As Long, ByVal Upperbound As Long)
  6.         Randomize()
  7.         Random = Int((Upperbound - Lowerbound + 1) * Rnd() + Lowerbound)
  8.     End Function
  9.  
  10.     Function Generate()
  11.  
  12.         Dim num As Integer = 1
  13.  
  14.         Dim thisType(4) As Integer
  15.         thisType(num) = Random(97, 122)
  16.  
  17.         If chkCase.Checked = True Then
  18.             num += 1
  19.             thisType(num) = Random(65, 90)
  20.         End If
  21.  
  22.         If chkNum.Checked = True Then
  23.             num += 1
  24.             thisType(num) = Random(48, 57)
  25.         End If
  26.  
  27.         If chkSymbols.Checked = True Then
  28.             num += 1
  29.             thisType(num) = Random(33, 47)
  30.         End If
  31.  
  32.         Generate = thisType(Random(1, num))
  33.  
  34.     End Function
  35.  
  36.     Private Sub cmdGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerate.Click
  37.  
  38.         txtPass.Text = ""
  39.  
  40.         If IsNumeric(cmbLength.Text) Then
  41.  
  42.             If cmbLength.Text >= 1 And cmbLength.Text <= 30 Then
  43.  
  44.                 For x = 1 To Int(cmbLength.Text)
  45.                     txtPass.Text += Chr(Generate())
  46.                 Next
  47.  
  48.             Else
  49.  
  50.                 MsgBox("Password Length Must Be Within 1-30!", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Error!")
  51.  
  52.             End If
  53.  
  54.         Else
  55.  
  56.             MsgBox("Password Length Must Be Numeric!", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Error!")
  57.  
  58.         End If
  59.  
  60.     End Sub
  61.  
  62.     Private Sub ExitToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitToolStripMenuItem.Click
  63.         End
  64.     End Sub
  65. End Class
 


I do have .NET disabled in the prerequisite area of the Publish section. {Unsure}

Re: Password Generator - Posted By Mithras (mithras) on 16th Mar 08 at 9:32pm
 
why would this need .NET?


Because Microsoft thinks it's funny.

I'm very anti-VB, as it's platform-dependent.