-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于解析时的解密和转义问题 #10
Labels
fixed
The bug fixed
Comments
这报文发送还是接收? @LPH517 |
发送方加密步骤:
接收方解密步骤:
另外可以使用我们提供的解析工具尝试下 |
这个是发送的@yedajiang44 |
就是上述的解析工具对这段报文无法正确解析😭 |
@LPH517 看下解析的对吗? {
"BeginFlag": 91,
"Header": {
"MsgLength": 84,
"MsgSN": 13,
"BusinessType": 4097,
"MsgGNSSCENTERID": 102,
"Version": {
"Buffer": "AQIP",
"Major": 1,
"Minor": 2,
"Build": 15
},
"EncryptFlag": 1,
"EncryptKey": 0,
"Time": "2024-06-05T01:23:06"
},
"Bodies": {
"UserId": 102,
"Password": "123456",
"MsgGNSSCENTERID": 102,
"DownLinkIP": "127.0.0.1",
"DownLinkPort": 10062,
"MsgId": 4097,
"Description": "主链路登录请求消息",
"LinkType": 0,
"SkipSerialization": false,
"Version": 1,
"ReplaceInternalMsgId": false
},
"CRCCode": 9747,
"EndFlag": 19
} |
对的😆😆😆@yedajiang44 |
看起来是解决这个bug了呀?能否告知一下大概是什么原因造成的呢? |
问题是转义引起的,详见提交 f86e943 |
感谢^ω^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在解析报文时,如果消息体是经过加密的,且加密后的消息体刚好以5E01结尾,会出现解析异常。
异常报文如下:
5B000000540000000D10010000006601020F010000000000000000665F4D7A261313752221202726251313131313752221243D233D233D22131313131313131313131313131313131313131313131334 5E01 91E4 5D
将消息体结尾的5E01改为5D才能正常解析:
5B000000540000000D10010000006601020F010000000000000000665F4D7A261313752221202726251313131313752221243D233D233D22131313131313131313131313131313131313131313131334 5D 91E4 5D
可是正常的报文内容,按照协议描述是不能包含5D的
加密参数IA1 M1 IC1为20240604
期待您的解惑
The text was updated successfully, but these errors were encountered: