|
SmartWhois supports command line parameters specifying IP
address/hostname/domain, as well as files to be opened/saved. There
are two query types supported: Simple queries and Batch
queries.
Simple Queries
To launch SmartWhois and make it query an IP address/hostname or
domain, you don't need to use any parameters except the IP
address/hostname/domain itself:
SW.EXE
207.46.197.113
SW.EXE
www.yahoo.com
By default, SmartWhois automatically detects your input and
queries 207.46.197.113 as IP address and yahoo.com as domain.
Specific queries can be made using following parameters:
-d specifies that the program should
make a domain query.
-i specifies that the program should
make an IP / hostname query.
Examples:
SW.EXE yahoo.com
-d
SW.EXE www.etrade.com
–i
Additionally you can run a dual query (IP / Hostname and Domain) by specifying
the "2" symbol as a query type parameter:
SW.EXE www.etrade.com
–2
Optional simple query parameters:
|
-os
|
specifies that the query results are sent to the active console
application, such as the command prompt. If you use this parameter
when executing a query from the command prompt, the query results
will be printed in the command prompt window. This option works in
Windows XP/2003 or higher.
|
|
-h
|
specifies that the query is processed without opening the
program's main window. Please note that the SmartWhois tray icon
will always be displayed when this parameter is used. The icon will
disappear when the program's main window is opened by
right-clicking on the icon and selecting Show from the menu, or by
double-clicking on the icon.
|
|
-c
|
specifies that the program must close after the query is
processed. This parameter should be used only in conjunction with
the "-os" parameter and must be preceded by it.
|
Examples:
SW.EXE yahoo.com -os
-h -c
SW.EXE yahoo.com -d
-os -h -c
Batch Queries
You can use command line parameters for performing complex batch
tasks, such as loading a list of IP addresses, processing the list,
saving the obtained results into a text file, and exiting. The
following parameters exist:
|
-b
|
specifies that the program should work in batch mode. This
parameter is mandatory in the batch mode and should be the first
one.
|
|
-st
|
specifies that the next argument is a text file containing IP
addresses. This parameter is mandatory in the batch mode when the
"As text containing IP
addresses" query option is selected.
|
|
-si
|
specifies that the next argument is a source file containing a
list of IP addresses. This parameter is mandatory in the batch mode
when querying a list of IP addresses.
|
|
-sd
|
specifies that the next argument is a source file containing a
list of domains. This parameter is mandatory in the batch mode when
querying a list of domains.
|
Examples:
SW.EXE -b -sd
C:\LOGS\domains.txt
The program reads domains from list.txt and processes the list
without saving results.
Optional parameters:
|
-ot
|
specifies that the next argument is an output file, and that the
results should be saved as text.
|
|
-oa
|
specifies that the next argument is an output file, and that the
results should be saved as a SmartWhois archive.
|
|
-ox
|
specifies that the next argument is an output file, and that the
results should be saved as XML.
|
|
-oe
|
specifies that the next argument is an output file, and that the
results should be saved as XLS.
|
|
-h
|
specifies that the query is processed without opening the
program's main window. Please note that the SmartWhois tray icon
will always be displayed when this parameter is used. The icon will
disappear when the program's main window is opened by
right-clicking on the icon and selecting "Show" from the menu, or
by double-clicking on the icon.
|
|
-c
|
Specifies that the program should be closed when done. This
parameter must be used with the output format defining parameters
(-oa, -ot, -ox, -oe) and the file name where the results will be
written. It must always follow them.
|
Examples:
SW.EXE -b -si
C:\LOGS\list.txt -ot C:\LOGS\results.txt
The program reads IP addresses from list.txt, processes the
list, and saves the results to results.txt in plain text
format.
SW.EXE -b -si
C:\LOGS\list.txt -ox C:\LOGS\results.xml
The program reads IP addresses from list.txt, processes the
list, and saves the results to results.xml in XML format.
SW.EXE -b -sd
C:\LOGS\domains.txt
The program reads domains from list.txt and processes the list
without saving results.
SW.EXE -b -sd
C:\LOGS\list.txt -oa "C:\Business Data\my domains.swh" -c
The program reads domains from list.txt, processes the list,
saves the results to mydomains.swh as a SmartWhois archive, and
exits.
Important: If a file name or its
path contains spaces, it must be enclosed in quotation marks ("
").
|