又来异或...还是数组操作吧,没有用IDE...007老大检查咯0 j5 S1 i, Q. a5 t
那个提取的方法还是和之前那个riper一样就可以了吧. j$ E; r6 y0 Q3 {2 a. A$ w, @
- Private Const cKey As String = "2923BE84E16CD6AE529049F1F1BBE9EB"
- Private Sub cmdCommand1_Click()
- Dim lngFileNum As Long, lngLength As Long, strFilePath As String, bData() As Byte
- strFilePath = App.Path & "\\1.dat"
- lngLength = FileLen(strFilePath)
- lngFileNum = FreeFile
- If lngFileNum = 0 Then Exit Sub
- ReDim bData(lngLength)
- Open strFilePath For Binary As #lngFileNum
- Get #lngFileNum, 1, bData()
- Close #lngFileNum
- Dim lngIndex As Long, lngUbound As Long
- lngUbound = UBound(bData())
- Dim lngIndexB As Long, lngKey As Long
- For lngIndexB = 1 To 32
- lngKey = CHex2Dec(Mid$(cKey, lngIndexB, 1))
- For lngIndex = 0 To lngUbound
- bData(lngIndex) = bData(lngIndex) Xor lngKey
-
- Next
- Next
- strFilePath = App.Path & "\\2.dat"
- lngFileNum = FreeFile
- Open strFilePath For Binary As #lngFileNum
- Put #lngFileNum, 1, bData()
- Close #lngFileNum
- End
- End Sub
- Private Function CHex2Dec(strHex As String) As Long
- Select Case strHex
- Case "A": CHex2Dec = 10
- Case "B": CHex2Dec = 11
- Case "C": CHex2Dec = 12
- Case "D": CHex2Dec = 13
- Case "E": CHex2Dec = 14
- Case "F": CHex2Dec = 15
- Case Else: CHex2Dec = CLng(strHex)
- End Select
- End Function
复制代码 |