mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 15:56:11 +01:00
bug fix: make sure free scan works
This commit is contained in:
@@ -5,7 +5,7 @@ class CLMain():
|
|||||||
self.path = '/usr/local/CyberCP/version.txt'
|
self.path = '/usr/local/CyberCP/version.txt'
|
||||||
#versionInfo = json.loads(open(self.path, 'r').read())
|
#versionInfo = json.loads(open(self.path, 'r').read())
|
||||||
self.version = '2.4'
|
self.version = '2.4'
|
||||||
self.build = '1'
|
self.build = '2'
|
||||||
|
|
||||||
ipFile = "/etc/cyberpanel/machineIP"
|
ipFile = "/etc/cyberpanel/machineIP"
|
||||||
f = open(ipFile)
|
f = open(ipFile)
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ TEMPLATES = [
|
|||||||
'django.template.context_processors.request',
|
'django.template.context_processors.request',
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
'baseTemplate.context_processors.version_context',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -712,6 +712,7 @@ class AIScannerManager:
|
|||||||
"""Submit scan request to AI Scanner API"""
|
"""Submit scan request to AI Scanner API"""
|
||||||
try:
|
try:
|
||||||
payload = {
|
payload = {
|
||||||
|
'domain': domain,
|
||||||
'site_url': domain,
|
'site_url': domain,
|
||||||
'scan_type': scan_type,
|
'scan_type': scan_type,
|
||||||
'cyberpanel_callback': callback_url,
|
'cyberpanel_callback': callback_url,
|
||||||
|
|||||||
10
baseTemplate/context_processors.py
Normal file
10
baseTemplate/context_processors.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from .views import VERSION, BUILD
|
||||||
|
|
||||||
|
def version_context(request):
|
||||||
|
"""Add version information to all templates"""
|
||||||
|
return {
|
||||||
|
'CYBERPANEL_VERSION': VERSION,
|
||||||
|
'CYBERPANEL_BUILD': BUILD,
|
||||||
|
'CYBERPANEL_FULL_VERSION': f"{VERSION}.{BUILD}"
|
||||||
|
}
|
||||||
@@ -1656,20 +1656,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Additional Scripts -->
|
<!-- Additional Scripts -->
|
||||||
<script src="{% static 'packages/packages.js' %}"></script>
|
<script src="{% static 'packages/packages.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'websiteFunctions/websiteFunctions.js' %}"></script>
|
<script src="{% static 'websiteFunctions/websiteFunctions.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'userManagment/userManagment.js' %}"></script>
|
<script src="{% static 'userManagment/userManagment.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'databases/databases.js' %}"></script>
|
<script src="{% static 'databases/databases.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'dns/dns.js' %}"></script>
|
<script src="{% static 'dns/dns.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'mailServer/mailServer.js' %}"></script>
|
<script src="{% static 'mailServer/mailServer.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'ftp/ftp.js' %}"></script>
|
<script src="{% static 'ftp/ftp.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'backup/backup.js' %}"></script>
|
<script src="{% static 'backup/backup.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'managePHP/managePHP.js' %}"></script>
|
<script src="{% static 'managePHP/managePHP.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'serverLogs/serverLogs.js' %}"></script>
|
<script src="{% static 'serverLogs/serverLogs.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'serverStatus/serverStatus.js' %}"></script>
|
<script src="{% static 'serverStatus/serverStatus.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'firewall/firewall.js' %}"></script>
|
<script src="{% static 'firewall/firewall.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'emailPremium/emailPremium.js' %}"></script>
|
<script src="{% static 'emailPremium/emailPremium.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
<script src="{% static 'manageServices/manageServices.js' %}"></script>
|
<script src="{% static 'manageServices/manageServices.js' %}?v={{ CYBERPANEL_FULL_VERSION }}"></script>
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import pwd
|
|||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
|
|
||||||
@ensure_csrf_cookie
|
@ensure_csrf_cookie
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import stat
|
|||||||
import secrets
|
import secrets
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz', 'nums': '0123456789', 'big': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'}
|
char_set = {'small': 'abcdefghijklmnopqrstuvwxyz', 'nums': '0123456789', 'big': 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from django.utils import translation
|
|||||||
# Create your views here.
|
# Create your views here.
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
|
|
||||||
def verifyLogin(request):
|
def verifyLogin(request):
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from packages.models import Package
|
|||||||
from baseTemplate.models import version
|
from baseTemplate.models import version
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
if not os.geteuid() == 0:
|
if not os.geteuid() == 0:
|
||||||
sys.exit("\nOnly root can run this script\n")
|
sys.exit("\nOnly root can run this script\n")
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ except:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
|
|
||||||
## I am not the monster that you think I am..
|
## I am not the monster that you think I am..
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import random
|
|||||||
import string
|
import string
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
CENTOS7 = 0
|
CENTOS7 = 0
|
||||||
CENTOS8 = 1
|
CENTOS8 = 1
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ EXPIRE = 3
|
|||||||
### Version
|
### Version
|
||||||
|
|
||||||
VERSION = '2.4'
|
VERSION = '2.4'
|
||||||
BUILD = 1
|
BUILD = 2
|
||||||
|
|
||||||
|
|
||||||
def serverStatusHome(request):
|
def serverStatusHome(request):
|
||||||
|
|||||||
Reference in New Issue
Block a user