EPPInterpreter

Introduction

The EPPInterpreter is an application which allows communications with any EPP registrar to be handled in real-time with scripting languages. Currently the EPPInterpreter includes the Jython library and thus supports Python. You should be able to include any language supported by IBM's Bean Scripting Framework by placing the language's JAR files in your classpath.

Starting EPPInterpreter

EPPInterpreter is packaged as an executable JAR. On Windows this means that you can just double click the EPPInterpreter.jar file. You can also execute from the command line with:

java -jar EPPInterpreter.jar [-s ssl-path][-l log-config]

You will need to execute from the command line to use the -s or -l switches.

If you execute the JAR without the -s switch then the ssl path will be <working-directory>/ssl and the log properties file will be <working-directory>/log.properties.

Connecting to the Registry

You must first establish a connection to an EPP registry before executing any scripts. Click on the File->Connect menu item. This will cause a connection dialog to appear.

To create a new connection click the Add... button. You will need to provide the registry address (name or IP address), port, your username and your password. You will also need to select a protocol. In order to use TCP_TLS you must have installed the correct SSL certificates or keystore in the ssl directory.

You may change your password in the registry with the Change Password button. A dialog will appear asking for your new password. Once you enter a new password and click OK a connection will be established to the registry and your password will be changed. Note: You should not be connected when you change your password. An new connection will be made.

You can also edit and remove connections from this same dialog. In addition you can import or export connections which are stored as XML documents. EPPInterpreter comes with a connection descriptor for the Tucows test registry. You can add this connection by clicking Import... and selecting the tucows.xml file.

Once a connection is established (the word "Connected" should appear in the status field at the bottom of the EPPInterpreter window) you can start executing scripts.

Scripting

The following objects and methods are provided (all examples are written in Python):

session object

The object for communicating with the registry. Each method returns the appropriate epp_xxxRsp object. For example, the createDomain() methods return an epp_DomainCreateRsp object.

checkDomain(name)

Check the registry to determine if the name exists.

Example:

session.checkDomain("domain.info")

checkDomains(name[])

Iterate through the list of domains checking each to see if it exists in the registry.

Example:

domains = ["domain1.info","domain2.info"]
session.checkDomains(domains)

statusDomain(name)

Get the information in the registry for the given name.

Example:

session.statusDomain("domain.info")

createDomain(name, period, authString)

Create (register) a domain in the registry. The domain will be registered with no contacts and no name servers.

Example:

session.createDomain("domain.info", 2, "my secret")

createDomain(name, nameServers[], period, authString)

Create (register) a domain in the registry with the given name servers. The domain will be registered with no contacts.

Example:

nameServers = ["ns3.domain.com","ns4.domain.com"]
session.createDomain("domain.info", nameServers, 2, "my secret")

createDomain(name, registrant, admin, billing, tech, nameServers[], period, authString)

Create (register) a domain in the registry with the given name servers and contacts.

Example:

nameServers = ["ns3.domain.info","ns4.domain.info"]
session.createDomain("domain.info", "C1220-LRMS", "C1221-LRMS", "C1222-LRMS", "C1223-LRMS", nameServers, 2, "my secret")

createDomain(name, registrant, admin, billing, tech, nameServers[], period, authString, unspec)

Create (register) a domain in the registry with the given name servers and contacts. This method also includes the unspec paramter which is any unspecified information (trademark information for example).

Example:

from java.util import ArrayList

nameServers = ["ns1.domain.com","ns2.domain.com"]
session.createDomain("domain.info", "C1220-LRMS", "C1221-LRMS", "C1222-LRMS", "C1223-LRMS", nameServers, 2, "my secret", unspec)

deleteDomain(name)

Delete a domain name from the Registry

Example:

session.deleteDomain("domain.info")

renewDomain(name, period, currentExpiration)

Renew a domain name for the given period. The current expiration date is required.

Example:

session.renewDomain("domain.info", 1, "2002-01-15")

queryTransferDomain(name, authString)

Query the transfer status of the given domain name.

Example:

session.queryTransferDomain("domain.info", "my secret")

approveTransferDomain(name, authString)

Approve the transfer of the given domain name.

Example:

session.approveTransferDomain("domain.info", "my secret")

cancelTransferDomain(name, authString)

Cancel the transfer of the given domain name.

Example:

session.cancelTransferDomain("domain.info", "my secret")

rejectTransferDomain(name, authString)

Reject the transfer of the given domain name.

Example:

session.rejectTransferDomain("domain.info", "my secret")

requestTransferDomain(name, authString)

Request the transfer of the given domain name. The period defaults to 0.

Example:

session.requestTransferDomain("domain.info", 1, "my secret")

requestTransferDomain(name, period, authString)

Request the transfer of the given domain name. The period field is used to add additional years to the domain name.

Example:

session.requestTransferDomain("domain.info", 1, "my secret")

transferDomain(name, period, opCode, authString)

Request the transfer of the given domain name.

Example:

session.transferDomain("domain.info", 1, "approve", "my secret")

updateDomain(name, changes)

Update the given domain name.

Example:

from com.signaturedomains.epp import EPPDomain
from com.signaturedomains.epp import EPPContact
from com.signaturedomains.epp import EPPDomainChanges

name = "domain.info"

domainChanges = EPPDomainChanges()
domainChanges.removeNameServer("ns1.domain.info")
domainChanges.removeNameServer("ns2.domain.info")
domainChanges.addNameServer("ns3.domain.com")
domainChanges.addNameServer("ns4.domain.com")

