mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 09:16:11 +01:00
Metadata replaced with XML!
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
import shlex
|
||||
import subprocess
|
||||
import socket
|
||||
from xml.etree import ElementTree
|
||||
import os
|
||||
from random import randint
|
||||
|
||||
print socket.gethostbyname('umerjave.com')
|
||||
print socket.gethostbyname('test.umerjave.com')
|
||||
mydoc = ElementTree.parse('domain.xml')
|
||||
|
||||
print mydoc.find('masterDomain').text
|
||||
|
||||
domains = mydoc.findall('ChildDomains/domain')
|
||||
|
||||
for d in domains:
|
||||
print d.find('domain').text
|
||||
print d.find('phpSelection').text
|
||||
print d.find('path').text
|
||||
|
||||
|
||||
databases = mydoc.findall('Databases/database')
|
||||
|
||||
for d in databases:
|
||||
print d.find('dbName').text
|
||||
print d.find('dbUser').text
|
||||
print d.find('password').text
|
||||
|
||||
|
||||
print os.path.join("/home","cyberpanel",str(randint(1000, 9999))+".xml/","test")
|
||||
|
||||
Reference in New Issue
Block a user