mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
utf-encoding
This commit is contained in:
@@ -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]")
|
||||
|
||||
Reference in New Issue
Block a user