From a0a1b90a048dbbe60091124139cb813121a33485 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 1 Oct 2020 20:48:01 +0500 Subject: [PATCH 01/10] the Mautic image button refers to install Magento both as href and title --- websiteFunctions/templates/websiteFunctions/website.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/websiteFunctions/templates/websiteFunctions/website.html b/websiteFunctions/templates/websiteFunctions/website.html index e42060fc6..9e9459d46 100755 --- a/websiteFunctions/templates/websiteFunctions/website.html +++ b/websiteFunctions/templates/websiteFunctions/website.html @@ -1049,8 +1049,8 @@
- + Date: Sun, 4 Oct 2020 13:08:02 +0500 Subject: [PATCH 02/10] rainloop admin password --- install/install.py | 25 +++++++++++++++++++++++++ plogical/upgrade.py | 22 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/install/install.py b/install/install.py index 33d10de3d..47cd92a0a 100755 --- a/install/install.py +++ b/install/install.py @@ -483,6 +483,26 @@ class preFlightsChecks: def fixCyberPanelPermissions(self): + try: + import randomPassword + + content = """SetPassword('%s'); +echo $oConfig->Save() ? 'Done' : 'Error'; + +?>""" % (randomPassword.generate_pass()) + + writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') + writeToFile.write(content) + writeToFile.close() + except: + pass + ###### fix Core CyberPanel permissions command = "usermod -G lscpd,lsadm,nobody lscpd" @@ -629,6 +649,11 @@ class preFlightsChecks: command = 'chmod 640 /usr/local/lscp/cyberpanel/logs/access.log' preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + ### + + command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + def install_unzip(self): self.stdOut("Install unzip") try: diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 5bea017d4..13293ebe6 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -1651,6 +1651,25 @@ imap_folder_list_limit = 0 def fixPermissions(): try: + try: + import randomPassword + + content = """SetPassword('%s'); +echo $oConfig->Save() ? 'Done' : 'Error'; + +?>""" % (randomPassword.generate_pass()) + + writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') + writeToFile.write(content) + writeToFile.close() + except: + pass + Upgrade.stdOut("Fixing permissions..") command = "usermod -G lscpd,lsadm,nobody lscpd" @@ -1802,6 +1821,9 @@ imap_folder_list_limit = 0 command = 'chmod 640 /usr/local/lscp/cyberpanel/logs/access.log' Upgrade.executioner(command, 0) + command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' + Upgrade.executioner(command, 0) + Upgrade.stdOut("Permissions updated.") From 6f0ae6b0a1c656411157b89f8d01759ccc71b142 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 13:15:25 +0500 Subject: [PATCH 03/10] rainloop admin password --- plogical/upgrade.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 13293ebe6..54fb45af3 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -1652,7 +1652,10 @@ imap_folder_list_limit = 0 try: try: - import randomPassword + def generate_pass(length=14): + chars = string.ascii_uppercase + string.ascii_lowercase + string.digits + size = length + return ''.join(random.choice(chars) for x in range(size)) content = """SetPassword('%s'); echo $oConfig->Save() ? 'Done' : 'Error'; -?>""" % (randomPassword.generate_pass()) +?>""" % (generate_pass()) writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') writeToFile.write(content) From d47897e0802b425c0ea03862cbb3059fd84b394c Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 15:38:06 +0500 Subject: [PATCH 04/10] rainloop admin password --- install/install.py | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install/install.py b/install/install.py index 47cd92a0a..e842ed6db 100755 --- a/install/install.py +++ b/install/install.py @@ -483,25 +483,25 @@ class preFlightsChecks: def fixCyberPanelPermissions(self): - try: - import randomPassword - - content = """SetPassword('%s'); -echo $oConfig->Save() ? 'Done' : 'Error'; - -?>""" % (randomPassword.generate_pass()) - - writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') - writeToFile.write(content) - writeToFile.close() - except: - pass +# try: +# import randomPassword +# +# content = """SetPassword('%s'); +# echo $oConfig->Save() ? 'Done' : 'Error'; +# +# ?>""" % (randomPassword.generate_pass()) +# +# writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') +# writeToFile.write(content) +# writeToFile.close() +# except: +# pass ###### fix Core CyberPanel permissions @@ -651,8 +651,8 @@ echo $oConfig->Save() ? 'Done' : 'Error'; ### - command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + # command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' + # preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) def install_unzip(self): self.stdOut("Install unzip") From e75c7a23020ca5ff45d8671cff8c5827fff1b813 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 16:58:23 +0500 Subject: [PATCH 05/10] rainloop admin password --- install/install.py | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/install/install.py b/install/install.py index e842ed6db..47cd92a0a 100755 --- a/install/install.py +++ b/install/install.py @@ -483,25 +483,25 @@ class preFlightsChecks: def fixCyberPanelPermissions(self): -# try: -# import randomPassword -# -# content = """SetPassword('%s'); -# echo $oConfig->Save() ? 'Done' : 'Error'; -# -# ?>""" % (randomPassword.generate_pass()) -# -# writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') -# writeToFile.write(content) -# writeToFile.close() -# except: -# pass + try: + import randomPassword + + content = """SetPassword('%s'); +echo $oConfig->Save() ? 'Done' : 'Error'; + +?>""" % (randomPassword.generate_pass()) + + writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') + writeToFile.write(content) + writeToFile.close() + except: + pass ###### fix Core CyberPanel permissions @@ -651,8 +651,8 @@ class preFlightsChecks: ### - # command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' - # preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) + command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' + preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) def install_unzip(self): self.stdOut("Install unzip") From 180b89fbe98f8afda2065ae8751c102491f58267 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 17:07:43 +0500 Subject: [PATCH 06/10] rainloop admin password --- install/install.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install/install.py b/install/install.py index 47cd92a0a..a24bdf883 100755 --- a/install/install.py +++ b/install/install.py @@ -484,6 +484,16 @@ class preFlightsChecks: def fixCyberPanelPermissions(self): try: + + writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') + writeToFile.write(""" + [security] +admin_login = "admin" +admin_password = "12345789" +""") + writeToFile.close() + + import randomPassword content = """ Date: Sun, 4 Oct 2020 17:08:17 +0500 Subject: [PATCH 07/10] rainloop admin password --- install/install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index a24bdf883..7434da913 100755 --- a/install/install.py +++ b/install/install.py @@ -487,7 +487,7 @@ class preFlightsChecks: writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') writeToFile.write(""" - [security] +[security] admin_login = "admin" admin_password = "12345789" """) From 045660ae53f7bb945c794470c268c6a4beb85aa7 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 17:27:44 +0500 Subject: [PATCH 08/10] set default pass forward by custom --- install/install.py | 67 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/install/install.py b/install/install.py index 7434da913..40f035e41 100755 --- a/install/install.py +++ b/install/install.py @@ -483,36 +483,6 @@ class preFlightsChecks: def fixCyberPanelPermissions(self): - try: - - writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') - writeToFile.write(""" -[security] -admin_login = "admin" -admin_password = "12345789" -""") - writeToFile.close() - - - import randomPassword - - content = """SetPassword('%s'); -echo $oConfig->Save() ? 'Done' : 'Error'; - -?>""" % (randomPassword.generate_pass()) - - writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') - writeToFile.write(content) - writeToFile.close() - except: - pass - ###### fix Core CyberPanel permissions command = "usermod -G lscpd,lsadm,nobody lscpd" @@ -661,9 +631,6 @@ echo $oConfig->Save() ? 'Done' : 'Error'; ### - command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' - preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR) - def install_unzip(self): self.stdOut("Install unzip") try: @@ -2378,6 +2345,40 @@ def main(): checks.installCLScripts() #checks.disablePackegeUpdates() + + try: + + writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') + writeToFile.write(""" +[security] +admin_login = "admin" +admin_password = "12345789" +""") + writeToFile.close() + + import randomPassword + + content = """SetPassword('%s'); +echo $oConfig->Save() ? 'Done' : 'Error'; + +?>""" % (randomPassword.generate_pass()) + + writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') + writeToFile.write(content) + writeToFile.close() + + command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' + subprocess.call(shlex.split(command)) + + except: + pass + logging.InstallLog.writeToFile("CyberPanel installation successfully completed!") From ac09bfbf1cc71435ac831bca2a1de28714850e6a Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 18:16:45 +0500 Subject: [PATCH 09/10] set default pass forward by custom --- install/install.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install/install.py b/install/install.py index 40f035e41..fb8df13aa 100755 --- a/install/install.py +++ b/install/install.py @@ -2347,6 +2347,8 @@ def main(): #checks.disablePackegeUpdates() try: + command = 'mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/' + subprocess.call(shlex.split(command)) writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') writeToFile.write(""" From 50c586047c99b739566884fcfe80f077e799e401 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Sun, 4 Oct 2020 18:34:45 +0500 Subject: [PATCH 10/10] set default pass forward by custom --- install/install.py | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/install/install.py b/install/install.py index fb8df13aa..8049a06f4 100755 --- a/install/install.py +++ b/install/install.py @@ -2346,40 +2346,40 @@ def main(): checks.installCLScripts() #checks.disablePackegeUpdates() - try: - command = 'mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/' - subprocess.call(shlex.split(command)) - - writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') - writeToFile.write(""" -[security] -admin_login = "admin" -admin_password = "12345789" -""") - writeToFile.close() - - import randomPassword - - content = """SetPassword('%s'); -echo $oConfig->Save() ? 'Done' : 'Error'; - -?>""" % (randomPassword.generate_pass()) - - writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') - writeToFile.write(content) - writeToFile.close() - - command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' - subprocess.call(shlex.split(command)) - - except: - pass +# try: +# command = 'mkdir -p /usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/' +# subprocess.call(shlex.split(command)) +# +# writeToFile = open('/usr/local/lscp/cyberpanel/rainloop/data/data/default/configs/application.ini', 'a') +# writeToFile.write(""" +# [security] +# admin_login = "admin" +# admin_password = "12345789" +# """) +# writeToFile.close() +# +# import randomPassword +# +# content = """SetPassword('%s'); +# echo $oConfig->Save() ? 'Done' : 'Error'; +# +# ?>""" % (randomPassword.generate_pass()) +# +# writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w') +# writeToFile.write(content) +# writeToFile.close() +# +# command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php' +# subprocess.call(shlex.split(command)) +# +# except: +# pass logging.InstallLog.writeToFile("CyberPanel installation successfully completed!")