This password cracker was created using VB6. It will generate possible passwords and compare each of them with the actual password. If the generated password found to be equal to the actual password, the login will be successful. In this program, a timer is inserted into the form and it is used to iterate the process of generating the passwords.
The passwords generating procedure is placed under the timer1_Timer () event so that the procedure is repeated after every interval. The interval of the timer can be set in its properties window where a value of 1 is equivalent to 1 millisecond. Therefore a value of 1000 is equivalent to 1 second; the smaller the value, the shorter the interval. The Timer1.Enabled property is set to false so that the program will only start generating the passwords after you click on the command button.
The password is a combination of three alphanumeric characters(you can use more characters), so we need to generate random alphanumeric characters using the chr() function. The ASCII code for all alphanumeric characters are from 33 to 126. Therefore, we need to generate random alphanumeric characters using the formula:
Int(Rnd * 93) + 33
Dim crackpass, password, secretword As String Dim num1, num2, num3 As Integer Private Sub Command1_Click() Timer1.Enabled = True End Sub Private Sub Form_Load() password = "@#4" End Sub Private Sub Timer1_Timer() num1 = Int(Rnd * 93) + 33 num2 = Int(Rnd * 93) + 33 num3 = Int(Rnd * 93) + 33 crackpass = Chr(num1) & Chr(num2) & Chr(num3) If crackpass = password Then Timer1.Enabled = False Text1.Text = crackpass Label1.Visible = True Label1.Caption = "Password Cracked!Login Successful!" Else Text1.Text = crackpass Label1.Visible = True Label1.Caption = "Please wait..." End If End Sub