utf-encoding

This commit is contained in:
Usman Nasir
2019-12-13 12:06:08 +05:00
parent 7df426e9b0
commit d45d5a1ede
3 changed files with 7 additions and 5 deletions

View File

@@ -895,6 +895,7 @@ fi
if [[ $DEV == "ON" ]] ; then
#install dev branch
#wget https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/requirments.txt
pip3.6 install virtualenv
cd /usr/local/
virtualenv -p /usr/bin/python3 CyberPanel
source /usr/local/CyberPanel/bin/activate

View File

@@ -187,13 +187,13 @@ class ProcessUtilities(multi.Thread):
sock = ret[0]
if user == None:
#logging.writeToFile(ProcessUtilities.token + command)
sock.sendall(ProcessUtilities.token + command)
logging.writeToFile(ProcessUtilities.token + command)
sock.sendall((ProcessUtilities.token + command).encode('utf-8'))
else:
command = '%s-u %s %s' % (ProcessUtilities.token, user, command)
#logging.writeToFile(ProcessUtilities.token + command)
logging.writeToFile(ProcessUtilities.token + command)
command = command.replace('sudo', '')
sock.sendall(command)
sock.sendall(command.encode('utf-8'))
data = ""
@@ -211,6 +211,8 @@ class ProcessUtilities(multi.Thread):
# cmd = 'deluser %s cyberpanel' % (user)
# ProcessUtilities.executioner(cmd)
logging.writeToFile(data)
return data
except BaseException as msg:
logging.writeToFile(str(msg) + " [sendCommand]")

View File

@@ -44,7 +44,6 @@ pygpgme==0.3
PyNaCl==1.3.0
pyOpenSSL==17.5.0
pyRFC3339==1.1
pyserial==2.6
python-dateutil==2.7.5
pytz==2018.4
pyudev==0.15