Home > Software engineering >  Recorded for help: the existing binary file, how to make the original file, now have no idea!!!!!!!!
Recorded for help: the existing binary file, how to make the original file, now have no idea!!!!!!!!

Time:10-05

Are writing a protocol analysis software, the other is sending a binary file, accept after don't know how to convert normal file, use the PUT method using byte array, is an array of strings, don't know if this problem, conversion is not successful, consult everybody why ah, how to correct the transformation of success

CodePudding user response:

Now the packets as follows (part)
6F BF E0 0C 98 64 82 5D EF E5 B6 D2 4A 93 C9 F7 AA 0C C0 64 23 ED E6 2B DD AE 53 C4 2F 3F 9E 0C 40 64 67 7B 6D 37 DE 43 84 65 9C 89 92 0C 69 64 60 DB 3F 4E 3C 06 5A 9A C5 87 9A 0C 58 67 D5 99 E7 57 EA 16 A4 A5 DC 2F D6 0C E6 67 13 9B 6D 0F F6 EC 37 69 1F 1F 08 0C 08 64 D7 6F 7F EB 14 9E 81 CA 88 27 50 0C 2C 66 53 CF 7F 6F 76 06 D6 64 EB 49 64 0C 58 36 2A DB 35 E9 B5 D4 AD 03 70 61 B6 0C 44 E4 27 79 EF 56 AA B2 97 F7 0A 19 44 0C 80 8A 1B DB 67 FE 1B 02 74 E6 EC BF F4 0C 80 5D 55 5B 2F BC D7 63 D6 73 CB A8 A2 0C 49 CA CB 5B ED 34 FD 4F 34 E2 61 65 00 0C B5 EC 24 DB 6F 57 8E 45 AA 67 72 35 94 0C B0 B9 EC DF 75 DC 67 ED 14 3C E5 FF 0A 0C E6 48 59 DB CB 3E D4 1E BE E2 7D 1F 60 0C 76 6A 09 ED ED CB DE ED 1E 1F C1 0C DA 0C 08 E0 7E D1 FB 15 6B 56 82 45 7D EE 64 0C B4 50 6F CB 67 B7 FF E3 2E CC A1 10 14 0C 84 CE CB DA 6B 36 36 30 6B 46 0A 31 8A 0C 8C

Write a program following
TMPSTR=Split (tempstr1, "", 1) 'character generated array file
For H=0 To UBound (TMPSTR)
LY (H)=StrConv (TMPSTR (H), vbFromUnicode) 'transformation type (error, subscript bounds)
The Next H




Ly generated file should have to byte array
Open "c: \ mydestiny. Amr For Binary As # 3
Put # 3, and lY
Close # 3

CodePudding user response:

Why don't use an array of bytes to send, receive?
A string of bytes, not looking for trouble?

TMPSTR=Split (tempstr1, "") will generate an array of files characters
Redim iy (UBound (TMPSTR))
For H=0 To UBound (TMPSTR)
LY (H)=cint (" & amp; H "& amp; TMPSTR (h)) 'transformation type (error, subscript bounds)
The Next H

  • Related