From ed34994f452a87f72aada6192c680ea5e0478699 Mon Sep 17 00:00:00 2001 From: zhw <627622230@qq.com> Date: Mon, 29 Apr 2024 15:35:04 +0800 Subject: [PATCH] update to 6.8.37 --- BT-Panel | 51 +- BTPanel/__init__.py | 1601 +- BTPanel/static/amd/config.js | 1171 + BTPanel/static/amd/configMixin.js | 101 + BTPanel/static/amd/main.js | 68 + BTPanel/static/amd/noticeConfig.js | 372 + BTPanel/static/amd/panelConfig.js | 564 + BTPanel/static/amd/public.js | 0 BTPanel/static/amd/require.min.js | 5 + BTPanel/static/amd/safeConfig.js | 992 + BTPanel/static/amd/utils.min.js | 3227 +++ .../bootstrap-3.3.5/css/bootstrap.min.css | 2 +- .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 17848 bytes BTPanel/static/css/files_style.css | 209 +- BTPanel/static/css/site.css | 7259 ++++-- .../static/images/firewall/intrusion/1.png | Bin 0 -> 66396 bytes .../static/images/firewall/intrusion/2.png | Bin 0 -> 25326 bytes .../static/images/firewall/intrusion/3.png | Bin 0 -> 23124 bytes .../static/images/firewall/intrusion/4.png | Bin 0 -> 51658 bytes BTPanel/static/images/firewall/logAudit/1.png | Bin 0 -> 87282 bytes BTPanel/static/images/firewall/ssh/1.png | Bin 0 -> 81599 bytes BTPanel/static/images/firewall/system/1.png | Bin 0 -> 61670 bytes BTPanel/static/images/firewall/system/2.png | Bin 0 -> 33937 bytes BTPanel/static/images/firewall/system/3.png | Bin 0 -> 50814 bytes BTPanel/static/images/loading-2.gif | Bin 0 -> 1787 bytes BTPanel/static/images/pro.svg | 27 + BTPanel/static/images/pro_pay.svg | 27 + BTPanel/static/images/recommend/disk.png | Bin 0 -> 27660 bytes BTPanel/static/img/config_alert.png | Bin 0 -> 24202 bytes BTPanel/static/img/feedback.svg | 7 + BTPanel/static/img/feedback/QA_banner.png | Bin 0 -> 5279 bytes BTPanel/static/img/feedback/QA_close.png | Bin 0 -> 246 bytes BTPanel/static/img/feedback/QA_emoj.png | Bin 0 -> 13376 bytes BTPanel/static/img/feedback/QA_like.png | Bin 0 -> 789 bytes BTPanel/static/img/feedback/QA_logo.png | Bin 0 -> 10235 bytes BTPanel/static/img/feedback/demand.svg | 1 + BTPanel/static/img/feedback_2.svg | 7 + BTPanel/static/img/ftp/ftp-logs.png | Bin 0 -> 19056 bytes BTPanel/static/img/hint-confirm-icon.svg | 1 + BTPanel/static/img/ico/icon-text-hint.svg | 7 + BTPanel/static/img/icon-ssl-service.png | Bin 0 -> 304 bytes BTPanel/static/img/logAudit/logAudit.png | Bin 0 -> 30851 bytes BTPanel/static/img/nginx_firewall/1.png | Bin 0 -> 119273 bytes BTPanel/static/img/nginx_firewall/2.png | Bin 0 -> 99028 bytes BTPanel/static/img/nginx_firewall/3.png | Bin 0 -> 84181 bytes BTPanel/static/img/nginx_firewall/4.png | Bin 0 -> 62933 bytes BTPanel/static/img/nginx_firewall/5.png | Bin 0 -> 85537 bytes BTPanel/static/img/nginx_firewall/6.png | Bin 0 -> 90006 bytes BTPanel/static/img/nginx_firewall/7.png | Bin 0 -> 64813 bytes .../static/img/scrollbar/scroll-bar-block.png | Bin 0 -> 662 bytes .../static/img/scrollbar/scroll-bar-down.png | Bin 0 -> 224 bytes .../static/img/scrollbar/scroll-bar-up.png | Bin 0 -> 215 bytes BTPanel/static/img/soft_ico/ico-anti_spam.png | Bin 0 -> 1009 bytes BTPanel/static/img/soft_ico/ico-apache.png | Bin 1790 -> 1417 bytes BTPanel/static/img/soft_ico/ico-app.png | Bin 1917 -> 2149 bytes BTPanel/static/img/soft_ico/ico-aws_s3.png | Bin 0 -> 3120 bytes BTPanel/static/img/soft_ico/ico-backup.png | Bin 1761 -> 2743 bytes BTPanel/static/img/soft_ico/ico-boot.png | Bin 0 -> 1280 bytes BTPanel/static/img/soft_ico/ico-bt_boce.png | Bin 0 -> 3134 bytes BTPanel/static/img/soft_ico/ico-bt_hids.png | Bin 0 -> 698 bytes .../static/img/soft_ico/ico-bt_security.png | Bin 0 -> 417 bytes .../static/img/soft_ico/ico-bt_ssh_auth.png | Bin 0 -> 1459 bytes BTPanel/static/img/soft_ico/ico-bt_vsftpd.png | Bin 0 -> 1060 bytes BTPanel/static/img/soft_ico/ico-btapibot.png | Bin 0 -> 902 bytes BTPanel/static/img/soft_ico/ico-btapp.png | Bin 0 -> 1472 bytes BTPanel/static/img/soft_ico/ico-btwaf.png | Bin 2004 -> 2501 bytes .../static/img/soft_ico/ico-btwaf_httpd.png | Bin 2004 -> 2445 bytes .../static/img/soft_ico/ico-cf_ipchange.png | Bin 0 -> 557 bytes BTPanel/static/img/soft_ico/ico-clear.png | Bin 1896 -> 3157 bytes .../static/img/soft_ico/ico-cloud_db_diff.png | Bin 0 -> 3313 bytes .../static/img/soft_ico/ico-cloudflare.png | Bin 0 -> 971 bytes .../static/img/soft_ico/ico-coll_admin.png | Bin 0 -> 1102 bytes BTPanel/static/img/soft_ico/ico-cosfs.png | Bin 0 -> 2985 bytes .../img/soft_ico/ico-database_mater.png | Bin 0 -> 2662 bytes BTPanel/static/img/soft_ico/ico-dbcache.png | Bin 0 -> 1510 bytes .../static/img/soft_ico/ico-deployment.png | Bin 1947 -> 553 bytes .../static/img/soft_ico/ico-disk_analysis.png | Bin 0 -> 2386 bytes BTPanel/static/img/soft_ico/ico-diskquota.png | Bin 0 -> 2254 bytes .../static/img/soft_ico/ico-dns_manager.png | Bin 0 -> 1505 bytes BTPanel/static/img/soft_ico/ico-dnspod.png | Bin 0 -> 3728 bytes BTPanel/static/img/soft_ico/ico-docker.png | Bin 2294 -> 1987 bytes BTPanel/static/img/soft_ico/ico-ehost.png | Bin 0 -> 1055 bytes .../img/soft_ico/ico-enterprise_backup.png | Bin 0 -> 1844 bytes BTPanel/static/img/soft_ico/ico-fail2ban.png | Bin 0 -> 4213 bytes .../img/soft_ico/ico-file_hash_check.png | Bin 0 -> 881 bytes .../img/soft_ico/ico-file_real_time_log.png | Bin 0 -> 658 bytes BTPanel/static/img/soft_ico/ico-firewall.png | Bin 0 -> 930 bytes BTPanel/static/img/soft_ico/ico-free_waf.png | Bin 0 -> 2501 bytes BTPanel/static/img/soft_ico/ico-freefrpc.png | Bin 0 -> 313 bytes BTPanel/static/img/soft_ico/ico-frps.png | Bin 0 -> 313 bytes BTPanel/static/img/soft_ico/ico-ftp.png | Bin 1646 -> 1531 bytes .../img/soft_ico/ico-gcloud_storage.png | Bin 0 -> 3141 bytes BTPanel/static/img/soft_ico/ico-gdrive.png | Bin 0 -> 2946 bytes .../static/img/soft_ico/ico-hm_shell_san.png | Bin 0 -> 2479 bytes BTPanel/static/img/soft_ico/ico-hxsquota.png | Bin 0 -> 2971 bytes .../img/soft_ico/ico-ip_configuration.png | Bin 0 -> 1709 bytes .../static/img/soft_ico/ico-java_manager.png | Bin 0 -> 2974 bytes .../static/img/soft_ico/ico-jumpserver.png | Bin 0 -> 2474 bytes .../static/img/soft_ico/ico-linksforbt.png | Bin 0 -> 2088 bytes BTPanel/static/img/soft_ico/ico-linuxsys.png | Bin 1887 -> 1623 bytes .../static/img/soft_ico/ico-load_balance.png | Bin 0 -> 1137 bytes .../static/img/soft_ico/ico-load_leveling.png | Bin 1137 -> 621 bytes BTPanel/static/img/soft_ico/ico-mail_sys.png | Bin 0 -> 1144 bytes .../static/img/soft_ico/ico-masterslave.png | Bin 2061 -> 1075 bytes BTPanel/static/img/soft_ico/ico-memcached.png | Bin 1678 -> 1705 bytes BTPanel/static/img/soft_ico/ico-modbtywaf.png | Bin 0 -> 2501 bytes BTPanel/static/img/soft_ico/ico-mongodb.png | Bin 2067 -> 1464 bytes BTPanel/static/img/soft_ico/ico-msg_push.png | Bin 1384 -> 1819 bytes .../static/img/soft_ico/ico-msonedrive.png | Bin 0 -> 1336 bytes .../static/img/soft_ico/ico-my_toolbox.png | Bin 0 -> 2380 bytes BTPanel/static/img/soft_ico/ico-mysql.png | Bin 1453 -> 1545 bytes .../img/soft_ico/ico-mysql_replicate.png | Bin 0 -> 1095 bytes BTPanel/static/img/soft_ico/ico-nfs_tools.png | Bin 0 -> 932 bytes BTPanel/static/img/soft_ico/ico-nginx.png | Bin 1749 -> 1618 bytes .../static/img/soft_ico/ico-node_admin.png | Bin 0 -> 2069 bytes BTPanel/static/img/soft_ico/ico-nodejs.png | Bin 0 -> 1017 bytes BTPanel/static/img/soft_ico/ico-oneav.png | Bin 0 -> 1848 bytes BTPanel/static/img/soft_ico/ico-oos.png | Bin 0 -> 1678 bytes .../static/img/soft_ico/ico-openlitespeed.png | Bin 3200 -> 3885 bytes BTPanel/static/img/soft_ico/ico-ossfs.png | Bin 3801 -> 646 bytes .../static/img/soft_ico/ico-pgsql_manager.png | Bin 3294 -> 2701 bytes BTPanel/static/img/soft_ico/ico-php.png | Bin 1537 -> 1635 bytes .../static/img/soft_ico/ico-php_encoder.png | Bin 0 -> 1193 bytes .../static/img/soft_ico/ico-php_filter.png | Bin 0 -> 2668 bytes .../static/img/soft_ico/ico-phpencoder.png | Bin 0 -> 1193 bytes BTPanel/static/img/soft_ico/ico-phpguard.png | Bin 2241 -> 2256 bytes .../static/img/soft_ico/ico-phpmyadmin.png | Bin 2691 -> 2786 bytes BTPanel/static/img/soft_ico/ico-phpok.png | Bin 0 -> 2069 bytes BTPanel/static/img/soft_ico/ico-pm2.png | Bin 2259 -> 1017 bytes BTPanel/static/img/soft_ico/ico-psync_api.png | Bin 0 -> 705 bytes BTPanel/static/img/soft_ico/ico-pureftpd.png | Bin 1210 -> 1227 bytes .../static/img/soft_ico/ico-pythonmamager.png | Bin 1660 -> 1612 bytes BTPanel/static/img/soft_ico/ico-redis.png | Bin 2877 -> 2852 bytes .../img/soft_ico/ico-resource_manager.png | Bin 0 -> 2091 bytes BTPanel/static/img/soft_ico/ico-rsync.png | Bin 1133 -> 996 bytes BTPanel/static/img/soft_ico/ico-safelogin.png | Bin 0 -> 715 bytes .../static/img/soft_ico/ico-san_security.png | Bin 0 -> 3611 bytes BTPanel/static/img/soft_ico/ico-score.png | Bin 2017 -> 2072 bytes .../static/img/soft_ico/ico-sdetection.svg | 10 + .../img/soft_ico/ico-security_notice.png | Bin 0 -> 1511 bytes .../img/soft_ico/ico-site_optimization.png | Bin 0 -> 2976 bytes .../static/img/soft_ico/ico-site_speed.png | Bin 0 -> 1353 bytes .../static/img/soft_ico/ico-ssh_manager.png | Bin 0 -> 771 bytes BTPanel/static/img/soft_ico/ico-sshkey.png | Bin 2912 -> 3131 bytes .../static/img/soft_ico/ico-ssl_verify.png | Bin 0 -> 886 bytes .../static/img/soft_ico/ico-static_cdn.png | Bin 0 -> 1788 bytes .../static/img/soft_ico/ico-supervisor.png | Bin 0 -> 2808 bytes BTPanel/static/img/soft_ico/ico-syssafe.png | Bin 1721 -> 1007 bytes .../static/img/soft_ico/ico-system_scan.png | Bin 0 -> 3611 bytes .../static/img/soft_ico/ico-tamper_core.png | Bin 0 -> 556 bytes .../static/img/soft_ico/ico-tamper_drive.png | Bin 0 -> 556 bytes .../static/img/soft_ico/ico-tamper_proof.png | Bin 1245 -> 556 bytes .../static/img/soft_ico/ico-task_manager.png | Bin 1031 -> 455 bytes BTPanel/static/img/soft_ico/ico-tomcat.png | Bin 2436 -> 2508 bytes BTPanel/static/img/soft_ico/ico-tomcat2.png | Bin 2733 -> 2974 bytes BTPanel/static/img/soft_ico/ico-txcdn.png | Bin 0 -> 2899 bytes BTPanel/static/img/soft_ico/ico-upyun.png | Bin 2126 -> 2137 bytes BTPanel/static/img/soft_ico/ico-users.png | Bin 0 -> 3429 bytes .../static/img/soft_ico/ico-w7assistant.png | Bin 0 -> 1173 bytes BTPanel/static/img/soft_ico/ico-webhook.png | Bin 2018 -> 805 bytes .../img/soft_ico/ico-webshell_check.png | Bin 0 -> 3611 bytes BTPanel/static/img/soft_ico/ico-webssh.png | Bin 1459 -> 659 bytes BTPanel/static/img/soft_ico/ico-word.svg | 12 + .../static/img/soft_ico/ico-y6w_speedtest.png | Bin 0 -> 2644 bytes .../soft_ico/soft_icoico-docker_project_m.png | Bin 0 -> 2324 bytes .../img/soft_ico/soft_icoico-vuln_push.png | Bin 0 -> 4085 bytes BTPanel/static/img/ssh/login-logs.png | Bin 0 -> 21678 bytes BTPanel/static/img/update-icon.png | Bin 0 -> 12587 bytes BTPanel/static/img/update_1.png | Bin 0 -> 46578 bytes BTPanel/static/img/update_back.png | Bin 0 -> 17636 bytes BTPanel/static/img/update_bg.png | Bin 0 -> 64351 bytes BTPanel/static/js/bootstrap-select.min.js | 1 - BTPanel/static/js/control.js | 2323 +- BTPanel/static/js/countryCode.json | 1346 ++ BTPanel/static/js/crontab.js | 2872 +-- BTPanel/static/js/database.js | 4453 +++- BTPanel/static/js/docker.js | 3452 +++ BTPanel/static/js/files.js | 18 +- BTPanel/static/js/firewall.js | 3365 +++ BTPanel/static/js/index.js | 4631 +++- BTPanel/static/js/jquery-2.2.4.min.js | 4 + BTPanel/static/js/jsencrypt.min.js | 5454 +++++ BTPanel/static/js/logs.js | 1102 + BTPanel/static/js/md5.js | 1 - BTPanel/static/js/public.js | 10620 ++++---- BTPanel/static/js/public_backup.js | 16277 +++++++------ BTPanel/static/js/qrcode.min.js | 1 + BTPanel/static/js/site.js | 20050 ++++++++++------ BTPanel/static/js/soft.js | 91 +- BTPanel/static/js/tools.js | 5605 +++-- BTPanel/static/js/upload-drog.js | 907 + BTPanel/static/jsonTree/jsonTree.css | 107 + BTPanel/static/jsonTree/jsonTree.js | 819 + BTPanel/static/language/English/lan.js | 640 +- BTPanel/static/language/English/public.json | 4 +- BTPanel/static/language/English/template.json | 146 +- BTPanel/static/language/en/LC_MESSAGES/en.mo | Bin 0 -> 154785 bytes BTPanel/static/language/en/LC_MESSAGES/en.po | 5095 ++++ BTPanel/templates/default/autherr.html | 166 +- BTPanel/templates/default/config.html | 1225 +- BTPanel/templates/default/control.html | 622 +- BTPanel/templates/default/crontab.html | 311 +- BTPanel/templates/default/database.html | 297 +- BTPanel/templates/default/docker.html | 427 + BTPanel/templates/default/error2.html | 145 +- BTPanel/templates/default/files.html | 2 +- BTPanel/templates/default/firewall.html | 1562 +- BTPanel/templates/default/ftp.html | 21 +- BTPanel/templates/default/index.html | 11 +- BTPanel/templates/default/layout.html | 492 + BTPanel/templates/default/login.html | 23 +- BTPanel/templates/default/logs.html | 902 + .../templates/default/modify_password.html | 117 + BTPanel/templates/default/movie.html | 5 + BTPanel/templates/default/site.html | 4 + BTPanel/templates/default/soft.html | 16 +- class/PluginLoader.aarch64.Python3.7.so | Bin 0 -> 421816 bytes class/PluginLoader.i686.Python3.7.so | Bin 0 -> 437004 bytes class/PluginLoader.loongarch64.Python3.7.so | Bin 0 -> 628880 bytes class/PluginLoader.x86_64.Python3.7.so | Bin 0 -> 344408 bytes .../PluginLoader.x86_64.glibc214.Python3.7.so | Bin 0 -> 479316 bytes class/acme_v2.py | 736 +- class/ajax.py | 535 +- class/cachelib/__init__.py | 2 + class/cachelib/session_simpile.py | 196 + class/cachelib/simple.py | 38 +- class/common.py | 66 +- class/config.py | 1337 +- class/crontab.py | 101 +- class/data.py | 340 +- class/database.py | 1249 +- class/databaseModel/__init__.py | 0 class/databaseModel/base.py | 461 + class/databaseModel/mongodbModel.py | 777 + class/databaseModel/pgsqlModel.py | 668 + class/databaseModel/redisModel.py | 425 + class/databaseModel/sqliteModel.py | 22 + class/databaseModel/sqlserverModel.py | 495 + class/datatool.py | 1 + class/db.py | 101 +- class/db_mysql.py | 71 +- class/file_execute_deny.py | 9 +- class/files.py | 548 +- class/filesModel/base.py | 104 + class/filesModel/downModel.py | 46 + class/filesModel/gzModel.py | 342 + class/filesModel/logsModel.py | 289 + class/filesModel/rarModel.py | 243 + class/filesModel/searchModel.py | 307 + class/filesModel/sizeModel.py | 287 + class/filesModel/uploadModel.py | 170 + class/filesModel/zipModel.py | 327 + class/firewall_new.py | 2 +- class/firewalls.py | 63 +- class/flask_compress.py | 21 +- class/ftp.py | 23 +- class/ftplog.py | 539 + class/http_requests.py | 137 +- class/jobs.py | 451 +- class/log_analysis.py | 260 + class/logsModel/base.py | 141 + class/logsModel/ftpModel.py | 469 + class/logsModel/panelModel.py | 321 + class/logsModel/siteModel.py | 110 + class/monitorModel/base.py | 14 + class/monitorModel/process_managementModel.py | 556 + class/msg/dingding.html | 143 + class/msg/dingding_msg.py | 224 + class/msg/feishu.html | 142 + class/msg/feishu_msg.py | 214 + class/msg/mail.html | 253 + class/msg/mail_msg.py | 229 + class/msg/sms.html | 104 + class/msg/sms_msg.py | 217 + class/msg/tg.html | 149 + class/msg/tg_msg.py | 282 + class/msg/weixin.html | 75 + class/msg/weixin_msg.py | 268 + class/msg/wx_account.html | 258 + class/msg/wx_account_msg.py | 281 + class/one_key_wp.py | 1463 ++ class/panelAes.py | 61 +- class/panelApi.py | 3 + class/panelAuth.py | 157 +- class/panelBackup.py | 1043 +- class/panelController.py | 99 + class/panelDatabaseController.py | 103 + class/panelDefense.py | 87 + class/panelDnsapi.py | 5 +- class/panelHttpProxy.py | 277 + class/panelMessage.py | 169 +- class/panelModel/backupModel.py | 83 + class/panelModel/base.py | 21 + class/panelMssql.py | 107 + class/panelPHP.py | 4 +- class/panelPlugin.py | 332 +- class/panelProjectController.py | 49 +- class/panelPush.py | 703 + class/panelRedirect.py | 410 +- class/panelSSL.py | 1498 +- class/panelSafeController.py | 93 + class/panelSearch.py | 117 +- class/panelSite.py | 636 +- class/panelTask.py | 96 +- class/panelVideo.py | 2 +- class/panelWarning.py | 1536 +- class/panel_search.py | 260 + class/panel_telegram_bot.py | 14 +- class/plugin_deployment.py | 6 +- class/process_task.py | 719 + class/projectModel/bt_docker/__init__.py | 0 class/projectModel/bt_docker/dk_compose.py | 337 + class/projectModel/bt_docker/dk_container.py | 473 + class/projectModel/bt_docker/dk_host.py | 42 + class/projectModel/bt_docker/dk_image.py | 226 + class/projectModel/bt_docker/dk_monitor.py | 92 + class/projectModel/bt_docker/dk_network.py | 69 + class/projectModel/bt_docker/dk_public.py | 135 + class/projectModel/bt_docker/dk_registry.py | 81 + class/projectModel/bt_docker/dk_screen.py | 67 + class/projectModel/bt_docker/dk_setup.py | 155 + class/projectModel/bt_docker/dk_status.py | 160 + class/projectModel/bt_docker/dk_volume.py | 73 + class/projectModel/dockerModel.py | 58 + class/projectModel/nodejsModel.py | 22 +- class/projectModel/quotaModel.py | 304 + class/public.py | 2262 +- class/push/base_push.py | 59 + class/push/panel_push.html | 402 + class/push/panel_push.py | 358 + class/push/push_list.json | 11 + class/push/scripts/panel_login.json | 11 + class/push/scripts/panel_pwd_endtime.json | 9 + class/push/scripts/site_endtime.json | 10 + class/push/scripts/ssl.json | 10 + class/push/site_push.py | 842 + class/push/tamper_push.py | 312 + class/safeModel/base.py | 92 + class/safeModel/firewallModel.py | 3861 +++ class/safeModel/freeipModel.py | 97 + class/safeModel/ipsModel.py | 118 + class/safeModel/sshModel.py | 187 + class/safeModel/syslogModel.py | 939 + class/safe_warning.py | 0 class/safe_warning/sw_alias_ls_rm.py | 42 + class/safe_warning/sw_audit_docker.py | 34 + class/safe_warning/sw_audit_log_keep.py | 31 + class/safe_warning/sw_bashrc.py | 46 + class/safe_warning/sw_chmod_stickybit.py | 36 + class/safe_warning/sw_cshrc.py | 47 + class/safe_warning/sw_cve_2019_5736.py | 45 + class/safe_warning/sw_cve_2021_4034.py | 92 + class/safe_warning/sw_cve_2022_2068.py | 55 + class/safe_warning/sw_cve_2023_0386.py | 100 + class/safe_warning/sw_database_backup.py | 13 +- class/safe_warning/sw_database_priv.py | 10 +- class/safe_warning/sw_debug_mode.py | 2 +- class/safe_warning/sw_docker_api.py | 60 + class/safe_warning/sw_file_lock.py | 44 + class/safe_warning/sw_file_mod.py | 66 + class/safe_warning/sw_files_recycle_bin.py | 2 +- class/safe_warning/sw_firewall_open.py | 23 +- class/safe_warning/sw_ftp_login.py | 30 + class/safe_warning/sw_ftp_pass.py | 96 +- class/safe_warning/sw_ftp_root.py | 33 + class/safe_warning/sw_httpd_version_leak.py | 39 + class/safe_warning/sw_kernel_space.py | 40 + class/safe_warning/sw_login_fail_limit.py | 37 + class/safe_warning/sw_memcached_port.py | 2 +- class/safe_warning/sw_mongodb_auth.py | 33 + class/safe_warning/sw_mysql_pass.py | 46 + class/safe_warning/sw_mysql_port.py | 2 +- class/safe_warning/sw_mysql_priv.py | 2 +- class/safe_warning/sw_nginx_server.py | 45 + class/safe_warning/sw_panel_control.py | 40 + class/safe_warning/sw_panel_pass.py | 2 +- class/safe_warning/sw_panel_path.py | 2 +- class/safe_warning/sw_panel_port.py | 4 +- class/safe_warning/sw_panel_swing.py | 42 + class/safe_warning/sw_passwd_repeat.py | 36 + .../safe_warning/sw_php_disable_functions.py | 67 + class/safe_warning/sw_php_expose.py | 62 + class/safe_warning/sw_ping.py | 2 +- class/safe_warning/sw_pingin.py | 47 + class/safe_warning/sw_pip_poison.py | 29 + class/safe_warning/sw_redis_pass.py | 48 + class/safe_warning/sw_redis_port.py | 5 +- class/safe_warning/sw_risk_file.py | 40 + class/safe_warning/sw_site_spath.py | 2 +- class/safe_warning/sw_site_ssl.py | 1 + class/safe_warning/sw_site_ssl_expire.py | 2 +- class/safe_warning/sw_ssh_clientalive.py | 63 + class/safe_warning/sw_ssh_forward.py | 30 + class/safe_warning/sw_ssh_maxauth.py | 64 + class/safe_warning/sw_ssh_minclass.py | 44 + class/safe_warning/sw_ssh_notpass.py | 49 + class/safe_warning/sw_ssh_passmax.py | 46 + class/safe_warning/sw_ssh_passmin.py | 45 + class/safe_warning/sw_ssh_port.py | 31 +- class/safe_warning/sw_ssh_root.py | 46 + class/safe_warning/sw_ssh_security.py | 46 + class/safe_warning/sw_strace_backdoor.py | 32 + class/safe_warning/sw_system_user.py | 36 + class/safe_warning/sw_telnet_server.py | 24 + class/safe_warning/sw_umask.py | 45 + class/safe_warning/sw_waf_install.py | 67 + class/send_to_user.py | 3 + class/setPanelLets.py | 13 +- class/sewer/aa.py | 3 - class/simple_websocket/__init__.py | 1 + class/simple_websocket/ws.py | 448 + class/site_dir_auth.py | 6 +- class/sites.py | 2 +- class/ssh_authentication.py | 2 +- class/ssh_security.py | 602 +- class/ssh_terminal.py | 94 +- class/ssl_manage.py | 642 + class/system.py | 104 +- class/test.py | 518 - class/tools.py | 2 +- class/userlogin.py | 247 +- config/abort.json | 1 + config/{dns_api.json => dns_api_init.json} | 0 config/domain_root.txt | 2102 ++ config/index.json | 2 +- config/menu.json | 7 + data/404.html | 79 +- data/502.html | 74 + data/default.db | Bin 17408 -> 17408 bytes data/defaultDoc.html | 68 +- data/firewall/country.txt | 946 + data/firewall/ips.txt | 1 + data/firewall/whitelist.txt | 1 + data/libList.conf | 2 +- data/list.json | 665 +- data/msg.json | 44 + data/node.json | 12 + data/pay_type.json | 204 + data/softList.conf | 2 +- data/type.json | 2 +- init.sh | 6 +- install/install_soft.sh | 40 +- install/public.sh | 88 +- logs/access.log | 0 logs/done.log | 0 logs/error.log | 0 logs/task.log | 0 rewrite/apache/ShopWind.conf | 19 + rewrite/apache/pbootcms.conf | 9 + rewrite/nginx/EduSoho.conf | 8 + rewrite/nginx/ShopWind.conf | 14 + rewrite/nginx/crmeb.conf | 6 + rewrite/nginx/pbootcms.conf | 6 + script/backup.py | 50 +- script/bt-ipfilter | Bin 0 -> 22648 bytes script/check_msg.py | 35 + script/ftplogs_cut.py | 25 + script/mysql_quota.py | 9 + script/polkit_upgrade.py | 114 + script/process_network_total.py | 46 +- script/push_msg.py | 19 + script/scan_log.py | 26 + script/upgrade_flask.sh | 15 + script/upgrade_gevent.sh | 20 + script/upgrade_telegram.sh | 18 + script/warning_list.py | 8 + ssl/certificate.pem | 29 + ssl/privateKey.pem | 51 + ssl_init/baota_root.pfx | Bin 0 -> 6813 bytes ssl_init/certificate.pem | 30 + ssl_init/privateKey.pem | 51 + ssl_init/root_password.pl | 1 + task.py | 661 +- tools.py | 102 +- 474 files changed, 125711 insertions(+), 34665 deletions(-) mode change 100644 => 100755 BTPanel/__init__.py create mode 100644 BTPanel/static/amd/config.js create mode 100644 BTPanel/static/amd/configMixin.js create mode 100644 BTPanel/static/amd/main.js create mode 100644 BTPanel/static/amd/noticeConfig.js create mode 100644 BTPanel/static/amd/panelConfig.js create mode 100644 BTPanel/static/amd/public.js create mode 100644 BTPanel/static/amd/require.min.js create mode 100644 BTPanel/static/amd/safeConfig.js create mode 100644 BTPanel/static/amd/utils.min.js create mode 100644 BTPanel/static/images/firewall/intrusion/1.png create mode 100644 BTPanel/static/images/firewall/intrusion/2.png create mode 100644 BTPanel/static/images/firewall/intrusion/3.png create mode 100644 BTPanel/static/images/firewall/intrusion/4.png create mode 100644 BTPanel/static/images/firewall/logAudit/1.png create mode 100644 BTPanel/static/images/firewall/ssh/1.png create mode 100644 BTPanel/static/images/firewall/system/1.png create mode 100644 BTPanel/static/images/firewall/system/2.png create mode 100644 BTPanel/static/images/firewall/system/3.png create mode 100644 BTPanel/static/images/loading-2.gif create mode 100644 BTPanel/static/images/pro.svg create mode 100644 BTPanel/static/images/pro_pay.svg create mode 100644 BTPanel/static/images/recommend/disk.png create mode 100644 BTPanel/static/img/config_alert.png create mode 100644 BTPanel/static/img/feedback.svg create mode 100644 BTPanel/static/img/feedback/QA_banner.png create mode 100644 BTPanel/static/img/feedback/QA_close.png create mode 100644 BTPanel/static/img/feedback/QA_emoj.png create mode 100644 BTPanel/static/img/feedback/QA_like.png create mode 100644 BTPanel/static/img/feedback/QA_logo.png create mode 100644 BTPanel/static/img/feedback/demand.svg create mode 100644 BTPanel/static/img/feedback_2.svg create mode 100644 BTPanel/static/img/ftp/ftp-logs.png create mode 100644 BTPanel/static/img/hint-confirm-icon.svg create mode 100644 BTPanel/static/img/ico/icon-text-hint.svg create mode 100644 BTPanel/static/img/icon-ssl-service.png create mode 100644 BTPanel/static/img/logAudit/logAudit.png create mode 100644 BTPanel/static/img/nginx_firewall/1.png create mode 100644 BTPanel/static/img/nginx_firewall/2.png create mode 100644 BTPanel/static/img/nginx_firewall/3.png create mode 100644 BTPanel/static/img/nginx_firewall/4.png create mode 100644 BTPanel/static/img/nginx_firewall/5.png create mode 100644 BTPanel/static/img/nginx_firewall/6.png create mode 100644 BTPanel/static/img/nginx_firewall/7.png create mode 100644 BTPanel/static/img/scrollbar/scroll-bar-block.png create mode 100644 BTPanel/static/img/scrollbar/scroll-bar-down.png create mode 100644 BTPanel/static/img/scrollbar/scroll-bar-up.png create mode 100644 BTPanel/static/img/soft_ico/ico-anti_spam.png create mode 100644 BTPanel/static/img/soft_ico/ico-aws_s3.png create mode 100644 BTPanel/static/img/soft_ico/ico-boot.png create mode 100644 BTPanel/static/img/soft_ico/ico-bt_boce.png create mode 100644 BTPanel/static/img/soft_ico/ico-bt_hids.png create mode 100644 BTPanel/static/img/soft_ico/ico-bt_security.png create mode 100644 BTPanel/static/img/soft_ico/ico-bt_ssh_auth.png create mode 100644 BTPanel/static/img/soft_ico/ico-bt_vsftpd.png create mode 100644 BTPanel/static/img/soft_ico/ico-btapibot.png create mode 100644 BTPanel/static/img/soft_ico/ico-btapp.png create mode 100644 BTPanel/static/img/soft_ico/ico-cf_ipchange.png create mode 100644 BTPanel/static/img/soft_ico/ico-cloud_db_diff.png create mode 100644 BTPanel/static/img/soft_ico/ico-cloudflare.png create mode 100644 BTPanel/static/img/soft_ico/ico-coll_admin.png create mode 100644 BTPanel/static/img/soft_ico/ico-cosfs.png create mode 100644 BTPanel/static/img/soft_ico/ico-database_mater.png create mode 100644 BTPanel/static/img/soft_ico/ico-dbcache.png create mode 100644 BTPanel/static/img/soft_ico/ico-disk_analysis.png create mode 100644 BTPanel/static/img/soft_ico/ico-diskquota.png create mode 100644 BTPanel/static/img/soft_ico/ico-dns_manager.png create mode 100644 BTPanel/static/img/soft_ico/ico-dnspod.png create mode 100644 BTPanel/static/img/soft_ico/ico-ehost.png create mode 100644 BTPanel/static/img/soft_ico/ico-enterprise_backup.png create mode 100644 BTPanel/static/img/soft_ico/ico-fail2ban.png create mode 100644 BTPanel/static/img/soft_ico/ico-file_hash_check.png create mode 100644 BTPanel/static/img/soft_ico/ico-file_real_time_log.png create mode 100644 BTPanel/static/img/soft_ico/ico-firewall.png create mode 100644 BTPanel/static/img/soft_ico/ico-free_waf.png create mode 100644 BTPanel/static/img/soft_ico/ico-freefrpc.png create mode 100644 BTPanel/static/img/soft_ico/ico-frps.png create mode 100644 BTPanel/static/img/soft_ico/ico-gcloud_storage.png create mode 100644 BTPanel/static/img/soft_ico/ico-gdrive.png create mode 100644 BTPanel/static/img/soft_ico/ico-hm_shell_san.png create mode 100644 BTPanel/static/img/soft_ico/ico-hxsquota.png create mode 100644 BTPanel/static/img/soft_ico/ico-ip_configuration.png create mode 100644 BTPanel/static/img/soft_ico/ico-java_manager.png create mode 100644 BTPanel/static/img/soft_ico/ico-jumpserver.png create mode 100644 BTPanel/static/img/soft_ico/ico-linksforbt.png create mode 100644 BTPanel/static/img/soft_ico/ico-load_balance.png create mode 100644 BTPanel/static/img/soft_ico/ico-mail_sys.png create mode 100644 BTPanel/static/img/soft_ico/ico-modbtywaf.png create mode 100644 BTPanel/static/img/soft_ico/ico-msonedrive.png create mode 100644 BTPanel/static/img/soft_ico/ico-my_toolbox.png create mode 100644 BTPanel/static/img/soft_ico/ico-mysql_replicate.png create mode 100644 BTPanel/static/img/soft_ico/ico-nfs_tools.png create mode 100644 BTPanel/static/img/soft_ico/ico-node_admin.png create mode 100644 BTPanel/static/img/soft_ico/ico-nodejs.png create mode 100644 BTPanel/static/img/soft_ico/ico-oneav.png create mode 100644 BTPanel/static/img/soft_ico/ico-oos.png create mode 100644 BTPanel/static/img/soft_ico/ico-php_encoder.png create mode 100644 BTPanel/static/img/soft_ico/ico-php_filter.png create mode 100644 BTPanel/static/img/soft_ico/ico-phpencoder.png create mode 100644 BTPanel/static/img/soft_ico/ico-phpok.png create mode 100644 BTPanel/static/img/soft_ico/ico-psync_api.png create mode 100644 BTPanel/static/img/soft_ico/ico-resource_manager.png create mode 100644 BTPanel/static/img/soft_ico/ico-safelogin.png create mode 100644 BTPanel/static/img/soft_ico/ico-san_security.png create mode 100644 BTPanel/static/img/soft_ico/ico-sdetection.svg create mode 100644 BTPanel/static/img/soft_ico/ico-security_notice.png create mode 100644 BTPanel/static/img/soft_ico/ico-site_optimization.png create mode 100644 BTPanel/static/img/soft_ico/ico-site_speed.png create mode 100644 BTPanel/static/img/soft_ico/ico-ssh_manager.png create mode 100644 BTPanel/static/img/soft_ico/ico-ssl_verify.png create mode 100644 BTPanel/static/img/soft_ico/ico-static_cdn.png create mode 100644 BTPanel/static/img/soft_ico/ico-supervisor.png create mode 100644 BTPanel/static/img/soft_ico/ico-system_scan.png create mode 100644 BTPanel/static/img/soft_ico/ico-tamper_core.png create mode 100644 BTPanel/static/img/soft_ico/ico-tamper_drive.png create mode 100644 BTPanel/static/img/soft_ico/ico-txcdn.png create mode 100644 BTPanel/static/img/soft_ico/ico-users.png create mode 100644 BTPanel/static/img/soft_ico/ico-w7assistant.png create mode 100644 BTPanel/static/img/soft_ico/ico-webshell_check.png create mode 100644 BTPanel/static/img/soft_ico/ico-word.svg create mode 100644 BTPanel/static/img/soft_ico/ico-y6w_speedtest.png create mode 100644 BTPanel/static/img/soft_ico/soft_icoico-docker_project_m.png create mode 100644 BTPanel/static/img/soft_ico/soft_icoico-vuln_push.png create mode 100644 BTPanel/static/img/ssh/login-logs.png create mode 100644 BTPanel/static/img/update-icon.png create mode 100644 BTPanel/static/img/update_1.png create mode 100644 BTPanel/static/img/update_back.png create mode 100644 BTPanel/static/img/update_bg.png create mode 100644 BTPanel/static/js/countryCode.json create mode 100644 BTPanel/static/js/docker.js create mode 100644 BTPanel/static/js/firewall.js create mode 100644 BTPanel/static/js/jquery-2.2.4.min.js create mode 100644 BTPanel/static/js/jsencrypt.min.js create mode 100644 BTPanel/static/js/logs.js create mode 100644 BTPanel/static/js/qrcode.min.js create mode 100644 BTPanel/static/js/upload-drog.js create mode 100644 BTPanel/static/jsonTree/jsonTree.css create mode 100644 BTPanel/static/jsonTree/jsonTree.js create mode 100644 BTPanel/static/language/en/LC_MESSAGES/en.mo create mode 100644 BTPanel/static/language/en/LC_MESSAGES/en.po create mode 100644 BTPanel/templates/default/docker.html create mode 100644 BTPanel/templates/default/logs.html create mode 100644 BTPanel/templates/default/modify_password.html create mode 100644 BTPanel/templates/default/movie.html create mode 100755 class/PluginLoader.aarch64.Python3.7.so create mode 100755 class/PluginLoader.i686.Python3.7.so create mode 100755 class/PluginLoader.loongarch64.Python3.7.so create mode 100755 class/PluginLoader.x86_64.Python3.7.so create mode 100755 class/PluginLoader.x86_64.glibc214.Python3.7.so mode change 100644 => 100755 class/acme_v2.py mode change 100644 => 100755 class/ajax.py create mode 100644 class/cachelib/session_simpile.py mode change 100644 => 100755 class/common.py mode change 100644 => 100755 class/config.py create mode 100644 class/databaseModel/__init__.py create mode 100644 class/databaseModel/base.py create mode 100644 class/databaseModel/mongodbModel.py create mode 100644 class/databaseModel/pgsqlModel.py create mode 100644 class/databaseModel/redisModel.py create mode 100644 class/databaseModel/sqliteModel.py create mode 100644 class/databaseModel/sqlserverModel.py create mode 100644 class/filesModel/base.py create mode 100644 class/filesModel/downModel.py create mode 100644 class/filesModel/gzModel.py create mode 100644 class/filesModel/logsModel.py create mode 100644 class/filesModel/rarModel.py create mode 100644 class/filesModel/searchModel.py create mode 100644 class/filesModel/sizeModel.py create mode 100644 class/filesModel/uploadModel.py create mode 100644 class/filesModel/zipModel.py create mode 100644 class/ftplog.py mode change 100644 => 100755 class/jobs.py create mode 100644 class/log_analysis.py create mode 100644 class/logsModel/base.py create mode 100644 class/logsModel/ftpModel.py create mode 100644 class/logsModel/panelModel.py create mode 100644 class/logsModel/siteModel.py create mode 100644 class/monitorModel/base.py create mode 100644 class/monitorModel/process_managementModel.py create mode 100644 class/msg/dingding.html create mode 100644 class/msg/dingding_msg.py create mode 100644 class/msg/feishu.html create mode 100644 class/msg/feishu_msg.py create mode 100644 class/msg/mail.html create mode 100644 class/msg/mail_msg.py create mode 100644 class/msg/sms.html create mode 100644 class/msg/sms_msg.py create mode 100644 class/msg/tg.html create mode 100644 class/msg/tg_msg.py create mode 100644 class/msg/weixin.html create mode 100644 class/msg/weixin_msg.py create mode 100644 class/msg/wx_account.html create mode 100644 class/msg/wx_account_msg.py create mode 100644 class/one_key_wp.py create mode 100755 class/panelController.py create mode 100644 class/panelDatabaseController.py create mode 100644 class/panelDefense.py create mode 100644 class/panelHttpProxy.py create mode 100644 class/panelModel/backupModel.py create mode 100644 class/panelModel/base.py create mode 100644 class/panelMssql.py create mode 100644 class/panelPush.py create mode 100644 class/panelSafeController.py create mode 100644 class/panel_search.py create mode 100644 class/process_task.py create mode 100644 class/projectModel/bt_docker/__init__.py create mode 100644 class/projectModel/bt_docker/dk_compose.py create mode 100644 class/projectModel/bt_docker/dk_container.py create mode 100644 class/projectModel/bt_docker/dk_host.py create mode 100644 class/projectModel/bt_docker/dk_image.py create mode 100644 class/projectModel/bt_docker/dk_monitor.py create mode 100644 class/projectModel/bt_docker/dk_network.py create mode 100644 class/projectModel/bt_docker/dk_public.py create mode 100644 class/projectModel/bt_docker/dk_registry.py create mode 100644 class/projectModel/bt_docker/dk_screen.py create mode 100644 class/projectModel/bt_docker/dk_setup.py create mode 100644 class/projectModel/bt_docker/dk_status.py create mode 100644 class/projectModel/bt_docker/dk_volume.py create mode 100644 class/projectModel/dockerModel.py create mode 100644 class/projectModel/quotaModel.py mode change 100644 => 100755 class/public.py create mode 100644 class/push/base_push.py create mode 100644 class/push/panel_push.html create mode 100644 class/push/panel_push.py create mode 100644 class/push/push_list.json create mode 100644 class/push/scripts/panel_login.json create mode 100644 class/push/scripts/panel_pwd_endtime.json create mode 100644 class/push/scripts/site_endtime.json create mode 100644 class/push/scripts/ssl.json create mode 100644 class/push/site_push.py create mode 100644 class/push/tamper_push.py create mode 100644 class/safeModel/base.py create mode 100644 class/safeModel/firewallModel.py create mode 100644 class/safeModel/freeipModel.py create mode 100644 class/safeModel/ipsModel.py create mode 100644 class/safeModel/sshModel.py create mode 100644 class/safeModel/syslogModel.py create mode 100644 class/safe_warning.py create mode 100644 class/safe_warning/sw_alias_ls_rm.py create mode 100644 class/safe_warning/sw_audit_docker.py create mode 100644 class/safe_warning/sw_audit_log_keep.py create mode 100644 class/safe_warning/sw_bashrc.py create mode 100644 class/safe_warning/sw_chmod_stickybit.py create mode 100644 class/safe_warning/sw_cshrc.py create mode 100644 class/safe_warning/sw_cve_2019_5736.py create mode 100644 class/safe_warning/sw_cve_2021_4034.py create mode 100644 class/safe_warning/sw_cve_2022_2068.py create mode 100644 class/safe_warning/sw_cve_2023_0386.py create mode 100644 class/safe_warning/sw_docker_api.py create mode 100644 class/safe_warning/sw_file_lock.py create mode 100644 class/safe_warning/sw_file_mod.py create mode 100644 class/safe_warning/sw_ftp_login.py create mode 100644 class/safe_warning/sw_ftp_root.py create mode 100644 class/safe_warning/sw_httpd_version_leak.py create mode 100644 class/safe_warning/sw_kernel_space.py create mode 100644 class/safe_warning/sw_login_fail_limit.py create mode 100644 class/safe_warning/sw_mongodb_auth.py create mode 100644 class/safe_warning/sw_mysql_pass.py create mode 100644 class/safe_warning/sw_nginx_server.py create mode 100644 class/safe_warning/sw_panel_control.py create mode 100644 class/safe_warning/sw_panel_swing.py create mode 100644 class/safe_warning/sw_passwd_repeat.py create mode 100644 class/safe_warning/sw_php_disable_functions.py create mode 100644 class/safe_warning/sw_php_expose.py create mode 100644 class/safe_warning/sw_pingin.py create mode 100644 class/safe_warning/sw_pip_poison.py create mode 100644 class/safe_warning/sw_redis_pass.py create mode 100644 class/safe_warning/sw_risk_file.py create mode 100644 class/safe_warning/sw_ssh_clientalive.py create mode 100644 class/safe_warning/sw_ssh_forward.py create mode 100644 class/safe_warning/sw_ssh_maxauth.py create mode 100644 class/safe_warning/sw_ssh_minclass.py create mode 100644 class/safe_warning/sw_ssh_notpass.py create mode 100644 class/safe_warning/sw_ssh_passmax.py create mode 100644 class/safe_warning/sw_ssh_passmin.py create mode 100644 class/safe_warning/sw_ssh_root.py create mode 100644 class/safe_warning/sw_ssh_security.py create mode 100644 class/safe_warning/sw_strace_backdoor.py create mode 100644 class/safe_warning/sw_system_user.py create mode 100644 class/safe_warning/sw_telnet_server.py create mode 100644 class/safe_warning/sw_umask.py create mode 100644 class/safe_warning/sw_waf_install.py delete mode 100644 class/sewer/aa.py create mode 100644 class/simple_websocket/__init__.py create mode 100644 class/simple_websocket/ws.py create mode 100644 class/ssl_manage.py delete mode 100644 class/test.py mode change 100644 => 100755 class/userlogin.py create mode 100644 config/abort.json rename config/{dns_api.json => dns_api_init.json} (100%) create mode 100644 config/domain_root.txt create mode 100644 data/502.html create mode 100644 data/firewall/country.txt create mode 100644 data/firewall/ips.txt create mode 100644 data/firewall/whitelist.txt create mode 100644 data/msg.json create mode 100644 data/pay_type.json create mode 100644 logs/access.log create mode 100644 logs/done.log create mode 100644 logs/error.log create mode 100644 logs/task.log create mode 100644 rewrite/apache/ShopWind.conf create mode 100644 rewrite/apache/pbootcms.conf create mode 100644 rewrite/nginx/EduSoho.conf create mode 100644 rewrite/nginx/ShopWind.conf create mode 100644 rewrite/nginx/crmeb.conf create mode 100644 rewrite/nginx/pbootcms.conf create mode 100644 script/bt-ipfilter create mode 100644 script/check_msg.py create mode 100644 script/ftplogs_cut.py create mode 100644 script/mysql_quota.py create mode 100644 script/polkit_upgrade.py create mode 100644 script/push_msg.py create mode 100644 script/scan_log.py create mode 100644 script/upgrade_flask.sh create mode 100644 script/upgrade_gevent.sh create mode 100644 script/upgrade_telegram.sh create mode 100644 script/warning_list.py create mode 100644 ssl/certificate.pem create mode 100644 ssl/privateKey.pem create mode 100644 ssl_init/baota_root.pfx create mode 100644 ssl_init/certificate.pem create mode 100644 ssl_init/privateKey.pem create mode 100644 ssl_init/root_password.pl diff --git a/BT-Panel b/BT-Panel index 3659648f..2188b694 100644 --- a/BT-Panel +++ b/BT-Panel @@ -1,7 +1,7 @@ #!/www/server/panel/pyenv/bin/python #coding: utf-8 # +------------------------------------------------------------------- -# | 宝塔Linux面板 +# | 宝塔Linux面板 # +------------------------------------------------------------------- # | Copyright (c) 2015-2099 宝塔软件(http://bt.cn) All rights reserved. # +------------------------------------------------------------------- @@ -18,6 +18,14 @@ upgrade_file = 'script/upgrade_flask.sh' if os.path.exists(upgrade_file): os.system("nohup bash {} &>/dev/null &".format(upgrade_file)) +upgrade_file = 'script/upgrade_gevent.sh' +if os.path.exists(upgrade_file): + os.system("nohup bash {} &>/dev/null &".format(upgrade_file)) + +upgrade_file = 'script/upgrade_telegram.sh' +if os.path.exists(upgrade_file): + os.system("nohup bash {} &>/dev/null &".format(upgrade_file)) + if os.path.exists('class/flask'): os.system('rm -rf class/flask') @@ -28,23 +36,23 @@ from BTPanel import app,sys,public is_debug = os.path.exists('data/debug.pl') -# # 检查加载器 -# def check_plugin_loader(): -# plugin_loader_file = 'class/PluginLoader.so' -# machine = 'x86_64' -# try: -# machine = os.uname().machine -# except: -# pass -# plugin_loader_src_file = "class/PluginLoader.{}.Python3.7.so".format(machine) -# if machine == 'x86_64': -# glibc_version = public.get_glibc_version() -# if glibc_version in ['2.14','2.13','2.12','2.11','2.10']: -# plugin_loader_src_file = "class/PluginLoader.{}.glibc214.Python3.7.so".format(machine) -# if os.path.exists(plugin_loader_src_file): -# os.system("\cp -f {} {}".format(plugin_loader_src_file, plugin_loader_file)) +# 检查加载器 +def check_plugin_loader(): + plugin_loader_file = 'class/PluginLoader.so' + machine = 'x86_64' + try: + machine = os.uname().machine + except: + pass + plugin_loader_src_file = "class/PluginLoader.{}.Python3.7.so".format(machine) + if machine == 'x86_64': + glibc_version = public.get_glibc_version() + if glibc_version in ['2.14','2.13','2.12','2.11','2.10']: + plugin_loader_src_file = "class/PluginLoader.{}.glibc214.Python3.7.so".format(machine) + if os.path.exists(plugin_loader_src_file): + os.system("\cp -f {} {}".format(plugin_loader_src_file, plugin_loader_file)) -# check_plugin_loader() +check_plugin_loader() if is_debug: @@ -103,8 +111,7 @@ if is_debug: def process_IN_MOVED_TO(self,event): if not self.is_ext(event.pathname): return - self.panel_reload(event.pathname,'[覆盖]') - + self.panel_reload(event.pathname,'[Cover]') def debug_event(): logger.debug('Launch the panel in debug mode') logger.debug('Listening port:0.0.0.0:{}'.format(public.readFile('data/port.pl'))) @@ -248,7 +255,11 @@ if __name__ == '__main__': is_process = os.path.exists('data/is_process.pl') if not is_process: - http_server.serve_forever() + try: + http_server.serve_forever() + except: + pass + app.run(host=HOST, port=PORT, threaded=True) else: http_server.start() from multiprocessing import Process diff --git a/BTPanel/__init__.py b/BTPanel/__init__.py old mode 100644 new mode 100755 index 3c8e4947..527deba4 --- a/BTPanel/__init__.py +++ b/BTPanel/__init__.py @@ -1,6 +1,6 @@ -#coding: utf-8 +# coding: utf-8 # +------------------------------------------------------------------- -# | 宝塔Linux面板 +# | 宝塔Linux面板 # +------------------------------------------------------------------- # | Copyright (c) 2015-2099 宝塔软件(http://bt.cn) All rights reserved. # +------------------------------------------------------------------- @@ -15,20 +15,20 @@ import time import re import uuid import psutil + panel_path = '/www/server/panel' if not os.name in ['nt']: os.chdir(panel_path) if not 'class/' in sys.path: - sys.path.insert(0,'class/') + sys.path.insert(0, 'class/') from flask import Flask, session, render_template, send_file, request, redirect, g, make_response, \ - render_template_string, abort,stream_with_context, Response as Resp -from cachelib import SimpleCache + render_template_string, abort, stream_with_context, Response as Resp +from cachelib import SimpleCache, SimpleCacheSession from werkzeug.wrappers import Response from flask_session import Session from flask_compress import Compress - cache = SimpleCache(5000) import public @@ -62,10 +62,10 @@ if os.path.exists(basic_auth_conf): pass # 初始化SESSION服务 -app.secret_key = public.md5(str(os.uname()) + str(psutil.boot_time())) # uuid.UUID(int=uuid.getnode()).hex[-12:] +app.secret_key = public.md5(str(os.uname()) + str(psutil.boot_time())) # uuid.UUID(int=uuid.getnode()).hex[-12:] local_ip = None my_terms = {} -app.config['SESSION_MEMCACHED'] = SimpleCache(1000,86400) +app.config['SESSION_MEMCACHED'] = SimpleCacheSession(1000, 86400) app.config['SESSION_TYPE'] = 'memcached' app.config['SESSION_PERMANENT'] = True app.config['SESSION_USE_SIGNER'] = True @@ -82,9 +82,9 @@ Session(app) import common -#初始化路由 +# 初始化路由 comm = common.panelAdmin() -method_all = ['GET','POST'] +method_all = ['GET', 'POST'] method_get = ['GET'] method_post = ['POST'] json_header = {'Content-Type': 'application/json; charset=utf-8'} @@ -138,18 +138,23 @@ admin_path_checks = [ '/api', '/tips', '/message', - '/warning' + '/warning', + '/userRegister', + ] if admin_path in admin_path_checks: admin_path = '/bt' -uri_match = re.compile(r"(^/static/[\w_\./\-]+\.(js|css|png|jpg|gif|ico|svg|woff|woff2|ttf|otf|eot|map)$|^/[\w_\./\-]*$)") +if admin_path[-1] == '/': admin_path = admin_path[:-1] +uri_match = re.compile( + r"(^/static/[\w_\./\-]+\.(js|css|png|jpg|gif|ico|svg|woff|woff2|ttf|otf|eot|map)$|^/[\w_\./\-]*$)") session_id_match = re.compile(r"^[\w\.\-]+$") + # ===================================Flask HOOK========================# # Flask请求勾子 @app.before_request def request_check(): - if request.method not in ['GET','POST']:return abort(404) + if request.method not in ['GET', 'POST']: return abort(404) g.request_time = time.time() # 路由和URI长度过滤 if len(request.path) > 256: return abort(403) @@ -157,14 +162,22 @@ def request_check(): # URI过滤 if not uri_match.match(request.path): return abort(403) # POST参数过滤 - if request.path in ['/login', '/safe', '/hook', '/public', '/down', '/get_app_bind_status', '/check_bind']: + if request.path in ['/login', + '/safe', + '/hook', + '/public', + '/down', + '/get_app_bind_status', + '/check_bind', + '/userRegister', + + ]: pdata = request.form.to_dict() for k in pdata.keys(): if len(k) > 48: return abort(403) if len(pdata[k]) > 256: return abort(403) - # SESSIONID过滤 - session_id = request.cookies.get(app.config['SESSION_COOKIE_NAME'],'') + session_id = request.cookies.get(app.config['SESSION_COOKIE_NAME'], '') if session_id and not session_id_match.match(session_id): return abort(403) # 请求头过滤 @@ -174,7 +187,6 @@ def request_check(): if session.get('debug') == 1: return g.get_csrf_html_token_key = public.get_csrf_html_token_key() - if app.config['BASIC_AUTH_OPEN']: if request.path in ['/public', '/download', '/mail_sys', '/hook', '/down', '/check_bind', '/get_app_bind_status']: return @@ -190,28 +202,28 @@ def request_check(): ip_check = public.check_ip_panel() if ip_check: return ip_check - if request.path.find('/static/') != -1 or request.path == '/code': + if request.path.startswith('/static/') or request.path == '/code': if not 'login' in session and not 'admin_auth' in session and not 'down' in session: return abort(401) domain_check = public.check_domain_panel() if domain_check: return domain_check if public.is_local(): - not_networks = ['uninstall_plugin','install_plugin','UpdatePanel'] + not_networks = ['uninstall_plugin', 'install_plugin', 'UpdatePanel'] if request.args.get('action') in not_networks: - return public.returnJson(False,'This feature cannot be used in offline mode!'),json_header + return public.returnJson(False, 'This feature cannot be used in offline mode!'), json_header - if request.path in ['/site','/ftp','/database','/soft','/control','/firewall','/files','/xterm','/crontab','/config']: + if request.path in ['/site', '/ftp', '/database', '/soft', '/control', '/firewall', '/files', '/xterm', '/crontab', + '/config']: if public.is_error_path(): - return redirect('/error',302) + return redirect('/error', 302) if not request.path in ['/config']: - if session.get('password_expire',False): - return redirect('/modify_password',302) - + if session.get('password_expire', False): + return redirect('/modify_password', 302) # Flask 请求结束勾子 @app.teardown_request def request_end(reques=None): - if request.method not in ['GET','POST']:return + if request.method not in ['GET', 'POST']: return if not request.path.startswith('/static/'): public.write_request_log(reques) if 'api_request' in g: @@ -222,8 +234,8 @@ def request_end(reques=None): # Flask 404页面勾子 @app.errorhandler(404) def error_404(e): - if request.method not in ['GET','POST']:return - if not session.get('login',None): + if request.method not in ['GET', 'POST']: return + if not session.get('login', None): g.auth_error = True return public.error_not_login() errorStr = ''' @@ -233,17 +245,17 @@ def error_404(e):