Skip to content

Commit

Permalink
Document the PORT field for CSV-format input
Browse files Browse the repository at this point in the history
The optional `PORT` argument was added in
7c933df, and documented via comments in
`input.go`, but it was never added to the main documentation in `README.md`.
  • Loading branch information
dlenskiSB committed Sep 4, 2024
1 parent 82b0038 commit f5d8ec6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,18 @@ Module specific options must be included after the module. Application specific

## Input Format

Targets are specified with input files or from `stdin`, in CSV format. Each input line has three fields:
Targets are specified with input files or from `stdin`, in CSV format. Each input line has up to four fields:

```text
IP, DOMAIN, TAG
IP, DOMAIN, TAG, PORT
```

Each line must specify `IP`, `DOMAIN`, or both. If only `DOMAIN` is provided, scanners perform a DNS hostname lookup to determine the IP address. If both `IP` and `DOMAIN` are provided, scanners connect to `IP` but use `DOMAIN` in protocol-specific contexts, such as the HTTP HOST header and TLS SNI extension.

If the `IP` field contains a CIDR block, the framework will expand it to one target for each IP address in the block.

The `TAG` field is optional and used with the `--trigger` scanner argument.
The `TAG` field is optional and used with the `--trigger` scanner argument. The `PORT` field is also optional, and acts
as a per-line override for the `-p`/`--port` option.

Unused fields can be blank, and trailing unused fields can be omitted entirely. For backwards compatibility, the parser allows lines with only one field to contain `DOMAIN`.

Expand All @@ -93,7 +94,9 @@ These are examples of valid input lines:
domain.com
10.0.0.1, domain.com
10.0.0.1, domain.com, tag
10.0.0.1, domain.com, tag, 1234
10.0.0.1, , tag
10.0.0.1, , , 5678
, domain.com, tag
192.168.0.0/24, , tag
Expand Down

0 comments on commit f5d8ec6

Please sign in to comment.