loading
loading
Utilities
Add a prefix string to each line in files.
overview
prefix-file-lines is a small text utility: given a file and a prefix string, it writes every line with that prefix applied.
That is enough to turn bare hostnames into https:// URLs or to stamp a common path root onto a wordlist without a custom script.
Use it between recon outputs and tools that expect fully qualified URLs or rooted paths.
source github.com/trickest
use cases
Prefix a list of hostnames with https:// so a crawler or HTTP prober downstream receives well-formed URLs instead of bare names.
Add the scheme, parameter, or label a downstream node expects so two stages connect without a custom script in between.
Prefix each line with a source marker so that when several files merge into one sink, you can still tell where each entry came from.
reference
| Name | Type | Flag | Description |
|---|---|---|---|
| file | FILE | · | Folder with files that need a prefix for each line |
| folder | FOLDER | · | Folder with files that need a prefix for each line |
| prefix-string | STRING | · | String that will be appended to each line. |
Showing key inputs. prefix-file-lines exposes 3 inputs in total.
example
# prefix-file-lines: turn hosts into https URLsprefix-file-lines --prefix 'https://' hosts.txthttps://www.example.comhttps://api.example.comhttps://dev.example.comhttps://staging.example.comhttps://mail.example.comguidance
Use prefix-file-lines as glue when one stage emits lines that the next stage needs prefixed, such as adding https:// to bare hosts. For appending to the end of each line instead, use suffix-file-lines. For richer URL rewriting, reach for unfurl or qsreplace.
The mirror tool: appends a string to the end of each line instead of the start.
Pulls apart and reformats URLs by component. Use it when you need structured rewriting, not a flat prefix.
Appends only new, unique lines to a file. Pair it with a prefix step when deduping a growing list.
faq
related
Import, export, and link workflow data with Airtable.
Decode Android APK files into smali sources and resources.
Check a file's values against conditions and exit with a matching code.
Extract all hosted zones from AWS Route53.
Output file lines by batch size, given START_LINE and END_LINE.
Extract a batch range from a file's lines or a folder's files, with parallel processing.
A host list feeds prefix-file-lines, which prepends https:// to each line and hands the URLs to httpx for probing before they land as output.
Facts on this page come from the live Trickest tool library.