find-patterns/readme.md

34 lines
1.7 KiB
Markdown
Raw Normal View History

2006 Neil Edelman, distributed under the terms of the
[GNU General Public License 3](https://opensource.org/licenses/GPL-3.0).
2021-06-13 01:09:56 +00:00
In 2006 after attending a talk on bioinformatics, I had the idea of making
an email client that would take the methods of bioinformatics and apply
them to spam-detection.
2021-06-13 01:09:56 +00:00
Searches through input and outputs sequences that are repeated.
Because it's intended for text files, control characters are
ignored.
2021-06-13 01:48:59 +00:00
`FindPatterns [filename] [-b] [-e] [-i] [-o] [-v] [-m<n>] [-l<n>] [-g<n>] [-?|h]`
2021-06-13 01:09:56 +00:00
2021-06-13 01:40:45 +00:00
<table>
2021-06-13 01:48:59 +00:00
<tr><td>`filename`</td><td>Attempt to read input from this file, otherwise uses stdin.</td></tr>
<tr><td>`-b`</td><td>Keep a buffer to count repeated matches (`!o -> b`.)</td></tr>
<tr><td>`-e`</td><td>Echo input.</td></tr>
<tr><td>`-i`</td><td>Case-insensitive (not implemented.)</td></tr>
<tr><td>`-n`</td><td>Don't display matches at the end.</td></tr>
<tr><td>`-o`</td><td>Output matches immediately as they are found.</td></tr>
<tr><td>`-s`</td><td>Silent mode - plain output with no extra characters.</td></tr>
<tr><td>`-v`</td><td>Verbose comments while outputting.</td></tr>
<tr><td>`-g<n>`</td><td>Set memory buffer granularity to the closest power of two lower than `<n>` bytes (default 1024.)</td></tr>
<tr><td>`-l<n>`</td><td>Set match limit to `<n>` matches (default 4096; 0 -> no limit.)</td></tr>
<tr><td>`-m<n>`</td><td>Set minimum match length to <n> symbols (default 3).</td></tr>
<tr><td>`-?` or `-h`</td><td>Display this help screen and exit.</td></tr>
2021-06-13 01:40:45 +00:00
</table>
2021-06-13 01:09:56 +00:00
2021-06-13 01:49:54 +00:00
Adding `-<s>-` will turn off switch `<s>`.
2021-06-13 01:49:54 +00:00
Also included is a simple `KillSpam` email client that takes the patterns
generated (from FindPatterns) and eliminates all the emails that have
matching patterns.