1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VBA Code to Generate User Names & Passwords

Discussion in 'Black Hat SEO Tools' started by gogetta, Jul 21, 2009.

  1. gogetta

    gogetta Jr. VIP Jr. VIP

    Oct 4, 2008
    Likes Received:
    Internet Hustla
    Trapped Online
    I hope this isn't the wrong section to post this in, but I'm looking for a code to generate usernames & passwords in Excel. I have a code already and it's pretty good. You enter in one word and it generates like 40,000 different variations based on that word. So like "dog" "god" "ogd" etc. It's not a bad script at all.

    But I'm looking for one that will create them completely random, any suggestions?

    Here is the code I have now:

    Dim CurrentRow
    Sub GetString()
        Dim InString As String
        InString = InputBox("Enter text to permute:")
        If Len(InString) < 2 Then Exit Sub
        If Len(InString) >= 8 Then
            MsgBox "Too many permutations!"
            Exit Sub
            CurrentRow = 1
            Call GetPermutation("", InString)
        End If
    End Sub
    Sub GetPermutation(x As String, y As String)
    '   The source of this algorithm is unknown
        Dim i As Integer, j As Integer
        j = Len(y)
        If j < 2 Then
            Cells(CurrentRow, 1) = x & y
            CurrentRow = CurrentRow + 1
            For i = 1 To j
                Call GetPermutation(x + Mid(y, i, 1), _
                Left(y, i - 1) + Right(y, j - i))
        End If
    End Sub
    Thanks in advance