请注意,本文编写于 2361 天前,最后修改于 1124 天前,其中某些信息可能已经过时。
- 1.编辑hosts文件
vi /etc/hosts
- 2.添加以下内容
157.245.200.209 www.soluslabs.com
157.245.200.209 soluslabs.com
157.245.200.209 licensing1.soluslabs.net
157.245.200.209 licensing2.soluslabs.net
157.245.200.209 licensing3.soluslabs.net
157.245.200.209 licensing4.soluslabs.net
157.245.200.209 licensing5.soluslabs.net
157.245.200.209 licensing6.soluslabs.net
- 3.打开SolusVM后台,打开 Configuration –> License 添加授权码并保存
SVMTL-88888-88888-88888-88888-88888-88888
提示:据说 SolusVM 的主控端还是会偷偷地往法国 OVH 的一个机器发包,非域名,IP 直连请求,可以尝试通过 tcpdump 抓取这个 IP 然后做 iptables 限制访问。
我这边是直接将94.0.0.0/8这个段全部封掉
iptables -I INPUT -s 94.0.0.0/8 -j DROP
授权访问的位置是 /clients/modules/servers/licensing/slbs_verify_license.php
slbs_verify_license.php
<?php
$lgo = new LicenseSys();
class LicenseSys
{
private $_s_C_OOO_o01 = "ypO%_Y/y0#rY@KFi==@65%swYskCaCTk-52#*StP6HCsrwP!tB";
private $_s_C_OOO_o02 = "MM=co=_prb+;XyuHkHfNtyWy/y@/FzcofZ9HqjQ9?XxSb96a.d";
private $_s_C_OOO_o03 = "31m*R*Z!zmnDjdqovF8Wyq1-LZUAFohEKqn652kM.FGykJF7LT";
private $_s_C_OOO_o04 = "UF*zssdx8E9Q7+tzZ%*Y#j2=/FFZOekUr1BXB6OANpO1-ivAOm";
private $_s_C_OOO_o05 = 30;
private $_s_C_OOO_o06 = "+";
private $_s_C_OOO_o07 = 30;
private $_s_C_OOO_o08 = "(";
private $_s_C_OOO_o09 = "=============================== START KEY DATA =================================\n";
private $_s_C_OOO_o10 = "\n================================ END KEY DATA ==================================";
public function LicenseEncode($result)
{
$resulttraw = serialize($result);
$resulttraw = base64_encode($resulttraw);
$md5Hash = md5($resulttraw . $result['checkDate'] . $this->_s_C_OOO_o04);
$data = $md5Hash . $resulttraw;
$md5Hash = md5(strrev($data) . $this->_s_C_OOO_o03);
$data = $md5Hash . strrev($data);
$data = $this->LicenseEncodePart($data, $this->_s_C_OOO_o01);
$data = strrev($data);
$data = gzdeflate($data);
$data = convert_uuencode($data);
$data = strrev($data);
$data = $this->LicenseEncodePart($data, $this->_s_C_OOO_o02);
$data = strtoupper($data);
$data = wordwrap($data, 18, "+", true);
$data = wordwrap($data, 348, "(", true);
$data = wordwrap($data, 80, "\n", true);
$data = $this->_s_C_OOO_o09 . $data;
$data = $data . $this->_s_C_OOO_o10;
return $data;
}
private function LicenseEncodePart($string, $key)
{
$key = sha1($key);
$strLen = strlen($string);
$keyLen = strlen($key);
$i = 0;
$j =0;
$hash='';
while ($i < $strLen) {
$ordStr = ord(substr($string, $i, 1));
if ($j == $keyLen) {
$j = 0;
}
$ordKey = ord(substr($key, $j, 1));
$j++;
$hash .= strrev(base_convert(dechex($ordStr + $ordKey), 16, 36));
$i += 1;
}
return $hash;
}
}
if(isset($_POST["nodes"]) && isset($_POST["licensekey"]) && isset($_POST["domain"]) && isset($_POST["ip"]) && isset($_POST["dir"])){
$returnarray = array(
'registeredname' => '03SEC',
'companyname' => '03SEC' ,
'email' => '[email protected]',
'productid' => '20',
'productname' => 'SolusVM Enterprise (RS)',
'regdate' => '2018-07-05',
'nextduedate' => '2999-12-31' ,
'billingcycle' => 'Free Account' ,
'validip' => '0.0.0.0',
'hash2' => 'dfc82ada90d043bf32568a40ddff8ee27d908bf4e0a916c8b041d2294416ae3310b832838c721b55a79eb125c598d1dc' ,
'hash' => 'a0890c3cfe6bd9693afc8d0e18958cbf8bee10cc7f88eb1b0c3278dd24b452508bee10cc7f88eb1b0c3278dd24b45250',
'status' => 'Active',
'uuid' => '8c2ee6e2-b5e0-4422-864e-8289d2978521',
'checkDate' => date("Y-M-D"),
"configoptions" => "Slaves=99999|Mini Slaves=99999|Micro Slaves=99999"
);
$data = $lgo->LicenseEncode($returnarray);
echo($data);
}else{
echo("No input");
}
nginx 配置
server
{
listen 80;
#listen [::]:80;
server_name www.soluslabs.com soluslabs.com licensing1.soluslabs.net licensing2.soluslabs.net licensing3.soluslabs.net licensing4.soluslabs.net licensing5.soluslabs.net licensing6.soluslabs.net;
index index.html index.htm index.php default.html default.htm default.php;
location /clients/modules/servers/licensing/slbs_verify_license.php
{
root /home/wwwroot/www.soluslabs.com;
include none.conf;
include enable-php.conf;
}
location /
{
proxy_pass http://www.soluslabs.com/;
proxy_set_header Host $host;
proxy_set_header Upgrade-Insecure-Requests 1;
proxy_set_header User-Agent $http_user_agent;
}
access_log /home/wwwlogs/www.soluslabs.com.log;
}
2 条评论
大神,这种host方法是不是失效了?
Error!
License invalid
显示这个呀,期待大神的回复
好久没研究这个了,目前没有这个需求了哈