This repository has been archived by the owner on Aug 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/justnx/epp-drs
- Loading branch information
Showing
2,721 changed files
with
459,640 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
epp-drs | ||
======= | ||
|
||
OVERVIEW | ||
|
||
EPP-DRS (EPP Domain Registration System) is the most powerful domain selling and management system in the world. | ||
It allows you to run your own full-cycle domain registration service, with ability for your clients to register, renew, transfer domain names. | ||
|
||
System web interface consists of 3 areas: Domain Order Wizard, Registrant Control Panel and Registrar Control Panel. | ||
The system communicates with various registries and SRS via modules and is handling over 150 (and counting) domain extensions. | ||
|
||
Well-documented SDK allows developers to easily build and test custom modules. | ||
|
||
Software is made by registrars for registrars - it's a result of collaboration with respected domain business insiders. | ||
|
||
FEATURES | ||
|
||
* Easy to deploy and maintain. | ||
* Built-in smart auto-update that will permanently keep you up-to-date and secure | ||
* Fully-implemented EPP protocol (for EPP-based registry modules) according to RFCs 4930-4934 (with appropriate registries extensions). | ||
* Powerful invoicing system with automated payments. | ||
* Natively modular. You can create your own fully-featured registry and payment modules using EPP-DRS SDK. Documentation available. | ||
* Built with usability in mind: All interfaces are well thought-out. | ||
* Templates-based. Every aspect of interface customizable. | ||
* AJAX-widgets for domain avalability check, template editor, etc. | ||
* Easily translatable and localizable via language files and settings. | ||
* No legacy code. Most domain selling systems on the market are ancient. They are victims of backward compatibility requirement. EPP-DRS is not. | ||
* Logging system. All registry transactions are logged. | ||
* Secure. 256 bit encryption used for internal passwords encryption and hashing. | ||
* You can safely migrate from your current sofware, import existing domains, previously registered directly through registry or using any other software. | ||
* Flexible: Customizable order forms. You can add additional custom fields of various types. | ||
* Ability to set separate pricing for specific clients and groups. | ||
* Various VATs, like Managed DNS (you can do domain marking with ease). | ||
|
||
DOCUMENTATION | ||
|
||
http://epp-drs.com/docs/ | ||
|
||
*** | ||
|
||
In memory of Alexey Kovalyov - Brilliant engineer, caring brother, and most excellent friend. This project is dedicated to you. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>epp-drs-trunk</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.php.core.PhpIncrementalProjectBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.php.core.PHPNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#Mon Dec 24 19:41:16 EET 2007 | ||
eclipse.preferences.version=1 | ||
org.eclipse.php.core.contextRoot= | ||
org.eclipse.php.core.defaultEncoding= | ||
org.eclipse.php.core.includePath=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<includepath>\r\n</includepath>\r\n |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
This is a command line script that will upgrade your EPP-DRS v972 or earlier to a newest version. | ||
|
||
PREREQUISITES | ||
1. Pre-972 copy installed | ||
2. A new version installed per installation instructions, but not configured. | ||
|
||
USAGE | ||
Run the scirpt as php ./upgrade-to-v3.php to see usage parameters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<? | ||
require_once (dirname(__FILE__) . '/../src/prepend.inc.php'); | ||
define('NO_TEMPLATES', true); | ||
|
||
// shift script name | ||
array_shift($argv); | ||
do { | ||
$name = array_shift($argv); | ||
$value = array_shift($argv); | ||
switch ($name) | ||
{ | ||
case '-m': | ||
case '--module': | ||
$module_name = $value; | ||
break; | ||
|
||
case '-t': | ||
case '--tld': | ||
$tlds = array_map('trim', explode(',', $value)); | ||
break; | ||
} | ||
} while ($argv); | ||
|
||
if (!($module_name && $tlds)) | ||
{ | ||
print <<<T | ||
Usage: php -q add-tlds.php --module [module name] --tld "tld1[, tld2, ... tldn]" | ||
-m | ||
--module Module name (ex: dotkz) | ||
-t | ||
--tld TLDs comma separated (ex: "com, com.us") | ||
T; | ||
die(); | ||
} | ||
|
||
$modLoaded = $db->GetRow("SELECT * FROM modules WHERE name = ?", array($module_name)); | ||
if ($modLoaded) { | ||
foreach ($tlds as $tld) { | ||
$row = $db->GetRow("SELECT * FROM tlds WHERE tld = '{$tld}'"); | ||
if (!$row) { | ||
$db->Execute("INSERT INTO tlds SET TLD = '{$tld}', isactive='0', modulename='{$module_name}'"); | ||
print "Added {$tld}\n"; | ||
} | ||
} | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
require_once (dirname(__FILE__) . '/../src/prepend.inc.php'); | ||
define('NO_TEMPLATES', true); | ||
error_reporting(E_ALL ^ E_NOTICE); | ||
|
||
$filename = $_SERVER['argv'][1]; | ||
if (!$filename) { | ||
print <<<USAGE | ||
Usage: ch-obtain-tarnsfercode.php OUTFILE | ||
USAGE; | ||
die(); | ||
} | ||
|
||
print "Obtaining transfer codes...\n"; | ||
|
||
$Registry = $RegistryModuleFactory->GetRegistryByName('EPPCH'); | ||
$Module = $Registry->GetModule(); | ||
|
||
$fp = fopen($filename, 'w+'); | ||
while ($Resp = $Module->ReadMessage()) { | ||
try { | ||
$resData = $Resp->RawResponse->response->resData; | ||
if (!$resData) { | ||
$resData = $Resp->RawResponse->response->children('urn:ietf:params:xml:ns:epp-1.0'); | ||
preg_match('/\<epp\:resData[\s\S]+(?<=\<\/epp:resData\>)/', $Resp->RawResponse->asXML(), $matches); | ||
$resData = simplexml_load_string($matches[0]); | ||
} | ||
|
||
$infData = $resData->children('urn:ietf:params:xml:ns:domain-1.0'); | ||
if ($infData) { | ||
$line = sprintf("%s\t%s\n", $infData[0]->name, $infData[0]->authInfo->pw); | ||
print $line; | ||
fwrite($fp, $line); | ||
} | ||
|
||
} catch (Exception $e) { | ||
print "Caught: {$e->getMessage}\n"; | ||
} | ||
$Module->AcknowledgeMessage($Resp); | ||
} | ||
|
||
print "Done\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<?php | ||
define("NO_SESSIONS", 1); | ||
define("NO_TEMPLATES", 1); | ||
require_once (dirname(__FILE__) . "/../src/prepend.inc.php"); | ||
|
||
function _die($message) { | ||
die( | ||
"{$message}.\n" . | ||
"You can execute migration script again by executing in shell command:\n" . | ||
"\$ php -q ".__FILE__ . "\n" | ||
); | ||
} | ||
|
||
try { | ||
print "Starting migration...\n"; | ||
|
||
$row = $db->GetRow("SELECT * FROM tlds WHERE TLD = ? AND modulename = ?", array("nl", "DotNL")); | ||
if (!$row || $row["isactive"] == 0) { | ||
die("DotNL module not used\n"); | ||
} | ||
|
||
$row = $db->GetRow("SELECT * FROM tlds WHERE TLD = ? AND modulename = ?", array("nl*", "EPPNL")); | ||
if (!$row || $row["isactive"] == 0) { | ||
_die("EPPNL module is not enabled. Please enable it and configure to use live EPP server"); | ||
} | ||
|
||
|
||
print "Checking that EPPNL is properly configured\n"; | ||
$Registry = $RegistryModuleFactory->GetRegistryByExtension("nl*"); | ||
$Domain = $Registry->NewDomainInstance(); | ||
$Domain->Name = "epp-drs-" . rand(1000, 9999); | ||
$Response = $Registry->DomainCanBeRegistered($Domain); | ||
if (!$Response->Result) { | ||
_die("EPPNL module is not properly configured. Cannot domain:check '{$Domain->Name}.nl'"); | ||
} | ||
print "EPPNL is ready for use\n"; | ||
|
||
|
||
print "Switching DotNL -> EPPNL for .nl domain extension\n"; | ||
$sql = "UPDATE tlds SET isactive = ?, modulename = ? WHERE TLD = ?"; | ||
$db->Execute($sql, array(1, "EPPNL", "nl")); | ||
print "Switched\n"; | ||
|
||
|
||
print "Removing DotNL contacts data from database\n"; | ||
$db->Execute("DELETE c, cd FROM contacts c | ||
LEFT JOIN contacts_data cd ON (cd.contactid = c.clid) WHERE c.module_name = ?", | ||
array("DotNL")); | ||
print "Removed\n"; | ||
|
||
|
||
print "Importing EPPNL contacts data from registry\n"; | ||
$DbContact = DBContact::GetInstance(); | ||
$clids = array(); | ||
foreach (array("c_registrant", "c_admin", "c_tech") as $ctype) { | ||
$rows = $db->GetAll("SELECT DISTINCT $ctype FROM domains WHERE TLD = ?", array("nl")); | ||
foreach ($rows as $row) { | ||
if (!is_numeric($row[$ctype])) { | ||
$clids[] = $row[$ctype]; | ||
} | ||
} | ||
} | ||
$clids = array_unique(array_filter($clids)); | ||
|
||
$Registry = $RegistryModuleFactory->GetRegistryByExtension("nl"); | ||
foreach ($clids as $clid) { | ||
$Contact = $Registry->NewContactInstanceByGroup("generic"); | ||
$Contact->CLID = $clid; | ||
try { | ||
printf("Synchronize '%s'\n", $clid); | ||
$Contact = $Registry->GetRemoteContact($Contact); | ||
} catch (Exception $e) { | ||
printf("error: Cannot synchronize '%s'. %s\n", $clid, $e->getMessage()); | ||
$Contact->FullName = $clid; | ||
} | ||
$DbContact->Save($Contact); | ||
sleep(2); | ||
} | ||
print "Sync complete\n"; | ||
|
||
|
||
print "Update domains -> contacts relations\n"; | ||
$db->Execute("UPDATE contacts c, domains d SET c.userid = d.userid | ||
WHERE c.clid = d.c_registrant OR c.clid = d.c_admin OR c.clid = d.c_tech AND d.TLD = 'nl'"); | ||
print "Updated\n"; | ||
|
||
|
||
|
||
/* | ||
$DbDomain = DBDomain::GetInstance(); | ||
$Registry = $RegistryModuleFactory->GetRegistryByExtension("nl"); | ||
$rows = $db->GetAll("SELECT * FROM domains WHERE TLD = ?", array("nl")); | ||
foreach ($rows as $row) { | ||
if ($row["status"] == "Delegated") { | ||
printf("Synchronize '%s'\n", "{$row["name"]}.{$row["TLD"]}"); | ||
$Domain = $DbDomain->Load($row["id"]); | ||
try { | ||
$Domain = $Registry->GetRemoteDomain($Domain); | ||
$DbDomain->Save($Domain); | ||
} catch (Exception $e) { | ||
printf("error: Cannot synchronize '%s'. Try manual sync after update\n", $Domain->GetHostName()); | ||
$db->Execute("UPDATE domains | ||
SET c_registrant=?, c_admin=?, c_tech=?, c_billing=? WHERE id = ?", | ||
array('', '', '', '', $Domain->ID)); | ||
} | ||
} else { | ||
printf("Remove contacts from '%s' (status: %s)\n", "{$row["name"]}.{$row["TLD"]}", $row["status"]); | ||
$db->Execute("UPDATE domains | ||
SET c_registrant=?, c_admin=?, c_tech=?, c_billing=? WHERE id = ?", | ||
array('', '', '', '', $row["id"]) | ||
); | ||
} | ||
} | ||
*/ | ||
|
||
// Finalization | ||
print "Domains created in OTE registry remains in the database:\n"; | ||
$rows = $db->GetAll("SELECT name FROM domains WHERE TLD = ?", array("nl*")); | ||
foreach ((array)$rows as $row) { | ||
printf("\t%s\n", "{$row["name"]}.nl"); | ||
} | ||
$db->Execute("DELETE FROM tlds WHERE TLD = ?", array("nl*")); | ||
$db->Execute("UPDATE domains SET TLD = ? WHERE TLD = ?", array("nl", "nl*")); | ||
|
||
print "Done\n"; | ||
|
||
} catch (Exception $e) { | ||
$db->Execute("UPDATE tlds SET modulename = ? WHERE TLD = ?", array("DotNL", "nl")); | ||
$db->Execute("UPDATE tlds SET isactive = ? WHERE modulename = ?", array(1, "EPPNL")); | ||
_die("caught: {$e->getMessage()}"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
if (!file_exists(CONFIG::$PATH."/etc/.dbconfigs_encoded")) | ||
{ | ||
$fields = $db->GetAll("SELECT * FROM modules_config"); | ||
foreach($fields as $f) | ||
{ | ||
$db->Execute("UPDATE modules_config SET value=? WHERE id=?", array($Crypto->Encrypt($f["value"], LICENSE_FLAGS::REGISTERED_TO), $f["id"])); | ||
} | ||
|
||
$fields = $db->GetAll("SELECT * FROM pmodules_config"); | ||
foreach($fields as $f) | ||
{ | ||
$db->Execute("UPDATE pmodules_config SET value=? WHERE id=?", array($Crypto->Encrypt($f["value"], LICENSE_FLAGS::REGISTERED_TO), $f["id"])); | ||
} | ||
|
||
file_put_contents(CONFIG::$PATH."/etc/.dbconfigs_encoded", "1"); | ||
} | ||
?> |
Oops, something went wrong.