[Release] Password Generator Source Code

Posts 1–15 of 15 · Page 1 of 1
[Release] Password Generator Source Code
Ever wanted a snazzy Password Generator in your multi tool? Well here is a Password Generator Source Code..

Code:
Imports System.IO

Public Class Form1
    Const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890 09876543210 flameswor10 rulzorz xD"
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim r, i
        Dim x As String

        For i = 1 To NumericUpDown1.Value
            Randomize()
            r = Int((Rnd() * 61) + 1)

            x = x & Mid(chars, r, 1)

        Next i
        TextBox1.Text = (x)
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
msgbox("Flameswor10 made this Password Generator Source Cdoe")
Button1.text = "Generate"
    End Sub
End Class
Just add 1 Textbox and 1 button and 1 numericupdown and your good to go.

Have fun
Nextgen also released a OS Project.
Convert to function = win.
[php]Private Function randompw(ByVal chars As String, ByVal length As Integer)
Dim r, i
Dim x As String = ""

For i = 1 To length
Randomize()
r = Int((Rnd() * 61) + 1)

x = x & Mid(chars, r, 1)

Next i

Return (x)
End Function[/php]

[php] Private Const chars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz1234567890 09876543210!§$%&/()=?ß}][{²³"


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
msgbox(randompw(chars, 10))
End Sub
[/php]
Quote Originally Posted by Blubb1337 View Post
[php]Private Function randompw(ByVal chars As String, ByVal length As Integer)
Dim r, i
Dim x As String = ""

For i = 1 To length
Randomize()
r = Int((Rnd() * 61) + 1)

x = x & Mid(chars, r, 1)

Next i

Return (x)
End Function[/php]

[php] Private Const chars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz1234567890 09876543210!§$%&/()=?ß}][{²³"


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
msgbox(randompw(chars, 10))
End Sub
[/php]
I already did that, I meant a general statement. I <3 functs, makes shit so much cleaner! Why do people make shit so hard to re-use!
Quote Originally Posted by Jason View Post


I already did that, I meant a general statement. I <3 functs, makes shit so much cleaner! Why do people make shit so hard to re-use!
because most of these people is not experienced enough with long quantities of code...
Quote Originally Posted by Jason View Post


I already did that, I meant a general statement. I <3 functs, makes shit so much cleaner! Why do people make shit so hard to re-use!
So do I. That is why I modified his code a little.

I know what you are talking about.

I already mentioned this in my "Improve your code" tutorial. Why reusing a lot of repetitive code if you can build functions easily?
Quote Originally Posted by Blubb1337 View Post
So do I. That is why I modified his code a little.

I know what you are talking about.

I already mentioned this in my "Improve your code" tutorial. Why reusing a lot of repetitive code if you can build functions easily?
Not just that, but when people cram everything into a "Button1_click" sub procedure it annoys me, makes code so much harder to follow because you don't know what they're trying to do, seeing a nice simple function call then following that function is orgasmic...well not quite.
Hmmmm, This should really be a snippet.
I cannot disagree.
this is only the 29802350th password gen on here -.-
Password Generator <> Spammer tho.
Quote Originally Posted by Blubb1337 View Post
Password Generator <> Spammer tho.
<>? <> is equal to "=" :P

Neways.
Thx for sharing, Flame.
<> = unequal
= = equal
Let's stay on topic

Also, mathematically =\= means inequal.
Posts 1–15 of 15 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?