mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
wpmanager: init
This commit is contained in:
@@ -960,6 +960,27 @@ skip-name-resolve
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[addUserToDB]")
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def UpdateWPTempPassword(dbname, password):
|
||||
try:
|
||||
|
||||
##
|
||||
|
||||
connection, cursor = mysqlUtilities.setupConnection()
|
||||
|
||||
if connection == 0:
|
||||
return 0
|
||||
|
||||
cursor.execute("use %s" % (dbname))
|
||||
cursor.execute("UPDATE `wp_users` SET `user_pass`= MD5('%s') WHERE `user_login`='usman'" % (password))
|
||||
connection.close()
|
||||
|
||||
return 1
|
||||
|
||||
except BaseException as msg:
|
||||
logging.CyberCPLogFileWriter.writeToFile(str(msg) + "[deleteDatabase]")
|
||||
return str(msg)
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='CyberPanel')
|
||||
parser.add_argument('function', help='Specific a function to call!')
|
||||
|
||||
Reference in New Issue
Block a user