存档在 ‘【源码】’ 分类

怎样安装让WHMCS通过EPP连接注册局

2018年8月17日

【介绍】

官网:https://codecanyon.net/item/generic-epp-domain-module-for-whmcs/19255581
作者:info at xpanel dot com
价格:$20

参考:https://www.jianshu.com/p/045f95c008a0
参考:https://www.cnblogs.com/Anker/p/6018032.html

名称:Generic EPP module for WHMCS

本插件通过EPP协议提供连接域名注册局实现域名管理的完整功能。

Extensible Provisioning Protocol (EPP): RFC 5730, 5731, 5732, 5733, 5734, 5910

已兼容:
https://www.rrpproxy.net/ (https://www.rrpproxy.net/API/EPP)
http://www.udr.hk.com/registry
https://sourceforge.net/projects/epp-server/ Open Source EPP Server

【环境】

要求WHMCS在7.1.2或之上版本。

【安装】

上传 ‘genericepp’ 目录到 /modules/registrars/ 。

为日志文件设置写权限 /modules/registrars/genericepp/log/genericepp.log

【证书】

1. 创建密钥文件 domain.key :

cd /etc/pki/tls/private
openssl genrsa -des3 -out domain.key 2048

输出:

Generating RSA private key, 2048 bit long modulus
.....................................................................................................................+++
..........................+++
e is 65537 (0x010001)
Enter pass phrase for domain.key: ← 输入一个新密码 
Verifying – Enter pass phrase for domain.key: ← 重新输入一遍密码

2. 创建根证书的申请文件 domain.csr :

cd /etc/pki/tls/certs/
openssl req -new -key /etc/pki/tls/private/domain.key -out domain.csr

输出:

Enter pass phrase for root.key: ← 输入前面创建的密码 
You are about to be asked to enter information that will be incorporated 
into your certificate request. 
What you are about to enter is what is called a Distinguished Name or a DN. 
There are quite a few fields but you can leave some blank 
For some fields there will be a default value, 
If you enter ‘.’, the field will be left blank. 
—– 
Country Name (2 letter code) [AU]:CN ← 国家代号,中国输入CN 
State or Province Name (full name) [Some-State]:BeiJing ← 省的全名,拼音 
Locality Name (eg, city) []:BeiJing ← 市的全名,拼音 
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MyCompany Corp. ← 公司英文名 
Organizational Unit Name (eg, section) []: ← 可以不输入 
Common Name (eg, YOUR name) []: ← 此时不输入 
Email Address []:admin@mycompany.com ← 电子邮箱,可随意填

Please enter the following ‘extra’ attributes 
to be sent with your certificate request 
A challenge password []: ← 可以不输入 
An optional company name []: ← 可以不输入

3. 创建一个自当前日期起为期十年的根证书 domain.crt :

cd /etc/pki/tls/certs
openssl x509 -req -days 3650 -sha256 -extfile /etc/ssl/openssl.cnf -extensions v3_ca -signkey /etc/pki/tls/private/domain.key -in /etc/pki/tls/certs/domain.csr -out domain.crt

输出:

Signature ok 
subject=/C=CN/ST=BeiJing/L=BeiJing/O=MyCompany Corp./emailAddress=admin@mycompany.com
Getting Private key 
Enter pass phrase for domain.key: ← 输入前面创建的密码

4. 创建 .pfx 文件:

cd /etc/pki/tls/certs
openssl pkcs12 -export -out certificate.pfx -inkey /etc/pki/tls/private/domain.key -in /etc/pki/tls/certs/domain.crt -certfile /etc/pki/tls/certs/ca-bundle.crt

输出:

Enter pass phrase for domain.key:
Enter Export Password:
Verifying - Enter Export Password:

5A. 创建 .pem 文件(使用 PassPhrase):

cd /etc/pki/tls/certs
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes

输出:

Enter Import Password:
MAC verified OK

5B. 创建 .pem 文件(不使用 PassPhrase):

cd /etc/pki/tls/certs
openssl pkcs12 -in certificate.pfx -out certificate.cer

上传证书:

cp /etc/pki/tls/certs/certificate.cer <whmcs_root>/modules/registrars/genericepp/local_cert/certificate.cer
cp /etc/pki/tls/private/domain.key <whmcs_root>/modules/registrars/genericepp/local_pk/domain.key
cp /etc/pki/tls/certs/domain.crt <whmcs_root>/modules/registrars/genericepp/cafile/domain.crt

【使用LE签发证书】

尚未实证。

dnf install git net-tools
git clone https://github.com/certbot/certbot.git && cd certbot/
./letsencrypt-auto --help
systemctl stop httpd
./letsencrypt-auto certonly --standalone

【测试】

如果需要测试连接注册局服务器,先确认客户端的700端口是否开放。

telnet epp-ote.nic.xy 700
openssl s_client -showcerts -connect epp-ote.nic.xy:700

客户端CA:

openssl s_client -showcerts -connect epp-ote.nic.xy:700 -CAfile gd_bundle.crt

