Skip to content

LOGGING AND METADATA OPTIONS

星星沅圆 edited this page Mar 9, 2025 · 1 revision

Using the command xmap --help (or more concisely, xmap -h ), you can see a brief introduction to the additional options as follows:

Additional options:
  -T, --sender-threads=num      Threads used to send packets  (default=`1')
  -C, --config=filename         Read a configuration file, which can specify
                                  any of these options
                                  (default=`/etc/xmap/xmap.conf')
  -d, --dryrun                  Do not actually send packets, just show
      --max-sendto-failures=num Maximum NIC sendto failures before scan is
                                  aborted  (default=`-1')
      --min-hitrate=rate        Minimum hitrate that scan can hit before scan
                                  is aborted  (default=`0.0')
      --cores=STRING            Comma-separated list of cores to pin to
      --ignore-blacklist-error  Ignore invalid entries in
                                  `--whitelist-file/blacklist-file'
      --ignore-filelist-error   Ignore invalid entries in `--list-of-ips-file'
  -h, --help                    Print help and exit
  -V, --version                 Print version and exit

There are several types of on-screen output that XMap produces. By default, XMap will print out basic progress information similar to the following every 1 second. This can be disabled by setting the -q flag.

0:02 41%; send: 1 done (12 p/s 9.42 Kb/s avg); recv: 1 1 p/s (0 p/s avg); drops: 0 p/s (0 p/s avg); hitrate: 100.00%

Log

XMap also prints out informational messages during scanner configuration such as the following, which can be controlled with the -v argument.

Mar 02 07:26:37.595 [INFO] xmap: probe network: ipv6
Mar 02 07:26:37.595 [INFO] xmap: probe module: icmp_echo
Mar 02 07:26:37.595 [INFO] xmap: output module: json
Mar 02 07:26:37.595 [INFO] xmap: iid module: low
Mar 02 07:26:37.645 [INFO] recv: Data link layer Ethernet
  • -l, --log-file=filename: Send all log messages to the specified file instead of the default output, which is the standard error (stderr).

  • -L, --log-directory=path: Write its log entries into a file within the provided directory. The log file is automatically named with a timestamp, ensuring that each scanning session's logs are stored separately.

  • --disable-syslog : Do not send its log messages to the system logging facility (syslog).

  • -u, --status-updates-file: Log the scan progress updates to a CSV file. Each update records information such as the number of probes sent, responses received, or the current status of the scan.

Metadata

XMap also supports providing its metadata.The metadata encapsulates comprehensive details about the scan’s configuration, environment, and performance. It includes information on host identity, network settings (both IP and MAC addresses), probe characteristics, scan timing, performance metrics, module usage, and filtering criteria.

  • -m, --metadata-file=filename: Save the scan metadata in JSON format to a specified file. The metadata typically includes details about the scan such as the scan parameters, results summary, and timestamps.

  • --notes=notes: This option allows you to add custom textual notes to the scan metadata. Such notes might include information about the purpose of the scan, context about the target, or any other user-specific details. These notes become part of the metadata output, aiding in record-keeping and later analysis.

  • --user-metadata=json: Inject structured JSON data into the scan metadata. By providing additional fields in JSON format, you can include custom metadata such as project identifiers, department names, or scan-specific identifiers.

Clone this wiki locally