Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
flucout committed Jun 1, 2024
1 parent c1681a9 commit 0ca1c9d
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 26 deletions.
44 changes: 31 additions & 13 deletions app/command/CleanViteJs.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ private function handlefile($filepath){

if(strpos($file, 'window.location.protocol.indexOf("https")>=0')!==false){ //index
$file = str_replace('(window.location.protocol.indexOf("https")>=0)', '1', $file);
$file = preg_replace('!setTimeout\(\(\(\)=>\w+\(\)\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(function\(\)\{return \w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(\(\)=>\{\w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!setTimeout\(\(function\(\)\{\w+\(\)\}\),3e3\)!', '', $file);
$file = preg_replace('!recommendShow:\w+,!', 'recommendShow:!1,', $file);
$code = $this->getExtendCode($file, '"需求反馈"', 2);
if($code){
Expand All @@ -124,16 +124,20 @@ private function handlefile($filepath){
$end = strpos($file, $code)+strlen($code);
$code = substr($file, $start, $end - $start + 1);
$file = str_replace($code, '', $file);
$file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file);
$file = preg_replace('!computed\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!computed\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = str_replace('startNegotiate(),', '', $file);
$flag = true;
}

if(strpos($file, '"calc"') !== false && strpos($file, '"checkConfirm"') !== false){ //main2
$file = preg_replace('!,isCalc:\w+,isInput:\w+,isCheck:\w+,!', ',isCalc:!1,isInput:!1,isCheck:!1,', $file);
$file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(\(\)=>"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"check"===\w+\.type\|\|"checkConfirm"===\w+\.type\}\)\)!', '!1', $file);
$flag = true;
}

if(strpos($file, '请冷静几秒钟,确认以下要删除的数据')!==false && strpos($file, '"计算结果:"')!==false){ //site
$code = $this->getExtendCode($file, '"计算结果:"', 2, '[', ']');
Expand All @@ -148,21 +152,21 @@ private function handlefile($filepath){
$flag = true;
}

if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup
/*if(strpos($file, '"bt-waf-gray"')!==false){ //site.popup
$code = $this->getExtendCode($file, '"bt-waf-gray"', 2);
$code = $this->getExtendCode($file, $code, 1, '[', ']');
$code = $this->getExtendFunction($file, $code);
$file = str_replace($code, '""', $file);
$flag = true;
}
}*/

if(strpos($file, '"商用SSL证书"')!==false){ //site-ssl
$code = $this->getExtendFunction($file, '"商用SSL证书"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendFunction($file, '"测试证书"', '{', '}');
$file = str_replace($code, '', $file);
$file = preg_replace('!\w+\.value="currentCertInfo":\w+\.value="busSslList"!', 'i.value="currentCertInfo":i.value="currentCertInfo"', $file);
$file = preg_replace('!\{\w+\.value="busSslList",\w+\(\)\}!', '{i.value="letsEncryptList"}', $file);
$file = str_replace('"currentCertInfo":"busSslList"', '"currentCertInfo":"currentCertInfo"', $file);
$file = preg_replace('!\{(\w+)\.value="busSslList",\w+\(\)\}!', '{$1.value="letsEncryptList"}', $file);
$flag = true;
}

Expand All @@ -172,6 +176,20 @@ private function handlefile($filepath){
$file = str_replace($code, '', $file);
$flag = true;
}

if(strpos($file, '"recom-view"')!==false){ //soft
$code = getExtendFunction($file, '"recom-view"');
$file = str_replace($code, 'void(0)', $file);
$flag = true;
}

if(strpos($file, '"打开插件文件目录"')!==false){ //soft.table
$code = getExtendFunction($file, '"(续费)"');
$file = str_replace($code, '""', $file);
$code = getExtendFunction($file, '"(续费)"');
$file = str_replace($code, '""', $file);
$flag = true;
}

for($i=0;$i<5;$i++){
$code = $this->getExtendCode($file, 'content:"需求反馈"', 2);
Expand Down
4 changes: 2 additions & 2 deletions app/controller/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ class Index extends BaseController
{
public function index()
{
return 'Server is ok';
return '';
}

public function download()
{
if(config_get('download_page') == '0' && !request()->islogin){
return redirect('/admin/login');
return 'need login';
}
View::assign('siteurl', request()->root(true));
return view();
Expand Down
6 changes: 3 additions & 3 deletions app/script/convert.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

Linux_Version="8.1.0"
Windows_Version="7.9.0"
Btm_Version="2.2.9"
Linux_Version="8.2.0"
Windows_Version="8.0.0"
Btm_Version="2.3.0"

FILES=(
public/install/src/panel6.zip
Expand Down
2 changes: 1 addition & 1 deletion app/view/admin/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">宝塔第三方云端管理中心</a>
<a class="navbar-brand" href="./">Cloud</a>
</div><!-- /.navbar-header -->
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
Expand Down
4 changes: 2 additions & 2 deletions public/install/install_6.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ Add_lib_Install(){
Get_Versions
if [ "${os_type}" == "el" ] && [ "${os_version}" == "7" ];then
cd /www/server/panel/class
btpython -c "import panelPlugin; plugin = panelPlugin.panelPlugin(); plugin.check_install_lib('1')"
echo "True" > /tmp/panelTask.pl
#btpython -c "import panelPlugin; plugin = panelPlugin.panelPlugin(); plugin.check_install_lib('1')"
#echo "True" > /tmp/panelTask.pl
fi
}
Get_Pack_Manager(){
Expand Down
Binary file not shown.
Binary file modified public/install/src/panel6.zip
Binary file not shown.
Binary file not shown.
28 changes: 23 additions & 5 deletions public/install/update6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ download_Url=$NODE_URL
setup_path=/www
version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version)
if [ "$version" = '' ];then
version='8.0.5'
version='8.2.0'
fi
armCheck=$(uname -m|grep arm)
if [ "${armCheck}" ];then
Expand Down Expand Up @@ -79,13 +79,18 @@ rm -f /www/server/panel/*.pyc
rm -f /www/server/panel/class/*.pyc
#pip install flask_sqlalchemy
#pip install itsdangerous==0.24
btpip install natsort
pip_list=$($mypip list)

pip_list=$($mypip list 2>&1)
request_v=$(btpip list 2>/dev/null|grep "requests "|awk '{print $2}'|cut -d '.' -f 2)
if [ "$request_v" = "" ] || [ "${request_v}" -gt "28" ];then
$mypip install requests==2.27.1
fi

NATSORT_C=$(echo $pip_list|grep natsort)
if [ -z "${NATSORT_C}" ];then
btpip install natsort
fi

openssl_v=$(echo "$pip_list"|grep pyOpenSSL)
if [ "$openssl_v" = "" ];then
$mypip install pyOpenSSL
Expand Down Expand Up @@ -129,8 +134,16 @@ if [ "${PYMYSQL_SSL_CHECK}" ];then
fi

btpip uninstall enum34 -y
btpip install geoip2==4.7.0
btpip install pandas

GEOIP_C=$(echo $pip_list|grep geoip2)
if [ -z "${GEOIP_C}" ];then
btpip install geoip2==4.7.0
fi

PANDAS_C=$(echo $pip_list|grep pandas)
if [ -z "${PANDAS_C}" ];then
btpip install pandas
fi

pymysql=$(echo "$pip_list"|grep pycryptodome)
if [ "$pymysql" = "" ];then
Expand All @@ -140,6 +153,11 @@ fi
echo "修复面板依赖完成!"
echo "==========================================="

RE_UPDATE=$(cat /www/server/panel/data/db/update)
if [ "$RE_UPDATE" -ge "4" ];then
echo "2" > /www/server/panel/data/db/update
fi

#psutil=$(echo "$pip_list"|grep psutil|awk '{print $2}'|grep '5.7.')
#if [ "$psutil" = "" ];then
# $mypip install -U psutil
Expand Down
Binary file not shown.

0 comments on commit 0ca1c9d

Please sign in to comment.