loading
loading
Utilities
Check a file's values against conditions and exit with a matching code.
overview
assert-tool is control flow between stages: read --in-file, test values, and exit non-zero when required conditions fail so later nodes never run on bad input.
Reach for it after discovery when empty hosts, missing markers, or unexpected shapes should abort before an expensive scanner starts.
Named inputs are --match (all/any), --regex, --from-string, --from-file, and --delimiter. Trickest provides it as a managed Utilities node that writes FILE and FOLDER alongside the exit status.
use cases
Assert that a discovery node's output file contains at least the values you expect, and exit non-zero so the pipeline halts instead of feeding nothing forward.
Match earlier-stage output against a known string or pattern to verify the right host, finding, or marker showed up before continuing.
Set --match all to require every condition, or any to pass on a single hit, so one node expresses either strict or loose gates.
Use --regex to assert that values fit a shape, such as a status code range or a URL pattern, rather than a fixed string.
reference
| Name | Type | Flag | Description |
|---|---|---|---|
| match | STRING | --match | match mode [all/any] (default: `all`) |
| regex | STRING | --regex | use regex to match values |
| in-file | FILE | --in-file | file to read |
| delimiter | STRING | --delimiter | delimiter for multiple `--from-string` values (default: `,`) |
| from-file | FILE | --from-file | match from file |
| from-string | STRING | --from-string | match from string |
Showing key inputs. assert-tool exposes 6 inputs in total.
example
# assert-tool: fail the run unless live hosts were foundassert_tool --in-file live.txt --regex '.+' assert-tool: checking live.txtrule: regex .+lines: 12matched: 12status: okexit: 0guidance
Use assert-tool to turn file contents into a pass or fail decision inside a workflow. It gates; it does not filter. Prefer gf or fgrep-by-string when you need to select lines rather than halt the run.
Filters lines by a fixed string. Use it to select values; use assert-tool to decide pass or fail on them.
Pattern-based grep wrapper for selecting matches. assert-tool turns match outcomes into an exit code.
Appends only new lines and signals novelty. A different gate: change detection, not condition checks.
faq
related
Spider a URL and return a wordlist for password crackers.
Wordlist and mined-word subdomain permutation.
Import, export, and upsert workflow data against an Airtable base.
Decode Android APK files into smali sources and resources.
Authenticated Route53 hosted-zone inventory.
Extract file or folder lines by START_LINE,END_LINE batch range.
A results file feeds assert-tool, which checks it against your conditions and exits pass or fail so the workflow knows whether to continue.
Facts on this page come from the live Trickest tool library.