-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[WIP] OPC UA #1569
Closed
Closed
[WIP] OPC UA #1569
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
currently only Two and Four byte NodeIds are implemented
Avoids the use of conditional fields. UaTcp and the two SC packets are linked by the dispatch hook function
Currently the schema parser does not correctly create types with lengthOf fields (e.g. arrays) Enumerated types also have no meaning for now. The missing NodeIds were implemented but still need some work regarding the dispatch_hooks (ExpandedNodeId)
ExpandedNodeIds can now correctly be decoded without having to explicitly be explicitly specified. Also started implementing correct length fields in the schema parser.
The message part of the payload is now correctly decoded depending on the binary encoding id.
The _has_XXX functions are now generated with a function because they are mostly the same except for the encoding and the field value.
UaMessage now caches created classes increasing efficiency a lot.
The raw encoding doesn't work yet. Also added some helper stuff.
ExtensionObject raw bytes are now decoded properly. PacketFields have been replaced by UaPacketFields that allow access to the containing packet.
The current version uses the cryptography modules of free-opcua. Credit needs to be added. Only asymmetric encryption supported so far.
Any update on this PR? |
I currently don't have any time to work on this. If anyone wants to pick up where i left off, feel free to ask any questions regarding my code. I haven't tested the code recently, but if the scapy internals didn't change too much in the last year, the code should still work. |
I added a reference to this PR in #399 and I am closing it due to no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A while ago i implemented the OPC UA layer for scapy.
Although this isn't really finished i thought it would be useful to create a PR so that if someone else considers implementing the OPC UA layer they can start based off my work, instead of starting from scratch.
I currently don't have the time to finish this but might come back to it later.
Implemented:
Currently missing:
The performance is still really awful. Since I'm still rather new to python maybe someone can have a look at where i went wrong on the performance side.