sendXML - SRS command-line client that accepts and returns SRS XML

This is a simple command line client for sending pure XML requests to the SRS via the SRS XML protocol.

Options

Options may be either specified directly on the command line, or from a configuration file (“.rikrc” in the users home directory).

When the same option is specified using both methods, the command-line takes precedence. Additionally some options are synonymous with environment variables, but the command-line still takes precedence - and you shouldn’t set the environment variables as that method is deprecated and may be removed in a future release.

Short Long Details
-r –registrar_id (Required) Specifies the ID of the registrar to send requests as.
-f –file The file containing the request to be signed and sent to the SRS.
-d –debug Print the request and response XML to STDOUT.
  –url The URL of the SRS system which you would like to communicate with.
-t –timeout The timeout, in seconds, of the communications with the SRS system.
  –gpg_id Defines which GNUPG Id to use to sign the SRS request.
  –gpg_public Specifies the path to the public keyring containing the public key used for signing requests. This will normally be a pubring.gpg file, when using GnuPG.
  –gpg_secret Specifies the path to the private keyring containing the public key used for signing requests. This will normally be a secring.gpg file, when using GnuPG.
  –gpg_passphrase Specifies the pass-phrase that will be used to unlock the PGP (or GPG) key used for signing requests.
  –gpg_passphrase_file Specifies the path to the file which contains pass-phrase that will be used to unlock the PGP (or GPG) key used for signing requests.
-s –sub_actionid Substitude the actionId attribute for a time-based string.
-h –help Display documentation

Note

To generate a GPG key please follow the instructions listed here: How do I generate a PGP key for use with SRS?

Examples

Using the send-xml.sh wrapper to communicate with the default SRS test server:

reg90@srs-client:~/release-6-4-13$ cat whois_example.xml
<NZSRSRequest VerMajor="1" VerMinor="0" RegistrarId="945">
    <Whois DomainName="catalyst.net.nz" SourceIP="1.2.3.4" FullResult="1"/>
</NZSRSRequest>
reg90@srs-client:~/release-6-4-13$ sendXML.sh -r 90 --gpg_id reg90-gpg-key@internetnz.net.nz whois_example.xml
<?xml version="1.0" encoding="UTF-8"?>
<NZSRSResponse VerMinor="7" VerMajor="6" RegistrarId="90"><Response FeSeq="60495919" FeId="8" Action="Whois" OrigRegistrarId="90" RecipientRegistrarId="90"><FeTimeStamp Year="2015" Month="05" Hour="15" TimeZoneOffset="+12:00" Day="25" Second="29" Minute="42"/><Domain Status="Active" Delegate="1" DomainName="internetnz.net.nz"><NameServers><Server FQDN="ns1.dns.net.nz"/><Server FQDN="ns2.dns.net.nz"/><Server FQDN="ns3.dns.net.nz"/><Server FQDN="ns4.dns.net.nz"/></NameServers><RegistrantContact Name="Internet New Zealand Inc" Email="registry@internetnz.net.nz"><PostalAddress Address2="P O Box 24361" PostalCode="6021" Address1="Internet New Zealand Inc" Province="Wellington" City="Wellington" CountryCode="NZ"/><Phone LocalNumber="9316970" AreaCode="4" CountryCode="64"/><Fax LocalNumber="9316979" AreaCode="4" CountryCode="64"/></RegistrantContact><RegistrarPublicContact Name="Domain Name Commissioner" Email="info@dnc.org.nz"><PostalAddress Address1="PO Box 11881" City="Wellington" CountryCode="NZ"/><Phone LocalNumber="472-1600" AreaCode="4" CountryCode="64"/><Fax LocalNumber="495-2115" AreaCode="4" CountryCode="64"/></RegistrarPublicContact><AdminContact Name="Internet New Zealand Inc" Email="registry@internetnz.net.nz"><PostalAddress Address2="P O Box 24361" PostalCode="6021" Address1="Internet New Zealand Inc" Province="Wellington" City="Wellington" CountryCode="NZ"/><Phone LocalNumber="9316970" AreaCode="4" CountryCode="64"/><Fax LocalNumber="9316979" AreaCode="4" CountryCode="64"/></AdminContact><TechnicalContact Name="Internet New Zealand Inc" Email="registry@internetnz.net.nz"><PostalAddress Address2="P O Box 24361" PostalCode="6021" Address1="Internet New Zealand Inc" Province="Wellington" City="Wellington" CountryCode="NZ"/><Phone LocalNumber="9316970" AreaCode="4" CountryCode="64"/><Fax LocalNumber="9316979" AreaCode="4" CountryCode="64"/></TechnicalContact><BilledUntil Year="2015" Month="06" Hour="19" TimeZoneOffset="+12:00" Day="07" Second="04" Minute="19"/><RegisteredDate Year="2002" Month="07" Hour="19" TimeZoneOffset="+12:00" Day="07" Second="04" Minute="19"/><AuditDetails><AuditTime><From Year="2015" Month="05" Hour="04" TimeZoneOffset="+12:00" Day="25" Second="07" Minute="32"/></AuditTime></AuditDetails></Domain></Response></NZSRSResponse>

Using the send-xml.sh wrapper to communicate with the RPS (registrar pre-production staging) server:

reg90@srs-client:~/release-6-4-13$ sendXML.sh -r 90 --gpg_id reg90-gpg-key@internetnz.net.nz --url https://srsrps.srs.net.nz/srs/registrar whois_example.xml