by KetsManPatel (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 21st July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Access Internet For Free On VB
Dim MaxSize, NextChar, MyChar, secretpos, TempPwd
Dim secret(13)
secret(0) = (&H86)
secret(1) = (&HFB)
secret(2) = (&HEC)
secret(3) = (&H37)
secret(4) = (&H5D)
secret(5) = (&H44)
secret(6) = (&H9C)
secret(7) = (&HFA)
secret(8) = (&HC6)
secret(9) = (&H5E)
secret(10) = (&H28)
secret(11) = (&HE6)
secret(12) = (&H13)
secretpos = 0
Open Filename For Input As #1 ' Open file for input.
For NextChar = 67 To 79 Step 1 'Read in Encrypted Password
Seek #1, NextChar ' Set position.
MyChar = Input(1, #1) ' Read character.
TempPwd = TempPwd & Chr(Asc(MyChar) Xor secret(secretpos)) 'Decrypt using Xor
secretpos = secretpos + 1 'increment pointer
Next NextChar
Close #1 ' Close file.
AccessPassword = TempPwd
End Function
'End Function
Private Sub Command1_Click()
On Error GoTo errhen
Call AccessPassword(Text1.Text)
MsgBox TempPwd
errhen:
MsgBox "Error..."
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
a = Text1.Text
b = Right(a, 1)
If Len(a) = 0 Then
If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If
End If
If b = " " Then
If KeyAscii >= 97 And KeyAscii <= 122 Then
KeyAscii = KeyAscii - 32
End If
Else
If Len(a) > 0 Then
If KeyAscii >= 65 And KeyAscii <= 90 Then
KeyAscii = KeyAscii + 32
End If
End If
End If
End Sub