In normal usage you should specify scan ranges through the user interface. You can also specify scan ranges using the tw_injectip utility. The usage of the utility is as follows:
Where range is an IP address, a space separated list of IP addresses, a range of IP addresses, a subnet, or if the
--file switch is used, a file containing IP addresses. If a file of IPs is used, one IP per line should be specified.
The options are described in the Table below.
|Command line option||Description|
|--clean||Remove all the recurrent ranges which are not currently being scanned from the Reasoning pipeline.|
|Expect a file or a list of files as arguments. They must be plain text files with a new line delimited list of IP addresses.|
|Displays help on standard options, some brief usage information, and exits.|
|--label=label||Specify a label for the scan.|
|Number of backup logs files preserved. The default is 0 which means that no previous logs are preserved. If a value is specified, the existing log is renamed logname.log.1 suffix and the new log written as logname.log. The same happens with later logs until the first is called logname.log.n. where n is the value specified. The next time a new log is written, the oldest is deleted. The rollover time is midnight.|
|--logfile= filename||The name of the log file into which log messages are written.|
|--loglevel= level||Logging level:
|--passphrase= passphrase||Specify a vault passphrase to use.|
|-p, --password= password||The password that corresponds to the user name entered after the --username option.
Note that if you use this option your password is visible in clear text. You should avoid using this option, when you do not use it, you are prompted for the password and it is not echoed.
|-r, --random||Scans the IP addresses given (in a file or listed at the command prompt) in a random order.|
|--recur-daily||Adds a daily recurrent range. This option specifies a recurrent range scan which must be modified with the --recurrence-duration and or --recurrence-start switches.|
|--recurrence-duration=int||Specifies the length of time for the recurring scan to last. This is specified in hours.|
|--recurrence-start= int||Specified the start time for recurrent ranges expressed in hours after midnight.|
|--replace=ID|| Replace (edit) the specified scheduled discovery run. The discovery run is specified using its ID which can be determined using a search query like the following:
search IPRange where scan_type='Scheduled' show range_id,label. See below for examples.
|-l, --scanLevel= string||Scan level to use. This may be one of the following:
|-s, --start||Force reasoning to start. This is the equivalent of clicking the START ALL SCANS button in the UI.|
|-x, --stop||Ask reasoning to stop. This is the equivalent of clicking the STOP ALL SCANS button in the UI.|
|-u, --username =username||Username. This is a BMC Atrium Discovery command line user.|
|-v, --version||Displays BMC Atrium Discovery version information and exits.|
In the following examples, the user name is always system and the password is not specified on the command line. The utility prompts for the password after you enter the command. Enter the commands on a single line, line breaks here are an aid to readability.
The following example shows how to find the ID of a scheduled discovery run and use this to update the run's label. The way that this option works is to delete and replace the scan so it is important to specify all essential parameters (recur-daily, recurrence-duration and/or recurrence-start, and a range).