Results 1 to 7 of 7

Thread: [RESOLVED] Lil Help for PassBreaker

  1. #1

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Resolved [RESOLVED] Lil Help for PassBreaker

    Creating a simple password Breaker Need help with the readline function.

    Current problem: It will run, if i hold enter, and very slowly. If i take out the readline it will execute at perfect speed, but will never end as it can not come to an end.

    Here is the full program, un-commented as it is pretty self explanatory.

    Thank you
    Josh

  2. #2

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Re: Lil Help for PassBreaker

    Code:
    Module Module1
        Dim first As String
        Dim second As String
        Dim third As String
        Dim fourth As String
        Dim fifth As String
        Dim fail As Integer
    
        Sub Main()
            Call PassBreak()
            Console.WriteLine(fail & " Failed attempts.")
            Console.ReadKey()
        End Sub
    
        Sub PassBreak()
            Dim alphabet(35)
            alphabet(0) = "1"
            alphabet(1) = "1"
            alphabet(2) = "2"
            alphabet(3) = "3"
            alphabet(4) = "4"
            alphabet(5) = "5"
            alphabet(6) = "6"
            alphabet(7) = "7"
            alphabet(8) = "8"
            alphabet(9) = "9"
            alphabet(10) = "a"
            alphabet(11) = "b"
            alphabet(12) = "c"
            alphabet(13) = "d"
            alphabet(14) = "e"
            alphabet(15) = "f"
            alphabet(16) = "g"
            alphabet(17) = "h"
            alphabet(18) = "i"
            alphabet(19) = "j"
            alphabet(20) = "k"
            alphabet(21) = "l"
            alphabet(22) = "m"
            alphabet(23) = "n"
            alphabet(24) = "o"
            alphabet(25) = "p"
            alphabet(26) = "q"
            alphabet(27) = "r"
            alphabet(28) = "s"
            alphabet(29) = "t"
            alphabet(30) = "u"
            alphabet(31) = "v"
            alphabet(32) = "w"
            alphabet(33) = "x"
            alphabet(34) = "y"
            alphabet(35) = "z"
    
            Console.WriteLine("enter password")
            Dim password As String = Console.ReadLine.ToLower
            Console.Write("currently at: ")
            Console.WriteLine()
            For start As Integer = 1 To 7
                For i As Integer = 0 To 35
                    first = (alphabet(i))
    
                    For ii As Integer = 0 To 35
                        second = (alphabet(ii))
    
                        For iii As Integer = 0 To 35
                            third = (alphabet(iii))
    
                            For iiii As Integer = 0 To 35
                                fourth = (alphabet(iiii))
    
                                For v As Integer = 0 To 35
                                    fifth = (alphabet(v))
                                    Console.Write(first & second & third & fourth & fifth)
    
                                    If Console.ReadLine = password Then
                                        Console.WriteLine("well done me")
                                        Exit Sub
                                    Else : fail += 1
                                    End If
                                Next
                            Next
                        Next
                    Next
                Next
            Next
        End Sub
    View of loop w/o indent
    For start As Integer = 1 To 7
    For i As Integer = 0 To 35
    first = (alphabet(i))

    For ii As Integer = 0 To 35
    second = (alphabet(ii))

    For iii As Integer = 0 To 35
    third = (alphabet(iii))

    For iiii As Integer = 0 To 35
    fourth = (alphabet(iiii))

    For v As Integer = 0 To 35
    fifth = (alphabet(v))
    Console.Write(first & second & third & fourth & fifth)

    If Console.ReadLine = password Then

    Console.WriteLine("well done me")
    Exit Sub
    Else : fail += 1
    End If
    Next
    Next
    Next
    Next
    Next
    Next
    End Sub
    Last edited by Joshlad; Oct 20th, 2011 at 07:05 PM. Reason: codeview

  3. #3

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Re: Lil Help for PassBreaker

    Can provide comments if needed.

  4. #4

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Re: Lil Help for PassBreaker

    kay fixed it using a variable, but would still be nice to know if there was a different work around.

    Code:
       For v As Integer = 0 To 35
                                    fifth = (alphabet(v))
                                    Console.WriteLine(first & second & third & fourth & fifth)
                                    answer = first & second & third & fourth & fifth
                                    If answer = password Then
                                        Console.WriteLine("well done me")
                                        Exit Sub
    
                                    Else : fail += 1

  5. #5

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Re: Lil Help for PassBreaker

    took out wl, to guess a 5 letter "zzzzz" pass, it took 60million attempts >.>

  6. #6
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Lil Help for PassBreaker

    Quote Originally Posted by Joshlad View Post
    kay fixed it using a variable, but would still be nice to know if there was a different work around.
    I'm confused. You consider variables a work-around? A work-around for what? As far as I can tell, previously for each password postulated by the program, it would be printed to the screen and the user would have to type it back in?

  7. #7

    Thread Starter
    Addicted Member Joshlad's Avatar
    Join Date
    May 2011
    Location
    England
    Posts
    160

    Re: Lil Help for PassBreaker

    Well i just changed it to write each letter into a variable, instead of reading it from the console line.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width