Skip to content

Commit cf1b13d

Browse files
dlenskiSBzakird
andauthored
Document the PORT field for CSV-format input (zmap#456)
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`. Co-authored-by: Zakir Durumeric <[email protected]>
1 parent cdf832c commit cf1b13d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,18 @@ Module specific options must be included after the module. Application specific
7272

7373
## Input Format
7474

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

7777
```text
78-
IP, DOMAIN, TAG
78+
IP, DOMAIN, TAG, PORT
7979
```
8080

8181
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.
8282

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

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

8788
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`.
8889

@@ -93,7 +94,9 @@ These are examples of valid input lines:
9394
domain.com
9495
10.0.0.1, domain.com
9596
10.0.0.1, domain.com, tag
97+
10.0.0.1, domain.com, tag, 1234
9698
10.0.0.1, , tag
99+
10.0.0.1, , , 5678
97100
, domain.com, tag
98101
192.168.0.0/24, , tag
99102

0 commit comments

Comments
 (0)