mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 23:36:11 +01:00
tld extract bug fix
This commit is contained in:
@@ -2859,18 +2859,11 @@ class CloudManager:
|
||||
|
||||
zones = cf.zones.get(params = {'per_page':100})
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command, None, True)
|
||||
|
||||
for website in Websites.objects.all():
|
||||
import tldextract
|
||||
extractDomain = tldextract.extract(website.domain)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
extractDomain = no_cache_extract(website.domain)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
|
||||
for zone in zones:
|
||||
@@ -2920,7 +2913,8 @@ class CloudManager:
|
||||
for website in ChildDomains.objects.all():
|
||||
|
||||
import tldextract
|
||||
extractDomain = tldextract.extract(website.domain)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
extractDomain = no_cache_extract(website.domain)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
|
||||
for zone in zones:
|
||||
|
||||
@@ -171,20 +171,9 @@ class DNSManager:
|
||||
finalData['domainsList'] = []
|
||||
import tldextract
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command, None, True)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
for items in tempList:
|
||||
extractDomain = tldextract.extract(items)
|
||||
extractDomain = no_cache_extract(items)
|
||||
subDomain = extractDomain.subdomain
|
||||
if len(subDomain) == 0:
|
||||
finalData['domainsList'].append(items)
|
||||
|
||||
@@ -693,18 +693,12 @@ class MailServerManager(multi.Thread):
|
||||
|
||||
try:
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command, None, True)
|
||||
|
||||
import tldextract
|
||||
|
||||
extractDomain = tldextract.extract(domainName)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
extractDomain = no_cache_extract(domainName)
|
||||
domainName = extractDomain.domain + '.' + extractDomain.suffix
|
||||
|
||||
path = "/etc/opendkim/keys/" + domainName + "/default.txt"
|
||||
@@ -772,7 +766,9 @@ class MailServerManager(multi.Thread):
|
||||
|
||||
import tldextract
|
||||
|
||||
extractDomain = tldextract.extract(domainName)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
extractDomain = no_cache_extract(domainName)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
|
||||
zone = dnsDomains.objects.get(name=topLevelDomain)
|
||||
|
||||
@@ -115,21 +115,12 @@ class DNS:
|
||||
ipData = f.read()
|
||||
ipAddress = ipData.split('\n', 1)[0]
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command, None, True)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
import tldextract
|
||||
|
||||
extractDomain = tldextract.extract(domain)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
extractDomain = no_cache_extract(domain)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
subDomain = extractDomain.subdomain
|
||||
|
||||
@@ -582,7 +573,9 @@ class DNS:
|
||||
|
||||
import tldextract
|
||||
|
||||
extractDomain = tldextract.extract(domain)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
extractDomain = no_cache_extract(domain)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
subDomain = extractDomain.subdomain
|
||||
|
||||
|
||||
@@ -401,19 +401,13 @@ class mailUtilities:
|
||||
try:
|
||||
## Generate DKIM Keys
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.6/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python3.8/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
command = 'chown cyberpanel:cyberpanel -R /usr/local/CyberCP/lib/python*/site-packages/tldextract/.suffix_cache'
|
||||
ProcessUtilities.executioner(command, None, True)
|
||||
|
||||
import tldextract
|
||||
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
actualDomain = virtualHostName
|
||||
extractDomain = tldextract.extract(virtualHostName)
|
||||
extractDomain = no_cache_extract(virtualHostName)
|
||||
virtualHostName = extractDomain.domain + '.' + extractDomain.suffix
|
||||
|
||||
if not os.path.exists("/etc/opendkim/keys/" + virtualHostName + "/default.txt"):
|
||||
|
||||
@@ -339,10 +339,11 @@ class sslUtilities:
|
||||
import tldextract
|
||||
|
||||
RetStatus, SAVED_CF_Key, SAVED_CF_Email = ACLManager.FetchCloudFlareAPIKeyFromAcme()
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
|
||||
if RetStatus:
|
||||
|
||||
extractDomain = tldextract.extract(virtualHostName)
|
||||
extractDomain = no_cache_extract(virtualHostName)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
logging.CyberCPLogFileWriter.writeToFile(f'top level domain in cf: {topLevelDomain}')
|
||||
import CloudFlare
|
||||
@@ -375,7 +376,8 @@ class sslUtilities:
|
||||
|
||||
from plogical.dnsUtilities import DNS
|
||||
from dns.models import Domains
|
||||
extractDomain = tldextract.extract(virtualHostName)
|
||||
no_cache_extract = tldextract.TLDExtract(cache_dir=None)
|
||||
extractDomain = no_cache_extract(virtualHostName)
|
||||
topLevelDomain = extractDomain.domain + '.' + extractDomain.suffix
|
||||
zone = Domains.objects.get(name=topLevelDomain)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user