|
-
March 2nd, 2002, 12:25 AM
#3
You want to a brute force programs?
Private Sub Command1_Click()
Dim strletter As Single
Dim strFichier As String
Dim intIndex As Integer
strFichier = InputBox("Name of Dictionnary File", "File")
Open strFichier For Input As #1 'Open the filename on your said in the InputBox
intIndex = 1
Do
Get #1, intIndex, strletter 'Get the first word of your dictionnary file
If strletter = txtPass.Text Then 'Compare it with txtPass.text that act as the password
'The If is case sensitif, if you don't want it case sensitif use If UCase(strletter) = UCase(txtPass.Text) Then
MsgBox "Password Found", vbOKOnly, "Password Found"
Exit Sub 'End the Program
Else
intIndex = intIndex + 1 'Move the Counter to check the next line in dictionnary file
End If
Loop Until EOF(1)
End Sub
Try this! This is realy basic programme. Their is a better way to open file that the open I code. But the rest should work at 100%.. But if you want to learn Visual Basic, read and read alot! It's only way!
By the way, your syntaxe suck! It's hard to understand your code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|