Closed sempervictus closed 3 years ago
@wokket - ops request: due to the addition of features
in this PR, could you please enable testing with all features for the CI so we get coverage for test and bench in otherwise obscured parts of the code?
@wokket - ops request: due to the addition of
features
in this PR, could you please enable testing with all features for the CI so we get coverage for test and bench in otherwise obscured parts of the code?
CI is in .github/workflows/ci.yml
so you should be able to tweak that and get it working in your repo, and it becomes part of the PR.
I'm away from the computer this morning but will have a closer look at this this afternoon.
My tinfoil-hat-wearing security mindset leads me to think that having anyone who submits a PR run arbitrary commands on something attached to someone else's repo might be dangerous :). Meh, but what do i know?
grep -ri rageltman metasploit-framework/modules/payloads/|wc -l
40
Thanks for the tip - CI is now testing and running bench with the feature enabled.
I think GH is confused
Major refactor: flatten code and object structures
After converting Field from an enum to a Struct and implementing various generic mechanisms for common functionality, we are seeing legacy code and object structures cluttering and breaking efforts respectively. The
MshSegment
does not behave like a generic one in terms of structure or implementation, and being "in the line of fire" whenever segments are used to be parsed out through a match statement makes it very cumbersome, sometimes unworkable due to borrow checks on the string references.Remove the
Segment
enum and convertGenericSegment
struct to be the newSegment
struct - possible becauseSeparators
live in theMessage
structure permitting on-demand re-parse of aSegment
struct into any other named segment type such asMshSegment
. This is how themsh()
implementation now works forMessage
- finding the relevantSegment
and returning a parsedMshSegment
from it and theMessage
Separators
already stored.This permits
query()
andIndex<&str>
mechanisms to search for all types of segments and fields, using syntax a laMSH.F3
for which a test-case has been added to the feature-gated test.Now that the object structures and interfaces are generic, simple, and common - the code structure itself has been reorganized per wokket#25 into a flat set of files within src/.
Testing:
index_string
feature enabled and without