Skip to content
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

What to do with encapsulated layers? #13

Open
techge opened this issue Jul 20, 2021 · 1 comment
Open

What to do with encapsulated layers? #13

techge opened this issue Jul 20, 2021 · 1 comment

Comments

@techge
Copy link
Contributor

techge commented Jul 20, 2021

The code of nemere (more precisely the FMS part) raises a very interesting question:

what to do with layers after (embedded in) the target protocol

The response is to just include them to the dissections:

# what to do with layers after (embedded in) the target protocol
if absLayNum < len(self.protocols):
        for embedded in self.protocols[absLayNum+1 : ]:
                dissectsub = ParsedMessage._getElementByName(layersvalue, embedded)
                if isinstance(dissectsub, list):
                        self._dissectfull += dissectsub
                # else:
                #     print("Bogus protocol layer ignored: {}".format(embedded))

Thing is, I actually want to test the dissections of a protocol that encapsulates layers and the way I see it, FMS should only test the dissection of the protocol itself and not of the whole message, this is why I deactivated this part in my slightly adapted implementation. But I know PRE tools would handle this differently. Do you have any idea, if there is a way to solve this issues elegantly? I am not sure, if this drastic commenting of mine is causing some problems later on.

@techge
Copy link
Contributor Author

techge commented Aug 9, 2021

I am thinking about a parameter that can be submitted to the Comparator to decide in following layers are omitted. If I find a nice and clean solution, I will open a PR for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant