wirefilter icon indicating copy to clipboard operation
wirefilter copied to clipboard

Implement starts_with, ends_with operators for Bytes

Open amiremohamadi opened this issue 4 years ago • 5 comments

amiremohamadi avatar Jul 13 '21 17:07 amiremohamadi

Ping @marmeladema. Sorry for bothering, just wanted to know is this repo still under development? And is there a chance that this PR will be merged?

amiremohamadi avatar Aug 07 '21 07:08 amiremohamadi

Not part of the project but for our project we implemented startswith and endswith as functions instead of operators as it is more flexible approach.

veeshi avatar Aug 07 '21 11:08 veeshi

Yeah this kind of use-cases is exactly what functions are for, as it doesn't require any special syntax.

RReverser avatar Aug 07 '21 17:08 RReverser

Right, but why we have contains as an operator?

amiremohamadi avatar Aug 08 '21 04:08 amiremohamadi

Because Wireshark has it and this library was designed to support similar syntax: https://www.wireshark.org/docs/wsug_html_chunked/ChWorkBuildDisplayFilterSection.html

If it wasn't for that, it could've been just a function too, yeah.

RReverser avatar Aug 08 '21 11:08 RReverser