Repository navigation
Conversation
- Add FFUNC_MOD and FFUNC_CHANCE opcodes.
- mod(offset, divisor): returns true if (field_value % divisor) != 0, so
filters can do e.g. if (mod(tcp.seq, 2)) { drop(); kill(); }.
- random(): 50% chance of being true.
- random(percent): percent chance (0-100) of being true.
- random(offset, start, length) keeps the existing data randomization.
- Update etterfilter disassembler to show the new functions.
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
The -F/--filter option always loaded filter scripts as enabled. Add a new --no-filters long option that loads the supplied filter files but sets them disabled so the user can enable them later through the interactive UI. The existing ":0" / ":1" filename suffix still overrides the per-file enabled state, so -F script.ef:1 can force-enable a single filter while --no-filters keeps the rest disabled. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or 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
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.
Summary
This PR bundles two small filter-related improvements.
#714 —
mod()andrandom()chance functionsmod(offset, divisor)returns true when(field_value % divisor) != 0, e.g.:random()returns true 50% of the time.random(percent)returns truepercent% of the time (0-100).random(offset, start, length)data randomizer is preserved.#1232 —
--no-filterscommand-line flag--no-filtersloads filter files passed with-F/--filterbut keeps them disabled at startup.:0/:1filename suffix still overrides the per-file enabled state.Test plan
cmake --build build -jpasses.etterfiltercompiles and-tdisassemblesmod()/random()examples.ettercap -hshows the new--no-filtersoption.Generated with Devin