测试证书:

openssl s_client -showcerts -connect epp-ote.nic.xy:700 -CAfile CA_bundle.crt -cert yourdomain.com.crt -key yourdomain.com.key

添加域名后缀相应WHOIS服务器:

编辑:/resources/domains/dist.whois.json

   {
        "extensions": ".com.xy,.org.xy",
        "uri": "socket://whois.com.xy",
        "available": "No match for"
    }

在WHMCS中配置:

1. 登录 WHMCS 管理面板。
2. Setup > Products/Service > Domain registrars 激活 Generic EPP 模块。
3. 使用登录资料配置模块

使用模块:

1. 登录 WHMCS 管理面板。
2. Setup > Products/Service > Domain pricing 添加 “.yourtld” TLD后缀,选择 “Genericepp” 模块。
3. 为不同注册年限设置定价。

怎样连接WHMCS和CoCCA

2018年8月12日

【介绍】

文档:https://webcache.googleusercontent.com/search?q=cache:XggdzzRafe4J:https://wiki.cocca.org.nz/mediawiki/index.php/CoCCA_and_EPP_Clients+&cd=2&hl=en&ct=clnk&gl=us

【源码】

源码:whmcs-registrars-coza

源码:https://github.com/noer/whmcs-registrars-cocca .CO.ZA

whmcs-registrars-coza is a domain registrar module connecting the CO.ZA zone with WHMCS. It uses EPP for communicating with the Registry via the php-epp2 library.

It is written in modern PHP and tries to fix some shortcommings of the existing registrar modules.

Released under the GPLv3 License, feel free to contribute (fork, create meaningful branchname, issue pull request with thus branchname)!

源码:WHMCS Plugin for CoCCA EPP and NiRA .NG EPP

源码:https://github.com/ihannu/ngepp

WHMCS Plugin for CoCCA EPP and NiRA .NG EPP, works for .co.ke and other CoCCA Registries.

Features Added to existing CoCCA EPP WHMCS Plugin:

1. Enable/Disable Registrar Lock
2. Get EPP Code for your .NG and .KE Domains in WHMCS

Instructions: Copy the functions given in NGepp.php and replace it in your COCCAepp.php file downloaded from: https://wiki.cocca.org.nz/mediawiki/index.php/CoCCA_EPP_module_for_WHMCS

【任务】

任务:http://whmcs2.rssing.com/chan-6631133/all_p64.html

任务:https://www.peopleperhour.com/freelance-jobs/web-development/php/build-epp-client-for-domain-name-managment-1696290

源码:随机背景图 Node.js实现

2018年8月7日

参考:http://amon.org/randombg 实证未遂。缺少文件。
参考:http://amon.org/rotatebg ‎实证成功。

【介绍】

官网:https://picsum.photos/
源码:https://github.com/DMarby/picsum-photos
图库:https://picsum.photos/images

讨论:https://www.v2ex.com/t/168131

【部署】

参考:http://amon.org/nodejs

先安装必要的包:

npm link async
npm link sharp
npm link moment

临时创建源码中缺少的文件夹和文件:

/opt/unsplash-it/images.json
/opt/photos/metadata.json

执行命令:

node index.js

【用法】

Put your image size (width & height) after our URL and you’ll get a placeholder.

https://picsum.photos/200/300

To get a square image, just put the size you want.

https://picsum.photos/200

Random image

https://picsum.photos/200/300/?random

Grayscale

Use the /g/ path to greyscale the image.

https://picsum.photos/g/200/300

List images

https://picsum.photos/list

Specific Image

Get a specific image by appending ?image to the end of the url.

https://picsum.photos/200/300?image=0

Blurred image

Get a blurred image by appending ?blur to the end of the url.

https://picsum.photos/200/300/?blur

Crop Gravity

Select the cropping gravity by adding ?gravity to the end of the url.

Valid options are: north, east, south, west, center

https://picsum.photos/200/300/?gravity=east

怎样安装epp-drs

2018年7月30日

【介绍】

EPP-DRS(EPP域名注册系统)是一个强大的域名销售好管理系统。它可以运行域名注册服务的完整周期,比如注册、续费和转移。

系统WEB界面由以下三部分组成:
1. 域名订单向导
2. 注册人控制面板
3. 注册商控制面板

系统通过模块与不同的注册局和SRS通信,可以支持多达150个域名后缀。

文档良好的SDK允许开发者方便地构建和测试模块。

协议:EPP protocol (for EPP-based registry modules)RFCs 4930-4934

模板:Smarty

【安装】

下载:https://github.com/DicsyDel/epp-drs

手册; http://epp-drs.com/docs/
安装:http://epp-drs.com/docs/wiki/doku.php/wiki:epp-drs-installation-and-configuration-guide
接口:http://epp-drs.com/docs/wiki/doku.php/wiki:epp-drs.registry.modules.api