domainChanges.removeContact("C100-LRMS", EPPContact.ADMIN)
domainChanges.addContact("C101-LRMS", EPPContact.ADMIN)

domainChanges.addStatus(EPPDomain.CLIENT_LOCK)

session.updateDomain(name, domainChanges)

checkContact(roid)

Determine if the contact exists

Example:

session.checkContact("C100-LRMS")

checkContacts(roids[])

Determine if the contacts exist

Example:

contacts = ["C100-LRMS", "C101-LRMS"]
session.checkContacts(contacts)

statusContact(roid)

Get information for the given contact.

Example:

session.statusContact("C100-LRMS")

createContact(contact)

Create the given contact.

Example:

from com.signaturedomains.epp import EPPContact
from com.signaturedomains.epp import EPPContactAddress
from com.signaturedomains.epp import EPPContactNameAddress

address = EPPContactAddress()
address.setStreet1("1 SW 1st St")
address.setCity("Miami")
address.setState("Florida")
address.setCountry("US")
address.setPostalCode("33133")
contactAddress = EPPContactNameAddress()
contactAddress.setName("Joe User")
contactAddress.setOrganization("Signature Domains Inc.")
contactAddress.setAddress(address)

contact = EPPContact()
contact.setVoice("+1.3055664344")
contact.setFax("+1.3055664345")
contact.setEmail("aeden@signaturedomains.com")
contact.setAddress(contactAddress)

contact.setAuthInfo("my secret")

session.createContact(contact)

deleteContact(roid)

Delete the given contact.

Example:

session.deleteContact("C100-LRMS")

updateContact(roid, changes)

Update the given contact.

Example:

from com.signaturedomains.epp import EPPContact
from com.signaturedomains.epp import EPPContactChanges
from com.signaturedomains.epp import EPPContactNameAddress

nameAddress = EPPContactNameAddress()
nameAddress.setName("Jane Doe")

contact = EPPContact()
contact.setAddress(nameAddress)

contactChanges = EPPContactChanges()
contactChanges.setChange(contact)

session.updateContact("C100-LRMS", contactChanges)

queryTransferContact(roid, authString)

Query the transfer status of the given contact.

Example:

session.queryTransferContact("C2000-LRMS", "my secret")

approveTransferContact(roid, authString)

Approve the transfer of the given contact.

Example:

session.approveTransferContact("C2000-LRMS", "my secret")

cancelTransferContact(roid, authString)

Cancel the transfer of the given contact.

Example:

session.cancelTransferContact("C2000-LRMS", "my secret")

rejectTransferContact(roid, authString)

Reject the transfer of the given contact.

Example:

session.rejectTransferContact("C2000-LRMS", "my secret")

requestTransferContact(roid, authString)

Request the transfer of the given contact.

Example:

session.requestTransferContact("C2000-LRMS", "my secret")

transferContact(roid, opCode, authString)

Generic transfer method. The operation defined by the provided opcode will be executed.

Example:

session.transferDomain("C2000-LRMS", "approve", "my secret")

checkNameServer(nameServer)

Determine if the name server exists.

Example:

session.checkNameServer("ns1.domain.info")

checkNameServers(nameServers[])

Determine if the name servers exist.

Example:

nameServers = ["ns1.domain.info", "ns2.domain.info"]
session.checkNameServers(nameServers)

statusNameServer(nameServer)

Get information for the given name server.

Example:

session.statusNameServer("ns1.domain.info")

createNameServer(nameServer)

Create the name server. This method will register the name server with no IP addresses. This method is useful for registering name servers which are from a different registry.

Example:

session.createNameServer("ns1.domain.info")

statusNameServer(nameServer, ipAddress)

Create the name server with a single IP address

Example:

session.createNameServer("ns1.domain.info", "54.32.44.211")

statusNameServer(nameServer, ipAddresses)

Create the name server with multiple IP address

Example:

addresses = ["54.32.44.211","36.44.22.1"]
session.createNameServer("ns1.domain.info", addresses)

createNameServer(nameServer)

Create the name server. If you want to have a name server with IPv6 addresses you will need to use this method.

Example:

from com.signaturedomains.epp import EPPNameServer

nameServer = EPPNameServer()
nameServer.setName("ns1.domain.info")
nameServer.addAddress("54.32.111.44")

session.createNameServer(nameServer)

updateNameServer(nameServer, changes)

Modify the given name server.

Example:

from com.signaturedomains.epp import EPPNameServerChanges

address = "54.33.23.111"
name = "ns1.domain.info"

changes = EPPNameServerChanges()
changes.addAddress(address)

session.nameServerUpdate(name, changes)

deleteNameServer(nameServer)

Delete the given name server.

Example:

session.deleteNameServer("ns1.domain.info")

out object

A stream for writing to the log window. This object has all of the methods defined in java.io.PrintWriter

For current information on what methods are available in the scripting environment you should look at the com.signaturedomains.epp.EPPSession class which is available in the EPPAPI (available from http://eppinterpreter.sf.net/)

Acknowledgements

This product includes software developed by the Apache Software Foundation (http://www.apache.org/).

This product includes software developed by the JDOM Project (http://www.jdom.org/).

Disclaimer

 THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, 
 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 POSSIBILITY OF SUCH DAMAGE.