Hey DM hoping you can help me (or anybody else really).
I'm writing a ZMODEM implementation in PHP (my C is not as good as PHP), and I'm following this as a validation guide:
https://stackoverflow.com/questions/9611000/understanding-the-zmodem-protoco l
I'm stuck at validating the CRC of the ZCRCW part after receving a ZFILE frame. I cant seem to calculate the same CRC (I was able to validate the CRC of the ZFILE frame though). The link above implies that it is a CRC - is that right? If so what is it calculated from? Here is my frame:
0 : 2a 18 43 04 00 00 00 01 4b 61 a5 44 74 65 73 74 [*.C.....Ka.Dtest]
10 : 2e 7a 69 70 00 31 31 38 38 31 20 31 33 33 31 32 [.zip.11881 13312]
20 : 31 30 32 36 30 37 20 31 30 30 36 34 34 20 30 20 [102607 100644 0 ]
30 : 32 20 31 31 38 38 31 00 18 6b ce 96 84 82 11 [2 11881..k.....]
IE: I the CRC of the ZCRCW is 0x828496ce but what is used to create it?
(I can validate the CRC of the ZBIN32 frame as 0x44a5614b.)
(I know I probably shouldnt bother with TCP transfer, but I thought I would validate it for completeness.)
Hoping you can help?
I don't have every aspect of ZMODEM memorized, so I'd have to re-read it and refer to some source code to accurately answer your questions. But
if you read my version of the spec and still have questions, let me know and I'll see what I can do to clarify things.
I'm stuck at validating the CRC of the ZCRCW part after receving a ZFILE frame. I cant seem to calculate the same CRC (I was able to validate the CRC of the ZFILE frame though). The link above implies that it is a CRC
- is that right? If so what is it calculated from? Here is my frame:
IE: I the CRC of the ZCRCW is 0x828496ce but what is used to create it?
On 20 Mar 2019, Digital Man said the following...
I don't have every aspect of ZMODEM memorized, so I'd have to re-read it and refer to some source code to accurately answer your questions. But
if you read my version of the spec and still have questions, let me know and I'll see what I can do to clarify things.
I did see your version of the spec which prompted me to send a message. I also looked at your source code in Synchronet but it didnt help me :( In fact it looks like you arent validating that CRC (if it is a CRC) - I was hoping I missed though...
The zmodem code is so hard to read (I've even looked through lrzsz and mystic's github source) and its a little complicated to trace.
That link implies it's a 32-bit CRC. What value are you getting? Are
you taking into account ZDLE encoding, if applicable?
I'm pretty sure all the CRC values are validated.
On 21 Mar 2019, Digital Man said the following...
I'm pretty sure all the CRC values are validated.
Can you point me to where you do that in your code?
Your wiki link (which is awesome too BTW), doesnt talk about the last 5 bytes of that "ZFILE FRAME FILE INFORMATION SUBPACKET". (which I'm lead to believe
is the CRC32 + XON).
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 294 |
Nodes: | 16 (2 / 14) |
Uptime: | 244:51:56 |
Calls: | 6,626 |
Calls today: | 2 |
Files: | 12,175 |
Messages: | 5,320,400 |