案例:https://www.norid.no/en/registrar/system/epp/ 挪威国别后缀.NO
下载:https://www.norid.no/uploads/2018/03/EppClient-0.97.tar.gz

wget https://github.com/DicsyDel/epp-drs/archive/master.zip && unzip master.zip && mv epp-drs-master portal && cd portal

参考:http://sourceforge.net/projects/aepps/ mod_epp

接口:https://www.sidn.nl/a/nl-domain-name/becoming-a-registrar?language_id=2&langcheck=true .NL注册商要求
接口:https://register.ly/domains/ly-domains/ .LY注册商要求

接口:https://github.com/registrobr/whmcs-registrobr-epp .BR整合WHMCS

需求列表:https://www.freelancer.co.za/job-search/sidn-epp-php/

需求:https://www.freelancer.uy/projects/php-website-design/epp-drs-new-templates-design/
需求:https://www.freelancer.uy/projects/php-software-architecture/epp-drs-whms-api/

php-epp-client Object-oriented PHP EPP Client to connect to ccTLD server

to register and manage ccTLD

the project will supports the following:

————————————

– Full EPP 57xx RFC standard
– Extensible PHP objects to add registry-specific additions
– Public/private key client certificates for connecting to EPP server
– Connection to EPP via HTTP/SSL – COCCA SERVER

Code/script will provide us with a fully functional EPP client to connect to any registry world-wide that supports EPP/COCCA.

——–

– check one domain name
– check multiple domain names and check how fast the registry is
– register a domain name
– change EPP password
– get information on a domain name
– update a domain name with new info
– create a contact object
– update contact details, ns, host
– DNSSEC sign a domain name
– list registry poll messages and confirm a message
-check if the domain is free
– register domain name

a list of methods that the library should support. Basically, most common operations for a hosting company like us:

– Retrieving / updating a domain contact information
– Retrieving / updating a domain name server (DNS) list
– Retrieving / updating a domain transfer lock
– Retrieving a domain expiration date
– Retrieving a domain security code
– Register a domain
– Renew a domain
– Transfer a domain
– Retrieve registered domain list in my account
– Retrieve expired / expiring domain list

Require a multi-layer/white label ICANN registrar automation system, like as orderbox ([login to view URL]) or Freenom ([login to view URL]).

The system will contain follwoing:

1. Customer and reseller front-end
2. Backend management including billing system
3. registrar whois server (port 43 application with socket protocol connection)
4. dns server
5. API server

Details are given below:

=> Customer Front-end
1. Product (domain) view, search, order.

=>Reseller Front-end
1. Reseller Pricing/Feature view and signup

=> Customer Back-end
1. Product (purchased) management
2. Billing (own) management
3. DNS management (for registered domains)
4. Payment Gateway (for add fund)

=>Reseller/sub-reseller Back-end
1. Manage order and billing
2. Customer/Reseller/sub-reseller management
3. Payment Gateway (for add fund)
4. Product/Pricing management
5. DNS Management
6. Brand and API management

=> Admin Panel Back-end
1. Everything of Reseller/Sub-reseller back-end
2. EPP Management (Registry API/SDK integration)
3. Other API Management (Such as SMS, email, other product, whois privacy etc)
4. Security Systems (Backup/Restore, Data migration, 2 factor authentication etc)
5. Emergency registrar integration
6. RDE Data export ([login to view URL]) system via admin panel.
7. Integration with API server (for remote product management) and whois server.

案例:https://github.com/diogotozzi/Epp
介绍:EPP protocol in PHP for interaction with Registro.br

案例:https://github.com/domainr/epp
介绍:EPP (Extensible Provisioning Protocol) client for Go. Extracted from and in production use at Domainr.com
作者:nb.io, LLC.

案例:https://github.com/AfriCC/php-epp2
介绍:A High Level EPP TCP/SSL Client for PHP

案例:https://github.com/centralnic/php-epp
介绍:EPP Support for PHP

案例:https://github.com/metaregistrar/php-epp-client
介绍:This code will provide you with a fully functional EPP client to connect to any registry world-wide that supports EPP. All code is organized in objects, so connecting to a new registry is just a matter of object re-use and extension. Sample registry connections are provided in the Registries directory.

Currently supported registries:

SIDN (.nl)
dotAmsterdam
Donuts
EurID (.eu)
DNS Belgium (.be .vlaanderen .brussels)
.CO.NL
dotFRL
IIS (.nu and .se)
CarDNS (.hr)
Metaregistrar
Nic.AT (.at)
Key Systems RRPPROXY
.PT
Switch (.ch)
Openprovider
Ficora (.fi)
DNS.PT (.pt)
Norid (.no)
Arnes (.si)

WordPress后台无法登录

2018年6月5日

参考:http://www.xuejianzhan.com/2685.html

WordPress后台无法登录,提示:

错误:Cookies被阻止或者您的浏览器不支持。要使用WordPress,您必须启用cookies。

解决方案:这是配置文件wp-config.php中的代码前后出现空格导致的错误。删除最前面