From ce2d060c94a7a279ef88ddcaeb73f892b9ac8595 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 9 Oct 2023 11:40:44 +0800 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b6fb23f356..e6db47a0af 100644 --- a/.gitignore +++ b/.gitignore @@ -158,6 +158,7 @@ data/unauthorized_status.pl plugins/vip_* plugins/own_* plugins/my_* +plugins/op_auth plugins/l2tp plugins/openlitespeed plugins/tamper_proof From 5532dcd968c59f77bb96c22753954804788b4e72 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 9 Oct 2023 18:43:48 +0800 Subject: [PATCH 2/3] Update index.py --- plugins/openresty/index.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/openresty/index.py b/plugins/openresty/index.py index fd9a4ee157..ab5de6c729 100755 --- a/plugins/openresty/index.py +++ b/plugins/openresty/index.py @@ -86,6 +86,11 @@ def getOs(): data = {} data['os'] = mw.getOs() ng_exe_bin = getServerDir() + "/nginx/sbin/nginx" + + if mw.isAppleSystem(): + data['auth'] = True + return mw.getJson(data) + if checkAuthEq(ng_exe_bin, 'root'): data['auth'] = True else: From 962b0fa9c52af66b2c2431c9113e7d286881fd31 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 9 Oct 2023 20:32:35 +0800 Subject: [PATCH 3/3] =?UTF-8?q?mysql=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/mariadb/index.py | 4 ++-- plugins/mysql-apt/index.py | 3 ++- plugins/mysql-yum/index.py | 4 ++-- plugins/mysql/index.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/mariadb/index.py b/plugins/mariadb/index.py index 55111291a9..dd5988e50b 100755 --- a/plugins/mariadb/index.py +++ b/plugins/mariadb/index.py @@ -402,6 +402,8 @@ def initMariaDbPwd(): pwd + ' -e "drop database test";' mw.execShell(drop_test_db) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) + # 删除冗余账户 hostname = mw.execShell('hostname')[0].strip() if hostname != 'localhost': @@ -412,8 +414,6 @@ def initMariaDbPwd(): drop_root_hostname = serverdir + '/bin/mysql --defaults-file=' + \ myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";' mw.execShell(drop_root_hostname) - - pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) return True diff --git a/plugins/mysql-apt/index.py b/plugins/mysql-apt/index.py index 4fda68d442..fea0209471 100755 --- a/plugins/mysql-apt/index.py +++ b/plugins/mysql-apt/index.py @@ -405,6 +405,8 @@ def initMysql8Pwd(): pwd + ' -e "drop database test";' mw.execShell(drop_test_db) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) + # 删除冗余账户 hostname = mw.execShell('hostname')[0].strip() if hostname != 'localhost': @@ -416,7 +418,6 @@ def initMysql8Pwd(): myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";' mw.execShell(drop_root_hostname) - pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) return True diff --git a/plugins/mysql-yum/index.py b/plugins/mysql-yum/index.py index 717fc4ccc2..8beae76a9d 100755 --- a/plugins/mysql-yum/index.py +++ b/plugins/mysql-yum/index.py @@ -394,6 +394,8 @@ def initMysql8Pwd(): pwd + ' -e "drop database test";' mw.execShell(drop_test_db) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) + # 删除冗余账户 hostname = mw.execShell('hostname')[0].strip() if hostname != 'localhost': @@ -404,8 +406,6 @@ def initMysql8Pwd(): drop_root_hostname = cmd_my + ' --defaults-file=' + \ myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";' mw.execShell(drop_root_hostname) - - pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) return True diff --git a/plugins/mysql/index.py b/plugins/mysql/index.py index ce15f133a6..a1c3da9d6c 100755 --- a/plugins/mysql/index.py +++ b/plugins/mysql/index.py @@ -509,6 +509,8 @@ def initMysql8Pwd(): myconf + ' -uroot -p' + pwd + ' -e "drop database test";' mw.execShell(drop_test_db) + pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) + # 删除冗余账户 hostname = mw.execShell('hostname')[0].strip() if hostname != 'localhost': @@ -520,8 +522,6 @@ def initMysql8Pwd(): myconf + ' -uroot -p' + pwd + ' -e "drop user \'root\'@\'' + hostname + '\'";' mw.execShell(drop_root_hostname) - pSqliteDb('config').where('id=?', (1,)).save('mysql_root', (pwd,)) - return True