Changeset 1821941
- Timestamp:
- 02/14/2018 11:36:40 AM (8 years ago)
- Location:
- ose-firewall/trunk
- Files:
-
- 11 edited
-
assets/config/define.php (modified) (2 diffs)
-
assets/views/calltoaction.php (modified) (1 diff)
-
classes/App/Base.php (modified) (1 diff)
-
classes/App/Controller/SubscriptionController.php (modified) (1 diff)
-
classes/App/Model/SubscriptionModel.php (modified) (1 diff)
-
classes/Library/oseFirewallAjax.php (modified) (1 diff)
-
classes/Library/oseFirewallJoomla.php (modified) (3 diffs)
-
classes/Library/oseFirewallWordpress.php (modified) (4 diffs)
-
classes/Library/panel/panel.php (modified) (2 diffs)
-
ose_firewall_badge.php (modified) (1 diff)
-
ose_wordpress_firewall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ose-firewall/trunk/assets/config/define.php
r1814810 r1821941 38 38 define("BACKUP_API_SERVER","https://backup-api-dev.centrora.com.au/"); 39 39 define("VSSCAN_API_SERVER","https://vsscan-api-dev.centrora.com.au/"); 40 define('VIRUS_PATTERN_DOWNLOAD_URL',"https://update-api-dev.centrora.com.au/download/updateVSPattern ");41 define("FIREWALL_PATTERN_DOWNLOAD_URL","https://update-api-dev.centrora.com.au/download/updateFWPattern&update=0 ");42 define("FIREWALL_PATTERN_UPDATE_DOWNLOAD_URL","https://update-api-dev.centrora.com.au/download/updateFWPattern&update=1 ");40 define('VIRUS_PATTERN_DOWNLOAD_URL',"https://update-api-dev.centrora.com.au/download/updateVSPattern?domain=".$_SERVER['HTTP_HOST']); 41 define("FIREWALL_PATTERN_DOWNLOAD_URL","https://update-api-dev.centrora.com.au/download/updateFWPattern&update=0?domain=".$_SERVER['HTTP_HOST']); 42 define("FIREWALL_PATTERN_UPDATE_DOWNLOAD_URL","https://update-api-dev.centrora.com.au/download/updateFWPattern&update=1?domain=".$_SERVER['HTTP_HOST']); 43 43 define("GET_VIRUS_PATTERN_VERSION_URL","https://update-api-dev.centrora.com.au/version/getVSPatternVersion"); 44 44 define("GET_FIREWALL_PATTERN_VERSION_URL","https://update-api-dev.centrora.com.au/version/getFWPatternVersion"); … … 51 51 define("BACKUP_API_SERVER","https://backup-api.centrora.com/"); 52 52 define("VSSCAN_API_SERVER","https://vsscan-api.centrora.com/"); 53 define('VIRUS_PATTERN_DOWNLOAD_URL',"https://update-api.centrora.com/download/updateVSPattern ");54 define("FIREWALL_PATTERN_DOWNLOAD_URL","https://update-api.centrora.com/download/updateFWPattern&update=0 ");55 define("FIREWALL_PATTERN_UPDATE_DOWNLOAD_URL","https://update-api.centrora.com/download/updateFWPattern&update=1 ");53 define('VIRUS_PATTERN_DOWNLOAD_URL',"https://update-api.centrora.com/download/updateVSPattern?domain=".$_SERVER['HTTP_HOST']); 54 define("FIREWALL_PATTERN_DOWNLOAD_URL","https://update-api.centrora.com/download/updateFWPattern&update=0&domain=".$_SERVER['HTTP_HOST']); 55 define("FIREWALL_PATTERN_UPDATE_DOWNLOAD_URL","https://update-api.centrora.com/download/updateFWPattern&update=1&domain=".$_SERVER['HTTP_HOST']); 56 56 define("GET_VIRUS_PATTERN_VERSION_URL","https://update-api.centrora.com/version/getVSPatternVersion"); 57 57 define("GET_FIREWALL_PATTERN_VERSION_URL","https://update-api.centrora.com/version/getFWPatternVersion"); -
ose-firewall/trunk/assets/views/calltoaction.php
r1815669 r1821941 24 24 <div style="margin-top:-18px; margin-left: 18px;"> 25 25 <h2><?php echo $this->model->showSubTitle(); ?></h2> 26 <p> Detect hacking attacks towards the website, block out suspicious activities and protect the website from malware codes.</p>26 <p><?php echo (method_exists($this->model,'showSubDesc'))? $this->model->showSubDesc():''; ?></p> 27 27 </div> 28 28 <img style="margin-top: -1px; min-width: 900px;" src="<?php echo OSE_FWPUBLICURL . "/images/premium/coredic.png"; ?>" -
ose-firewall/trunk/classes/App/Base.php
r1815721 r1821941 76 76 } 77 77 protected function isPremiumViews($view){ 78 $premiumViews = array('vsscan','cfscan','vsreport','scanreport','cronjobs','bsconfigv7','ipmanagement','bsconfigv7stats','emailnotificationv7');79 if(in_array(strtolower($view),$premiumViews)){80 return true;78 $premiumViews = array('vsscan','cfscan','vsreport','scanreport','cronjobs','bsconfigv7','ipmanagement','bsconfigv7stats','emailnotificationv7','surfscan'); 79 if(in_array(strtolower($view),$premiumViews)){ 80 return true; 81 81 } 82 82 return false; -
ose-firewall/trunk/classes/App/Controller/SubscriptionController.php
r1814810 r1821941 81 81 $this->model->returnJSON($return, false); 82 82 } 83 public function action_updatePackage(){ 84 $this->model->loadRequest(); 85 $data = $this->model->updatePackage(); 86 $this->model->returnJSON($data); 87 } 83 88 } -
ose-firewall/trunk/classes/App/Model/SubscriptionModel.php
r1814810 r1821941 131 131 return (!empty($config['data']['trackingCode']))?$config['data']['trackingCode']:null; 132 132 } 133 public function updatePackage(){ 134 oseFirewall::callLibClass('panel','panel'); 135 $panel = new panel (); 136 return $panel->updatePackage(); 137 } 133 138 } -
ose-firewall/trunk/classes/Library/oseFirewallAjax.php
r1814810 r1821941 176 176 } 177 177 public static function loadActionSubscription () { 178 $actions = array('getSubscription', 'getToken', 'linkSubscription', 'updateProfileID', 'logout', 'check', 'activateCode' );178 $actions = array('getSubscription', 'getToken', 'linkSubscription', 'updateProfileID', 'logout', 'check', 'activateCode','updatePackage'); 179 179 parent::loadActions($actions); 180 180 } -
ose-firewall/trunk/classes/Library/oseFirewallJoomla.php
r1815669 r1821941 110 110 $menu .= '<ul class="dropdown-menu">'; 111 111 112 if (JOOMLA15 == false) { 113 $menu .= '<li '; 114 $menu .= ($view == 'vlscan') ? 'class="active"' : ''; 115 $menu .= '><a href="index.php?option=' . $extension . '&view=vlscan">' . oLang::_get('Vl_SCAN') . '</a></li>'; 116 } 117 $menu .= '<li '; 118 $menu .= ($view == 'mfscan') ? 'class="active"' : ''; 119 $menu .= '><a href="index.php?option=' . $extension . '&view=mfscan">' . oLang::_get('MF_SCAN') . '</a></li>'; 120 112 121 $menu .= '<li '; 113 122 $menu .= ($view == 'vsscan') ? 'class="active"' : ''; … … 122 131 $menu .= '><a href="index.php?option=' . $extension . '&view=cfscan">' . oLang::_get('CORE_SCAN') . '</a></li>'; 123 132 124 /*125 $menu .= '<li ';126 $menu .= ($view == 'mfscan') ? 'class="active"' : '';127 $menu .= '><a href="index.php?option=' . $extension . '&view=mfscan">' . oLang::_get('MF_SCAN') . '</a></li>';128 */129 130 133 $menu .= '<li '; 131 134 $menu .= ($view == 'vsreport') ? 'class="active"' : ''; 132 135 $menu .= '><a href="index.php?option=' . $extension . '&view=vsreport">' . oLang::_get('VSREPORT') . '</a></li>'; 133 if (JOOMLA15 == false) {134 $menu .= '<li ';135 $menu .= ($view == 'vlscan') ? 'class="active"' : '';136 $menu .= '><a href="index.php?option=' . $extension . '&view=vlscan">' . oLang::_get('Vl_SCAN') . '</a></li>';137 }138 $menu .= '<li ';139 $menu .= ($view == 'fpscan') ? 'class="active"' : '';140 $menu .= '><a href="index.php?option=' . $extension . '&view=fpscan">' . oLang::_get('FILE_PERM_SCAN') . '</a></li>';141 136 $menu .= '</ul>'; 142 137 … … 146 141 //Modified File Scanner 147 142 $menu .= '<li '; 148 $menu .= (in_array($view, array(' mfscan'))) ? 'class="active dropdown"' : 'class="dropdown"';149 $menu .= '><a href="index.php?option=' . $extension . '&view= mfscan" class="dropdown-toggle">';143 $menu .= (in_array($view, array('fpscan'))) ? 'class="active dropdown"' : 'class="dropdown"'; 144 $menu .= '><a href="index.php?option=' . $extension . '&view=fpscan" class="dropdown-toggle">'; 150 145 $menu .= '<img src=' . OSE_FWPUBLICURL . '/images/topbar/icon_t.png>'; 151 $menu .= oLang::_get(' MF_SCAN') . '</a>';146 $menu .= oLang::_get('FILE_PERM_SCAN') . '</a>'; 152 147 // SubMenu Anti-Hacking Starts; 153 148 $menu .= '<ul class="dropdown-menu">'; 154 149 $menu .= '<li '; 155 $menu .= ($view == ' mfscan') ? 'class="active"' : '';156 $menu .= '><a href="index.php?option=' . $extension . '&view= mfscan">' . oLang::_get('MF_SCAN') . '</a></li>';150 $menu .= ($view == 'fpscan') ? 'class="active"' : ''; 151 $menu .= '><a href="index.php?option=' . $extension . '&view=fpscan">' . oLang::_get('FILE_PERM_SCAN') . '</a></li>'; 157 152 $menu .= '</ul>'; 158 153 $menu .= '</li>'; -
ose-firewall/trunk/classes/Library/oseFirewallWordpress.php
r1815669 r1821941 98 98 99 99 $menu .= '<li '; 100 $menu .= ($view == 'ose_fw_vlscan') ? 'class="active"' : ''; 101 $menu .= '><a href="admin.php?page=ose_fw_vlscan">' . oLang::_get('Vl_SCAN') . '</a></li>'; 102 103 $menu .= '<li '; 104 $menu .= ($view == 'ose_fw_mfscan') ? 'class="active"' : ''; 105 $menu .= '><a href="admin.php?page=ose_mfscan">' . oLang::_get('MF_SCAN') . '</a></li>'; 106 107 $menu .= '<li '; 100 108 $menu .= ($view == 'ose_fw_vsscan') ? 'class="active"' : ''; 101 109 $menu .= '><a href="admin.php?page=ose_fw_vsscan">' . oLang::_get('DEEPSCAN') . '</a></li>'; … … 120 128 $menu .= '><a href="admin.php?page=ose_fw_scanreport">' . oLang::_get('VSREPORT') . '</a></li>'; 121 129 122 $menu .= '<li ';123 $menu .= ($view == 'ose_fw_vlscan') ? 'class="active"' : '';124 $menu .= '><a href="admin.php?page=ose_fw_vlscan">' . oLang::_get('Vl_SCAN') . '</a></li>';125 126 $menu .= '<li ';127 $menu .= ($view == 'ose_fw_fpscan') ? 'class="active"' : '';128 $menu .= '><a href="admin.php?page=ose_fw_fpscan">' . oLang::_get('FILE_PERM_SCAN') . '</a></li>';129 130 $menu .= '</ul>'; 130 131 … … 134 135 //Modified File Scanner 135 136 $menu .= '<li '; 136 $menu .= (in_array($view, array(' mfscan'))) ? 'class="active dropdown"' : 'class="dropdown"';137 $menu .= '><a href="admin.php?page=ose_fw_ mfscan" class="dropdown-toggle">';137 $menu .= (in_array($view, array('fpscan'))) ? 'class="active dropdown"' : 'class="dropdown"'; 138 $menu .= '><a href="admin.php?page=ose_fw_fpscan" class="dropdown-toggle">'; 138 139 $menu .= '<img src=' . OSE_FWPUBLICURL . '/images/topbar/icon_t.png>'; 139 $menu .= oLang::_get(' MF_SCAN') . '</a>';140 $menu .= oLang::_get('FILE_PERM_SCAN') . '</a>'; 140 141 // SubMenu Anti-Hacking Starts; 141 142 $menu .= '<ul class="dropdown-menu">'; 142 143 $menu .= '<li '; 143 $menu .= ($view == ' mfscan') ? 'class="active"' : '';144 $menu .= '><a href="admin.php?page=ose_fw_ mfscan">' . oLang::_get('MF_SCAN') . '</a></li>';144 $menu .= ($view == 'fpscan') ? 'class="active"' : ''; 145 $menu .= '><a href="admin.php?page=ose_fw_fpscan">' . oLang::_get('FILE_PERM_SCAN') . '</a></li>'; 145 146 $menu .= '</ul>'; 146 147 $menu .= '</li>'; … … 553 554 <div class="at-banner__text"> 554 555 555 <b>Suffering from website malware and server security issues ?</b><br> 556 We have a complete hosting solution which includes :<br> 557 advanced <b>Centrora Security Solutions</b>, <br> 558 and <b>High Performance</b> hosting services at <b>Affordable Prices</b>. 556 <<b>Need Enterprise Security Services?</b>. 559 557 </div> 560 <a class="at-banner__button" target="_blank" href="https:// centrora.com/services#suite">VPS - only $28.6/m</a>561 <a class="at-banner__button" style="margin-left: 20px;" target="_blank" href="https://centrora.com/services/hosting-services-pricing">Dedicated Servers</a>558 <a class="at-banner__button" target="_blank" href="https://www.centrora.com/services">Our Service</a> 559 <a class="at-banner__button" style="margin-left: 20px;" target="_blank" href="https://www.centrora.com/support">Contact Us Now</a> 562 560 </div> 563 561 </div>'; -
ose-firewall/trunk/classes/Library/panel/panel.php
r1814810 r1821941 229 229 $content['task'] = 'getSignatures'; 230 230 $content['type'] = $type; 231 $content['domain'] = $_SERVER['HTTP_HOST']; 231 232 $this->sendRequest($content); 232 233 } … … 861 862 } 862 863 863 864 865 864 public function updatePackage(){ 865 $this->enableFURLOpen (); 866 // Get a database connector 867 if (class_exists('SConfig')){ 868 $cms = 'st'; 869 $zipFileName = 'pkg_centrora_suite.zip'; 870 }else if (class_exists('JConfig')){ 871 $cms = 'jl'; 872 $zipFileName = 'pkg_centrora_joomla.zip'; 873 }else if (defined('WPLANG') || OSE_CMS == "wordpress"){ 874 $cms = 'wp'; 875 $zipFileName = 'pkg_centrora_wordpress.zip'; 876 } 877 if($cms == 'wp'){ 878 return $this->updateWPPackage($cms,$zipFileName); 879 }else{ 880 return $this->updateJSPackage($cms,$zipFileName); 881 } 882 } 883 protected function updateWPPackage($cms,$zipFileName){ 884 $package = $this->getWPPackage($cms,$zipFileName); 885 if (!$package) { 886 return false; 887 } 888 $package_file = CENTRORABACKUP_FOLDER . ODS.$zipFileName; 889 if(file_exists($package_file)){ 890 $zip = new ZipArchive; 891 if ($zip->open($package_file)){ 892 $zip->extractTo(OSEFWDIR); 893 $zip->close(); 894 } 895 return true; 896 }else{ 897 return false; 898 } 899 } 900 protected function updateJSPackage($cms,$zipFileName){ 901 $package = $this->getJSPackage($cms,$zipFileName); 902 if (!$package) { 903 JError::raiseWarning('', JText::_('Automatic Update: Something went wrong while unpacking the download')); 904 return false; 905 } 906 // Get an installer instance 907 $installer = JInstaller::getInstance(); 908 if (!$installer->install($package['dir'])) { 909 JError::raiseWarning('', JText::_('Automatic Update: There was an error installing the package')); 910 $result = false; 911 } else { 912 // Package installed sucessfully 913 $msg = JText::sprintf('COM_INSTALLER_INSTALL_SUCCESS', JText::_('COM_INSTALLER_TYPE_TYPE_'.strtoupper($package['type']))); 914 $result = true; 915 } 916 // Cleanup the install files 917 if (!is_file($package['packagefile'])) { 918 $config = JFactory::getConfig(); 919 $package['packagefile'] = $config->get('tmp_path') . '/' . $package['packagefile']; 920 } 921 JInstallerHelper::cleanupInstall($package['packagefile'], $package['extractdir']); 922 return $result; 923 } 924 protected function getJSPackage($cms,$zipFileName){ 925 $domain = $_SERVER['HTTP_HOST']; 926 $url = "https://update-api.centrora.com/download/getPackage?webkey=".$this->getWebKey ()."&domain=".$domain."&cms=".$cms; 927 // Define Temp Folder; 928 $config = JFactory::getConfig(); 929 $tmp_dest = $config->get('tmp_path'); 930 // Download the zip package 931 $url_fopen = ini_get('allow_url_fopen'); 932 if ($url_fopen == true) 933 { 934 $updatefile = JInstallerHelper::downloadPackage($url); 935 } 936 else 937 { 938 $updatefile = $this->downloadThroughCURL ($url, $tmp_dest, $zipFileName); 939 } 940 // Was the package downloaded? 941 if (!$updatefile) { 942 JError::raiseWarning('', JText::_('Automatic Update: Something went wrong with the download')); 943 return false; 944 } 945 // Unpack the downloaded package file 946 $package = JInstallerHelper::unpack($tmp_dest . '/' . $updatefile); 947 return $package; 948 } 949 protected function getWPPackage($cms,$zipFileName){ 950 $domain = $_SERVER['HTTP_HOST']; 951 $url = "https://update-api.centrora.com/download/getPackage?webkey=".$this->getWebKey ()."&domain=".$domain."&cms=".$cms; 952 $tmp_dest = CENTRORABACKUP_FOLDER; 953 $updatefile = $this->downloadThroughCURL ($url, $tmp_dest, $zipFileName); 954 if (!$updatefile) { 955 return false; 956 } 957 return $updatefile; 958 } 866 959 } -
ose-firewall/trunk/ose_firewall_badge.php
r1815669 r1821941 4 4 Description: Plugin For Showing Centrora Security Badge 5 5 Author: Centrora Security 6 Version: 7. 2.16 Version: 7.3.0 7 7 */ 8 8 include(dirname(__FILE__).'/includes/oseBadgeWidget.php'); -
ose-firewall/trunk/ose_wordpress_firewall.php
r1815669 r1821941 5 5 Description: Centrora Security (previously OSE Firewall) - A WordPress Security Firewall plugin created by Centrora. Protect your WordPress site by identify any malicious codes, spam, virus, SQL injection, and security vulnerabilities. 6 6 Author: Centrora (Previously ProWeb) 7 Version: 7. 2.17 Version: 7.3.0 8 8 Author URI: http://www.centrora.com/ 9 9 */
Note: See TracChangeset
for help on using the changeset viewer.