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

Implement payload contains filtering #57

Merged
merged 2 commits into from
Jul 6, 2023
Merged

Conversation

dkumiszhan
Copy link
Collaborator

The new query can be used like this:

payload contains "test"

src/eventFilter.ts Outdated Show resolved Hide resolved
src/eventFilter.ts Outdated Show resolved Hide resolved
@@ -34,6 +39,9 @@ const ipDst = createToken({ name: 'IP_DST', pattern: /ip\.dst/ });
const tcpPort = createToken({ name: 'TCP_PORT', pattern: /tcp\.port/ });
const udpPort = createToken({ name: 'UDP_PORT', pattern: /udp\.port/ });

const payload = createToken({ name: 'PAYLOAD', pattern: /payload/ });
const string = createToken({ name: 'STRING', pattern: /\"[a-zA-Z0-9]+\"/ });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider adding special characters here as well, letters and digits should be fine for now.

@dkumiszhan dkumiszhan force-pushed the feat/payload-contains branch from 7e966bd to ff82506 Compare July 5, 2023 15:45
@dkumiszhan dkumiszhan force-pushed the feat/payload-contains branch from ff82506 to 1ddea79 Compare July 5, 2023 15:46
Copy link
Member

@glaslos glaslos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work!

@glaslos glaslos merged commit e4ade15 into main Jul 6, 2023
@glaslos glaslos deleted the feat/payload-contains branch July 6, 2023 09:16
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

Successfully merging this pull request may close these issues.

2 participants