-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support version 3.3 protocol decoding #2
base: master
Are you sure you want to change the base?
Conversation
data, err = aesDecrypt(b[len(Version)+16:], Key) // ignore signature | ||
if version == Version_3_1 { | ||
// Should this be 12? | ||
data, err = aesDecrypt(b[len(version)+16:], Key, version) // ignore signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the offset should be changed to 12 here since the return code is now skipped?
block, er2 := aes.NewCipher([]byte(key)) | ||
if er2 != nil { | ||
return []byte{}, er2 | ||
} | ||
bs := block.BlockSize() | ||
if nc%bs != 0 && nc < 16 { | ||
return []byte{}, errors.New("Bad ciphertext len") | ||
if nc%bs != 0 || nc < 16 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this check should be changed to:
if nc%bs != 0 && (nc < 16 || version != Version_3_1)
Hi Erik, As you might have noticed, I am not very active on this topic these days. I have tried to understand your proposals but I have no way to test them. Could you tell me how you have been able to perform your tests ? |
All my devices are using protocol 3.3, and I can add some .pcap-files + config files with v3.3 data to the PR. |
As of now, support for 3.3 protocol crashes when using 3.1 protocol. I am trying to fix this issue. |
Do you mean my changes crash if decoding is set to protocol 3.1, but supplied data is 3.3? If so, I should fix that.. |
I have created a new branch "3.3-Support" that includes the support of 3.3 version protocol. Tell me if there is anything wrong and if you wish some improvement (I am not very active on this topic now). |
Hellooo, sorry I am trying to run the project but I could not do it directly, I have problems with GPATH and GOROOT. I had to make new files and run them again, but now I get PCAP access error: no such device, help me please |
No description provided.