Changeset 1581581
- Timestamp:
- 01/25/2017 12:10:26 AM (9 years ago)
- Location:
- ose-firewall/trunk
- Files:
-
- 18 added
- 42 edited
-
README.md (added)
-
assets/config/define.php (modified) (1 diff)
-
assets/config/joomla.php (modified) (4 diffs)
-
assets/views/cfscan.php (modified) (5 diffs)
-
assets/views/dashboard.php (modified) (2 diffs)
-
assets/views/fpscan.php (modified) (7 diffs)
-
assets/views/gitbackup.php (modified) (2 diffs)
-
assets/views/mfscan.php (modified) (5 diffs)
-
assets/views/oem/1480 (added)
-
assets/views/oem/1480/index.html (added)
-
assets/views/oem/1480/login.php (added)
-
assets/views/oem/236/login.php (modified) (1 diff)
-
assets/views/oem/547/login.php (modified) (1 diff)
-
assets/views/oem/981/login.php (modified) (1 diff)
-
assets/views/scanreport.php (modified) (2 diffs)
-
assets/views/surfscan.php (modified) (2 diffs)
-
assets/views/template/vls/template-vls-scanstatus.php (modified) (1 diff)
-
assets/views/vlscan.php (modified) (2 diffs)
-
assets/views/vsscan.php (modified) (4 diffs)
-
classes/App/Controller/SurfscanController.php (modified) (1 diff)
-
classes/App/Model/BaseModel.php (modified) (7 diffs)
-
classes/Library/fwscanner/fwscannerad.php (modified) (2 diffs)
-
classes/Library/oem/1480.php (added)
-
classes/Library/oem/218.php (modified) (1 diff)
-
classes/Library/oem/236.php (modified) (1 diff)
-
classes/Library/oem/547.php (modified) (2 diffs)
-
classes/Library/oem/981.php (modified) (1 diff)
-
classes/Library/oem/999.php (modified) (2 diffs)
-
classes/Library/oem/oem.php (modified) (3 diffs)
-
classes/Library/oseFirewallBase.php (modified) (1 diff)
-
classes/Library/oseFirewallJoomla.php (modified) (1 diff)
-
classes/Library/panel/panel.php (modified) (2 diffs)
-
classes/Library/vsscanner/fpscanner.php (modified) (2 diffs)
-
classes/Library/vsscanner/surfscanner.php (modified) (4 diffs)
-
classes/Library/vsscanner/vsscanner.php (modified) (3 diffs)
-
ose_firewall_badge.php (modified) (1 diff)
-
ose_wordpress_firewall.php (modified) (2 diffs)
-
public/css/dynamic.css (modified) (10 diffs)
-
public/css/main.css (modified) (1 diff)
-
public/css/oem/1480 (added)
-
public/css/oem/1480/custom.css (added)
-
public/css/oem/1480/customJoomla.css (added)
-
public/css/oem/1480/imgs (added)
-
public/css/oem/1480/imgs/5 s.png (added)
-
public/css/oem/1480/imgs/5.psd (added)
-
public/css/oem/1480/imgs/5s.png (added)
-
public/css/oem/1480/imgs/background.jpg (added)
-
public/css/oem/1480/imgs/favicon.ico (added)
-
public/css/oem/1480/imgs/logo-header.png (added)
-
public/images/C_puma.png (added)
-
public/js/fpscan.js (modified) (2 diffs)
-
public/js/mfscan.js (modified) (2 diffs)
-
public/js/oem/1480 (added)
-
public/js/oem/1480/custom.js (added)
-
public/js/surfscan.js (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
vendor/oseframework/emails/phpmailer/phpmailer.php (modified) (55 diffs)
-
vendor/oseframework/emails/phpmailer/pop3.php (modified) (1 diff)
-
vendor/oseframework/emails/phpmailer/smtp.php (modified) (18 diffs)
-
vendor/oseframework/users/oseUsers.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ose-firewall/trunk/assets/config/define.php
r1425230 r1581581 31 31 define('CENT_AI', false); 32 32 define('TEST_ENV', false); 33 define('CENTRORA_SUPOORT',"Please contact Centrora Support team to address this issues at : [email protected]"); 34 define("API_SERVER","https://www.centrora.com/accountApi/"); 35 33 36 require_once(dirname(__FILE__).ODS.'uri.php'); 34 37 if (class_exists('JConfig') || class_exists('SConfig') || (defined('OSE_SUITE') && OSE_SUITE == true)) -
ose-firewall/trunk/assets/config/joomla.php
r1442785 r1581581 26 26 if (!defined('OSE_FRAMEWORK') && !defined('OSEFWDIR') && !defined('_JEXEC')) 27 27 { 28 die('Direct Access Not Allowed');28 die('Direct Access Not Allowed'); 29 29 } 30 30 … … 37 37 38 38 if (class_exists('SConfig')) { 39 define('OSE_FWURL',OURI::root().'components/com_ose_firewall/'); 40 if(!defined('JOOMLA15')) 41 { 42 define('JOOMLA15',false); 43 } 44 $conf = new SConfig (); 45 if (!empty($conf->assets_url)) { 46 define('OSE_BANPAGE_ADMIN', $conf->assets_url.'administrator/components/com_ose_firewall/'); 47 } 48 else { 49 define('OSE_BANPAGE_ADMIN', str_replace('administrator/', '', OURI::root() ). 'administrator/components/com_ose_firewall/'); 50 } 51 define('CENTRORABACKUP_FOLDER', OSE_ABSPATH.ODS.'media'.ODS.'CentroraBackup'); 52 define('CENTRORABACKUP_ZIPFILE', OSE_ABSPATH.ODS.'media'.ODS.'CentroraBackup'.ODS.'Backup.zip'); 39 define('OSE_FWURL',OURI::root().'components/com_ose_firewall/'); 40 if(!defined('JOOMLA15')) 41 { 42 43 define('JOOMLA15',false); 44 } 45 if(!defined('JOOMLA25')) 46 { 47 define('JOOMLA25',true); 48 } 49 if(!defined('JOOMLA3')) 50 { 51 define('JOOMLA3',false); 52 } 53 54 $conf = new SConfig (); 55 if (!empty($conf->assets_url)) { 56 define('OSE_BANPAGE_ADMIN', $conf->assets_url.'administrator/components/com_ose_firewall/'); 57 } 58 else { 59 define('OSE_BANPAGE_ADMIN', str_replace('administrator/', '', OURI::root() ). 'administrator/components/com_ose_firewall/'); 60 } 61 define('CENTRORABACKUP_FOLDER', OSE_ABSPATH.ODS.'media'.ODS.'CentroraBackup'); 62 define('CENTRORABACKUP_ZIPFILE', OSE_ABSPATH.ODS.'media'.ODS.'CentroraBackup'.ODS.'Backup.zip'); 53 63 } 54 64 else { 55 if (class_exists ('JURI')) { 56 define('OSE_FWURL',JURI::root().'administrator/components/com_ose_firewall/'); 57 } 58 else { 59 define('OSE_FWURL',OURI::root().'components/com_ose_firewall/'); 60 } 61 if (class_exists('JVersion')) { 62 $version = new JVersion(); 63 $version = substr($version->getShortVersion(),0,3); 64 if(!defined('JOOMLA15')) 65 { 66 $value = ($version >= '1.5' && $version < '1.6')?true:false; 67 define('JOOMLA15',$value); 68 } 69 } 70 else { 71 define('JOOMLA15',false); 72 } 73 define('OSE_BANPAGE_ADMIN', str_replace('administrator/', '', OURI::root() ). 'administrator/components/com_ose_firewall'); 74 define('CENTRORABACKUP_FOLDER', JPATH_SITE.ODS.'media'.ODS.'CentroraBackup'); 75 define('CENTRORABACKUP_ZIPFILE', JPATH_SITE.ODS.'media'.ODS.'CentroraBackup'.ODS.'Backup.zip'); 65 if (class_exists ('JURI')) { 66 define('OSE_FWURL',JURI::root().'administrator/components/com_ose_firewall/'); 67 } 68 else { 69 define('OSE_FWURL',OURI::root().'components/com_ose_firewall/'); 70 } 71 if (class_exists('JVersion')) { 72 $version = new JVersion(); 73 $version = substr($version->getShortVersion(),0,3); 74 if($version >='2.0' && $version <'3.0') 75 { 76 define('JOOMLA25',true); 77 }else if($version >= '3.0') 78 { 79 define('JOOMLA3',true); 80 } 81 if(!defined('JOOMLA15')) 82 { 83 $value = ($version >= '1.5' && $version < '1.6')?true:false; 84 define('JOOMLA15',$value); 85 } 86 } 87 else { 88 define('JOOMLA15',false); 89 } 90 define('OSE_BANPAGE_ADMIN', str_replace('administrator/', '', OURI::root() ). 'administrator/components/com_ose_firewall'); 91 define('CENTRORABACKUP_FOLDER', JPATH_SITE.ODS.'media'.ODS.'CentroraBackup'); 92 define('CENTRORABACKUP_ZIPFILE', JPATH_SITE.ODS.'media'.ODS.'CentroraBackup'.ODS.'Backup.zip'); 76 93 } 77 94 define('OSE_BANPAGE_URL', OSE_BANPAGE_ADMIN . ODS . 'public'); … … 88 105 define('OSE_WPURL',rtrim(OURI::base(), '/') ); 89 106 define('OSE_ADMINURL', OSE_WPURL.'/index.php?option=com_ose_firewall'); 90 define('OSE_FWRECONTROLLERS' , OSEFWDIR . 'classes' .ODS. 'App' . ODS . 'Controller' . ODS . 'remoteControllers'); 107 define('OSE_FWRECONTROLLERS' , OSEFWDIR . 'classes' .ODS. 'App' . ODS . 'Controller' . ODS . 'remoteControllers'); 91 108 define('OSE_FWCONTROLLERS', OSEFWDIR . 'protected' . ODS . 'controllers'); 92 109 define('OSE_FWMODEL', OSEFWDIR . 'classes' . ODS.'App' . ODS . 'Model'); 93 define('OSE_FWFRAMEWORK', OSEFWDIR . ODS . 'classes' . ODS.'Library'); 110 define('OSE_FWFRAMEWORK', OSEFWDIR . ODS . 'classes' . ODS.'Library'); 94 111 define('OSE_FWPUBLIC', OSEFWDIR . ODS . 'public'); 95 112 define('OSE_FWPUBLICURL', OSE_FWURL . 'public'); … … 120 137 define('OSE_FWDATA', OSEFWDIR . 'protected' . ODS.'data'); 121 138 139 define('OSE_ADVANCEDRULES_TEMPFILE',CENTRORABACKUP_FOLDER.ODS."advancedrulestemp.php"); 140 define('OSE_ADVANCEDRULES_RULESFILE',CENTRORABACKUP_FOLDER.ODS."2a9rKzWuOFWao.inc"); 141 define('OSE_WEBLOGFOLDER',CENTRORABACKUP_FOLDER.ODS.'Weblog'); 142 define('OSE_WEBLOG_BACKUPFOLDER',CENTRORABACKUP_FOLDER.ODS.'WeblogBackup'); 143 define('OSE_WEBLOG_ZIP_PATH',OSE_WEBLOG_BACKUPFOLDER.ODS.'weblog.tar.gz'); 144 define('OSE_WEBLOG_ZIP_DESTINATIONPATH',CENTRORABACKUP_FOLDER.ODS.'Weblog'); 145 define('OSE_BRUTEFORCE_ATTEMPTS',CENTRORABACKUP_FOLDER.ODS.'bruteforceattempts.php'); 146 define('OSE_VIRUSPATTERN_FILE',OSE_FWDATA . ODS . "vsscanPath" . ODS . "pattern.php"); 147 define('OSE_WHITELIST_STRINGFILE',CENTRORABACKUP_FOLDER.ODS.'whiteliststring.php'); 148 define('OSE_WHITELIST_VARIABLESFILE',CENTRORABACKUP_FOLDER.ODS.'whitelistvariables.php'); 149 define('OSE_FWSCANNERV7_ERRORLOG',OSE_WEBLOGFOLDER.ODS.'errorlog.php'); 150 define('OSE_CSV_EXPORTFILES', OSE_CONTENTFOLDER.ODS."csv"); 151 define('EXPORT_DOWNLOAD_URL_FWS7', '?option=com_ose_firewall&view=ipmanagement&task=downloadCSV&action=downloadCSV&controller=IpManagement&filename='); 152 define('OSE_WEBLOG_TEMP_FOLDER',OSE_WEBLOGFOLDER.ODS.'logBackup'); 153 define('OSE_CLASSICBACKUP_DBTABLESLIST',CENTRORABACKUP_FOLDER.'dbtableslist.php'); 122 154 123 155 ?> -
ose-firewall/trunk/assets/views/cfscan.php
r1387925 r1581581 10 10 ?> 11 11 <div id="oseappcontainer"> 12 <div class="container ">12 <div class="container wrapbody"> 13 13 <?php 14 14 $this->model->showLogo(); 15 $this->model->showHeader();15 // $this->model->showHeader(); 16 16 ?> 17 17 <div class="row"> … … 19 19 <div class="panel panel-primary plain "> 20 20 <!-- Start .panel --> 21 <div class="panel-heading"> 22 23 </div> 24 <div class="panel-body"> 21 <div class="panel-body wrap-container"> 22 <div class="row row-set"> 23 <div class="col-sm-12 p-l-r-0"style="padding-right: 17px;"> 24 <div id="c-tag" style="height: 110px;"> 25 <div class="col-sm-12" style="padding-left: 0px;"> 26 <span class="tag-title">Core Directories Scanner<span> 27 </div> 28 <p class="tag-content">Core directories Scanner is a neat and quick detector, it scans the core directories of your website and detects suspicious files. Please notice that this scanner only applies to joomla and wordpress.</p> 29 </div> 30 </div> 31 </div> 32 25 33 <div class="row"> 26 <div id="scan-window" class="col-md-12"> 27 <div id='scan_progress' class="alert alert-info fade in"> 28 <div class="bg-primary alert-icon"> 29 <i class="glyphicon glyphicon-info-sign s24"></i> 30 </div> 34 <div id="scan-window" class="col-md-12" style="padding-right: 16px; padding-left: 20px;"> 35 <div id='scan_progress' class="alert alert-info fade in" style="padding-top:20px;"> 31 36 <strong>Status: </strong> <span id="p4text"></span> 32 33 <div id='summary' class='col-md-12'> </div> 34 <div id='modified' class='col-md-12'> </div> 35 <div id='suspicious' class='col-md-12'> </div> 36 <div id='missing' class='col-md-12'> </div> 37 </div> 38 </div> 39 </div> 40 <div class="row"> 37 <div class="col-sm-12" style="margin-top: 0px; padding:40px 15px 20px 0px; color: white;"> 38 <div id='modified' class='col-md-4' style="padding-left: 0px;"> </div> 39 <div id='suspicious' class='col-md-4' style="padding-left: 0px;"> </div> 40 <div id='missing' class='col-md-4' style="padding-left: 0px;"> </div> 41 <!-- <div id='summary' class='col-md-3'> </div>--> 42 </div> 43 </div> 44 </div> 45 </div> 46 <div class="row col-sm-12" style="padding-right: 20px;"> 41 47 <div id="scanbuttons"> 42 48 <?php if (class_exists('SConfig')) { ?> … … 46 52 </button> 47 53 <?php } else { ?> 48 <button id="cfscan" onclick="cfscan()" class=' centrora-btn'><i54 <button id="cfscan" onclick="cfscan()" class='btn-new result-btn-set'><i 49 55 id="ic-change" class="glyphicon glyphicon-search text-primary"></i> <?php oLang::_('START_NEW_SCAN') ?> 50 56 </button> … … 58 64 </div> 59 65 </div> 66 <?php 67 $oem = new CentroraOEM(); 68 $oemCustomer = $oem->hasOEMCustomer(); 69 if(!empty($oemCustomer['data']['customer_id'])) { 70 echo $oem->getCallToActionAndFooter(); 71 }else {?> 72 <?php echo $this->model->getCallToActionAndFooter(); }?> 73 </div> 60 74 </div> 61 75 </div> … … 73 87 ?> 74 88 <div id="oseappcontainer"> 75 <div class="container ">89 <div class="container wrapbody"> 76 90 <?php 77 91 $this->model->showLogo(); 78 92 ?> 79 <div id="sub-header" class="row" 80 style="background:url('<?php echo 'http://www.googledrive.com/host/0B4Hl9YHknTZ4X2sxNTEzNTBJUlE/sub_hd_bg.png' ?>') top center; min-height:500px;"> 81 <div class="col-md-6" id="unsub-left"> 82 <?php $this->model->showSubHeader(); ?> 83 <?php echo $this->model->getBriefDescription(); ?> 93 94 <div class="row"> 95 <div class="col-md-12"> 96 <div class="panel panel-primary plain "> 97 <!-- Start .panel --> 98 <div class="panel-body wrap-container"> 99 <!-- start subscription popup--> 100 101 <!-- end subscription popup--> 102 <div class="row row-set"> 103 <div class="col-sm-12 p-l-r-0"style="padding-right: 17px;"> 104 <div id="c-tag" style="height: 110px;"> 105 <div class="col-sm-12" style="padding-left: 0px;"> 106 <span class="tag-title">Core Directories Scanner<span> 107 </div> 108 <p class="tag-content">Core directories Scanner is a neat and quick detector, it scans the core directories of your website and detects suspicious files. Please notice that this scanner only applies to joomla and wordpress.</p> 109 </div> 110 </div> 111 </div> 112 113 <div class="row"> 114 <div id="scan-window" class="col-md-12" style="padding-right: 16px; padding-left: 20px;"> 115 <div id='scan_progress' class="alert alert-info fade in" style="padding-top:20px;"> 116 <strong>Status: </strong> <span id="p4text"></span> 117 <div class="col-sm-12" style="margin-top: 0px; padding:40px 15px 20px 0px; color: white;"> 118 <div class="col-md-4"style="padding-left: 0px;"> 119 <div id='modified'> </div> 120 <div class="btn-new btn-checkfilepath col-sm-7">Check file full path</div> 121 </div> 122 <div class="col-md-4" style="padding-left: 0px;"> 123 <div id='suspicious'> </div> 124 <div class="btn-new btn-checkfilepath col-sm-7">Check file full path</div> 125 </div> 126 <div class="col-md-4" style="padding-left: 0px;"> 127 <div id='missing' class='col-md-4' style="padding-left: 0px;"> </div> 128 </div> 129 <!-- <div id='summary' class='col-md-3'> </div>--> 130 </div> 131 </div> 132 </div> 133 </div> 134 <div class="row col-sm-12" style="padding-right: 20px;"> 135 <div id="scanbuttons"> 136 <?php if (class_exists('SConfig')) { ?> 137 <button data-target="#scanModal" data-toggle="modal" id="customscan" 138 class='btn btn-sm mr5 mb10'><i 139 class="glyphicon glyphicon-screenshot text-primary"></i> <?php oLang::_('START_NEW_SCAN') ?> 140 </button> 141 <?php } else { ?> 142 <button id="cfscan" onclick="cfscan()" class='btn-new result-btn-set'><i 143 id="ic-change" class="glyphicon glyphicon-search text-primary"></i> <?php oLang::_('START_NEW_SCAN') ?> 144 </button> 145 <?php } 146 if ($_GET['centrora'] == 1) { ?> 147 <button id="catchVirusMD5" onclick="catchVirusMD5()" 148 class='btn btn-sm mr5 mb10'><i 149 class="glyphicon glyphicon-search text-primary"></i> <?php oLang::_('CATCH_VIRUS_MD5') ?> 150 </button> 151 <?php } ?> 152 </div> 153 </div> 154 <div class="row row-set"> 155 <div class="col-sm-12" style="margin-top:30px; padding-left: 0px; padding-right: 20px;"> 156 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 157 <div class="call-to-action-txt"> 158 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 159 Leave the Time-Consuming Anti-Hacking and Malware Scanning to the Automate Centrora Security Solutions <sup>Now</sup></div> 160 </div></a> 161 </div> 162 </div> 163 <div class="row"> 164 <div id="footer" class="col-sm-12"> 165 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 166 </div> 167 </div> 168 </div> 169 </div> 84 170 </div> 85 <div class="col-md-6" id="unsub-right"> 86 <a href="https://www.centrora.com/malware-removal" id="leavetous">leave the work to us now</a> 87 </div> 88 </div> 89 <div class="row"> 90 <div id="unsub-lower"> 91 <?php 92 include_once dirname(__FILE__) . '/calltoaction.php'; 93 ?> 94 </div> 95 </div> 171 172 </div> 173 174 96 175 </div> 97 176 </div> -
ose-firewall/trunk/assets/views/dashboard.php
r1425230 r1581581 8 8 ?> 9 9 <div> 10 <input type="hidden" id="guideStatus" value = "<?php echo $guideStatus; ?>" />10 <input type="hidden" id="guideStatus" value = "<?php echo $guideStatus; ?>" /> 11 11 </div> 12 <div id="oseappcontainer"> 13 <div class="container"> 14 <?php 15 $this->model->showLogo(); 16 $this->model->showHeader(); 17 ?> 18 <div class="row"> 19 <div class="<?php 20 $numCol = ($hasOEMCustomer == false) ? 12 : 12; 21 echo 'col-md-' . $numCol; 22 ?>"> 23 <div class="col-md-3"> 24 <div class="panel panel-success"> 25 <!-- <div class="panel-heading">Panel heading without title</div>--> 26 <div class="panel-body" id="dashmenu" style="min-height: 300px;"> 27 <a href="javascript:void(0)" id="btn_country" 28 class="col-md-12"><?php oLang::_('OVERVIEW_COUNTRY_MAP_BTN'); ?></a> 29 <a href="javascript:void(0)" id="btn_traffic" 30 class="col-md-12"><?php oLang::_('OVERVIEW_TRAFFICS_BTN'); ?></a> 31 <a href="javascript:void(0)" id="btn_recentscan" 32 class="col-md-12"><?php oLang::_('RECENT_SCANNING_RESULT_BTN'); ?></a> 33 <a href="javascript:void(0)" id="btn_recenthack" 34 class="col-md-12"><?php oLang::_('RECENT_HACKING_INFO_BTN'); ?></a> 35 <a href="javascript:void(0)" id="btn_backup" 36 class="col-md-12"><?php oLang::_('RECENT_BACKUP_BTN'); ?></a> 37 </div> 38 <div id="dashboardStyle"> 39 Style:<br> 40 <select id="style" value="dynamic"> 41 <option value="dynamic" selected="<?php $dynamic_default; ?>">dynamic</option> 42 <option value="classic">classic</option> 43 </select> 44 <button id="guide-btn">Guide</button> 45 </div> 46 </div> 47 </div> 48 <div class="col-md-9" id="overview_country" style="display: block;"> 49 <div class="bs-component"> 50 <div class="panel panel-teal"> 51 <div class="panel-heading"> 52 <h3 class="panel-title" 53 id="map-title"><?php oLang::_('OVERVIEW_COUNTRY_MAP'); ?></h3> 12 <div id="oseappcontainer"> 13 <div class="container wrapbody"> 14 <?php 15 $this->model->showLogo(); 16 // $this->model->showHeader(); 17 ?> 18 <div class="row" id="dashboard"> 19 <div class="<?php 20 $numCol = ($hasOEMCustomer == false) ? 12 : 12; 21 echo 'col-md-' . $numCol; 22 ?>"> 23 <div class="col-sm-12 wrap-container" style="padding:40px 35px;"> 24 <div class="col-sm-12" style="background:white; opacity: 0.7;"> 25 <div class="col-md-3"> 26 <div class="panel panel-success"> 27 <!-- <div class="panel-heading">Panel heading without title</div>--> 28 <div class="panel-body" id="dashmenu" style="min-height: 300px; margin-left:-45px; "> 29 <a href="javascript:void(0)" id="btn_country" 30 class="col-md-12"><?php oLang::_('OVERVIEW_COUNTRY_MAP_BTN'); ?></a> 31 <a href="javascript:void(0)" id="btn_traffic" 32 class="col-md-12"><?php oLang::_('OVERVIEW_TRAFFICS_BTN'); ?></a> 33 <a href="javascript:void(0)" id="btn_recentscan" 34 class="col-md-12"><?php oLang::_('RECENT_SCANNING_RESULT_BTN'); ?></a> 35 <a href="javascript:void(0)" id="btn_recenthack" 36 class="col-md-12"><?php oLang::_('RECENT_HACKING_INFO_BTN'); ?></a> 37 <a href="javascript:void(0)" id="btn_backup" 38 class="col-md-12"><?php oLang::_('RECENT_BACKUP_BTN'); ?></a> 54 39 </div> 55 <div class="panel-body"> 56 <div id="world-map"></div> 40 <div id="dashboardStyle"> 41 Style:<br> 42 <select id="style" value="dynamic"> 43 <option value="dynamic" selected="<?php $dynamic_default; ?>">dynamic</option> 44 <option value="classic">classic</option> 45 </select> 46 <button id="guide-btn">Guide</button> 57 47 </div> 58 48 </div> 59 49 </div> 60 </div> 61 <div class="col-md-9" id="overview_traffic" style="display: none;"> 62 <div class="bs-component"> 63 <div class="panel panel-teal"> 64 <div class="panel-heading"> 65 <h3 class="panel-title"><?php oLang::_('OVERVIEW_TRAFFICS'); ?></h3> 66 </div> 67 <div class="panel-body"> 68 <div id="traffic-overview" style="width: 100%; height:290px;"></div> 50 <div class="col-md-9" id="overview_country" style="display: block;"> 51 <div class="bs-component"> 52 <div class="panel panel-teal"> 53 <div class="panel-heading"> 54 <h3 class="panel-title" 55 id="map-title"><?php oLang::_('OVERVIEW_COUNTRY_MAP'); ?></h3> 56 </div> 57 <div class="panel-body"> 58 <div id="world-map"></div> 59 </div> 69 60 </div> 70 61 </div> 71 62 </div> 72 </div> 63 <div class="col-md-9" id="overview_traffic" style="display: none;"> 64 <div class="bs-component"> 65 <div class="panel panel-teal"> 66 <div class="panel-heading"> 67 <h3 class="panel-title"><?php oLang::_('OVERVIEW_TRAFFICS'); ?></h3> 68 </div> 69 <div class="panel-body"> 70 <div id="traffic-overview" style="width: 100%; height:290px;"></div> 71 </div> 72 </div> 73 </div> 74 </div> 73 75 74 <div class="col-md-9" id="recent_scan" style="display: none;"> 75 <div class="bs-component"> 76 <div class="panel panel-teal"> 77 <div class="panel-heading"> 78 <h3 class="panel-title"><a 79 href="<?php $this->model->getPageUrl('scanResult'); ?>"><?php oLang::_('RECENT_SCANNING_RESULT'); ?></a> 80 </h3> 76 <div class="col-md-9" id="recent_scan" style="display: none;"> 77 <div class="bs-component"> 78 <div class="panel panel-teal"> 79 <div class="panel-heading"> 80 <h3 class="panel-title"><a 81 href="<?php $this->model->getPageUrl('scanResult'); ?>"><?php oLang::_('RECENT_SCANNING_RESULT'); ?></a> 82 </h3> 83 </div> 84 <div class="panel-body"> 85 <div class='col-md-8'>Last Scanned: 86 <strong id='lastScanned' class="text-warning"></strong> 87 </div> 88 <div class='col-md-8'>File Scanned: 89 <strong id='numScanned' class="text-warning"></strong> 90 </div> 91 <div class='col-md-8'>Virus Found: 92 <strong id='numinfected' class="text-danger"></strong> 93 </div> 94 </div> 81 95 </div> 82 <div class="panel-body"> 83 <div class='col-md-8'>Last Scanned: 84 <strong id='lastScanned' class="text-warning"></strong> 96 </div> 97 </div> 98 99 <div id="ipmange-speech-bubble" class="col-md-9" style="display: none;"> 100 <div class="bs-component"> 101 <div class="panel panel-teal"> 102 <div class="panel-heading"> 103 <h3 class="panel-title"><a 104 href="<?php $this->model->getPageUrl('ipmanage'); ?>"><?php oLang::_('RECENT_HACKING_INFO'); ?></a> 105 </h3> 85 106 </div> 86 <div class='col-md-8'>File Scanned: 87 <strong id='numScanned' class="text-warning"></strong> 107 <div class="panel-body"> 108 <table class="table display" id="IPsTable"> 109 <thead> 110 <tr> 111 <th><?php oLang::_('O_DATE'); ?></th> 112 <th><?php oLang::_('O_START_IP'); ?></th> 113 <th><?php oLang::_('O_RISK_SCORE'); ?></th> 114 <th><?php oLang::_('O_STATUS'); ?></th> 115 </tr> 116 </thead> 117 </table> 88 118 </div> 89 <div class='col-md-8'>Virus Found: 90 <strong id='numinfected' class="text-danger"></strong> 119 </div> 120 </div> 121 </div> 122 <div class="col-md-9" id="recent_backup" style="display: none;"> 123 <div class="bs-component"> 124 <div class="panel panel-teal"> 125 <div class="panel-heading"> 126 <h3 class="panel-title"><a 127 href="<?php $this->model->getPageUrl('backup'); ?>"><?php oLang::_('RECENT_BACKUP'); ?></a> 128 </h3> 129 </div> 130 <div class="panel-body"> 131 <table class="table display" id="backupTable"> 132 <thead> 133 <tr> 134 <th><?php oLang::_('O_BACKUPFILE_ID'); ?></th> 135 <th><?php oLang::_('O_BACKUPFILE_DATE'); ?></th> 136 <th><?php oLang::_('O_BACKUPFILE_NAME'); ?></th> 137 <th><?php oLang::_('O_BACKUPFILE_TYPE'); ?></th> 138 </tr> 139 </thead> 140 </table> 91 141 </div> 92 142 </div> … … 95 145 </div> 96 146 97 <div id="ipmange-speech-bubble" class="col-md-9" style="display: none;"> 98 <div class="bs-component"> 99 <div class="panel panel-teal"> 100 <div class="panel-heading"> 101 <h3 class="panel-title"><a 102 href="<?php $this->model->getPageUrl('ipmanage'); ?>"><?php oLang::_('RECENT_HACKING_INFO'); ?></a> 103 </h3> 104 </div> 105 <div class="panel-body"> 106 <table class="table display" id="IPsTable"> 107 <thead> 108 <tr> 109 <th><?php oLang::_('O_DATE'); ?></th> 110 <th><?php oLang::_('O_START_IP'); ?></th> 111 <th><?php oLang::_('O_RISK_SCORE'); ?></th> 112 <th><?php oLang::_('O_STATUS'); ?></th> 113 </tr> 114 </thead> 115 </table> 116 </div> 117 </div> 118 </div> 119 </div> 120 <div class="col-md-9" id="recent_backup" style="display: none;"> 121 <div class="bs-component"> 122 <div class="panel panel-teal"> 123 <div class="panel-heading"> 124 <h3 class="panel-title"><a 125 href="<?php $this->model->getPageUrl('backup'); ?>"><?php oLang::_('RECENT_BACKUP'); ?></a> 126 </h3> 127 </div> 128 <div class="panel-body"> 129 <table class="table display" id="backupTable"> 130 <thead> 131 <tr> 132 <th><?php oLang::_('O_BACKUPFILE_ID'); ?></th> 133 <th><?php oLang::_('O_BACKUPFILE_DATE'); ?></th> 134 <th><?php oLang::_('O_BACKUPFILE_NAME'); ?></th> 135 <th><?php oLang::_('O_BACKUPFILE_TYPE'); ?></th> 136 </tr> 137 </thead> 138 </table> 139 </div> 140 </div> 141 </div> 142 </div> 147 <!-- <div class="col-sm-12" style="padding:0px; margin-top:24px;">--> 148 <!-- <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action">--> 149 <!-- <div class="call-to-action-txt">--> 150 <!-- <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> --> 151 <!-- Leave the Time-Consuming Anti-Hacking and Malware Scanning to the Automate Centrora Security Solutions <sup>Now</sup></div>--> 152 <!-- </div></a>--> 153 <!-- </div>--> 154 <!----> 155 <!-- <div class="row">--> 156 <!-- <div id="footer" class="col-sm-12">--> 157 <!-- <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div>--> 158 <!-- </div>--> 159 <!-- </div>--> 160 161 162 <?php 163 $oem = new CentroraOEM(); 164 $oemCustomer = $oem->hasOEMCustomer(); 165 if(!empty($oemCustomer['data']['customer_id'])) { 166 echo $oem->getCallToActionAndFooter(); 167 }else {?> 168 <?php echo $this->model->getCallToActionAndFooter(); }?> 169 </div> 170 143 171 </div> 144 172 </div> 145 173 </div> 146 174 </div> 147 <div id='fb-root'></div> 175 </div> 176 </div> 177 <div id='fb-root'></div> 148 178 149 179 -
ose-firewall/trunk/assets/views/fpscan.php
r1387925 r1581581 6 6 ?> 7 7 <div id="oseappcontainer"> 8 <div class="container ">8 <div class="container wrapbody"> 9 9 <?php 10 10 $this->model->showLogo(); 11 $this->model->showHeader();11 // $this->model->showHeader(); 12 12 ?> 13 13 … … 16 16 <div class="panel panel-primary plain "> 17 17 <!-- Start .panel --> 18 <div class="panel-heading"> 19 20 </div> 21 <div class="panel-body"> 18 19 <div class="panel-body wrap-container"> 20 <div class="row row-set"> 21 <div class="col-sm-3 p-l-r-0"> 22 <div id="c-tag" style="height:170px;"> 23 <div class="col-sm-12" style="padding-left: 0px; line-height: 20px;"> 24 <span class="tag-title">File Permissions Scanner<span> 25 </div> 26 <p class="tag-content">File Permissions Scanner can detect files with insecure file permission. You can set base file/folder permissions, the scanner will scan for files and folders that have higher permissions than given base permissions.</p> 27 </div> 28 </div> 29 <div class="col-sm-4"> 30 <div class="vs-line-1" style="padding-top: 28px;"> 31 <div class="vs-line-1-number"> 32 <span class="scan-file-number" style="font-weight: 300; font-size: 18px;">Base file permission</span> 33 </div> 34 <div class="vs-line-1-title" style="padding-top: 0px;"> 35 <input title="default file permission is 0644" type="text" name="filePerm" placeholder="0644" id="filePerm" pattern="^[0-7]{3}$"> 36 </div> 37 </div> 38 </div> 39 <div class="col-sm-4"> 40 <div class="vs-line-1" style="padding-top: 28px;"> 41 <div class="vs-line-1-number"> 42 <span class="scan-file-number" style="font-weight: 300; font-size: 18px;">Base folder permission</span> 43 </div> 44 <div class="vs-line-1-title" style="padding-top: 0px;"> 45 <input title="default folder permission is 0755" type="text" name="folderPerm" 46 placeholder="0755" 47 id="folderPerm" pattern="^[0-7]{3}$"> 48 </div> 49 </div> 50 </div> 51 </div> 52 53 <div class="row row-set" style="padding-right: 20px;"> 54 <div id="scan-date"></div> 55 </div> 56 22 57 <div class="row"> 23 <div id="scan-window" class="col-md-12" >58 <div id="scan-window" class="col-md-12" style=" padding:0px 20px;"> 24 59 <div id='scan_progress' class="alert alert-info fade in"> 25 60 <div class="row"> 26 <!-- <div class="col-md-1">--> 27 <!-- <div class="bg-primary alert-icon">--> 28 <!-- <i class="glyphicon glyphicon-info-sign s24"></i>--> 29 <!-- </div>--> 30 <!-- </div>--> 61 31 62 <div class="col-md-11"> 32 63 <div id="status_content" class="col-md-12" style="display: none;"> … … 44 75 </div> 45 76 <div id="last_batch" class='col-md-12'>Last Batch: 46 <strong id='last_file' class="text- success"></strong>77 <strong id='last_file' class="text-white" style="color:white;"></strong> 47 78 </div> 48 79 <div class='col-md-12'>Files Scanned: 49 <strong id='total_number' class="text-w arning"></strong>80 <strong id='total_number' class="text-white"></strong> 50 81 </div> 51 82 <div class='col-md-12'>Insecure permission Files: 52 <a href="#scanresult"><strong id='vs_num' class="text- danger"></strong></a>83 <a href="#scanresult"><strong id='vs_num' class="text-white"></strong></a> 53 84 </div> 54 85 <div id="surfcalltoaction" … … 64 95 </div> 65 96 </div> 66 <div class="pull-right"> 67 <i class="fa fa-clock-o"></i>Last Scan: 68 <strong id="scan-date" class="text-success"></strong> 69 </div> 70 </div> 71 </div> 72 </div> 73 <div class="row col-md-12"> 74 <div class="col-sm-3 col-md-offset-3"> 75 <label for="filePerm" 76 class="control-label"><?php oLang::_('O_BASE_FILEPERM'); ?></label> 77 <input title="default file permission is 0644" type="text" name="filePerm" 78 placeholder="0644" id="filePerm" pattern="^[0-7]{3}$"> 79 </div> 80 81 <div class="col-sm-3"> 82 <label for="folderPerm" 83 class="control-label"><?php oLang::_('O_BASE_FOLDERPERM'); ?></label> 84 <input title="default folder permission is 0755" type="text" name="folderPerm" 85 placeholder="0755" 86 id="folderPerm" pattern="^[0-7]{3}$"> 87 </div> 97 98 </div> 99 </div> 100 </div> 101 <div class="row col-md-12" style="padding-right: 20px;"> 88 102 <div id="scanbuttons"> 89 <button id="sfsstop" class=' centrora-btn' style="display: none">103 <button id="sfsstop" class='btn-new result-btn-set' style="display: none"> 90 104 <i id="ic-change" 91 105 class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?> 92 106 </button> 93 <button id="sfsstart" class=' centrora-btn'>107 <button id="sfsstart" class='btn-new result-btn-set'> 94 108 <i id="ic-change" 95 109 class="glyphicon glyphicon-play color-white"></i> <?php oLang::_('START_NEW_SCAN') ?> … … 97 111 <button data-target="#scanPathModal" data-toggle="modal" id="setscanpath" 98 112 title="<?php oLang::_('SETSCANPATH') ?>" 99 class=' centrora-btn'>113 class='btn-new result-btn-set'> 100 114 <i id="ic-change" class="glyphicon glyphicon-folder-close text-primary"></i> 101 115 Set Scan Path 102 116 </button> 103 <button class=" centrora-btn" type="button"117 <button class="btn-new result-btn-set" type="button" 104 118 onClick="location.href='<?php $this->model->getPageUrl('permconfig'); ?>'"><i 105 119 id="ic-change" … … 108 122 </div> 109 123 </div> 110 <div class="col-md-12" id="scan-result" class="row" style="display: none; ">111 <strong class="alert- danger">Insecure permission Files Detected!</strong>124 <div class="col-md-12" id="scan-result" class="row" style="display: none; color:white;"> 125 <strong class="alert-white" style="background: none;">Insecure permission Files Detected!</strong> 112 126 <strong class="col-md-12"> 113 127 <div class='col-md-8'>Path</div> … … 116 130 <div id="scan-result-panel"></div> 117 131 </div> 132 <?php 133 $oem = new CentroraOEM(); 134 $oemCustomer = $oem->hasOEMCustomer(); 135 if(!empty($oemCustomer['data']['customer_id'])) { 136 echo $oem->getCallToActionAndFooter(); 137 }else {?> 138 <?php echo $this->model->getCallToActionAndFooter(); }?> 139 </div> 118 140 </div> 119 141 </div> -
ose-firewall/trunk/assets/views/gitbackup.php
r1436160 r1581581 164 164 <!-- Panels Ends --> 165 165 <!-- Panels Ends --> 166 <div class="row row-set"> 167 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px; margin-top: 15px;"> 168 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 169 <div class="call-to-action-txt"> 170 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 171 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 172 </div></a> 173 </div> 174 </div> 175 <div class="row"> 176 <div id="footer" class="col-sm-12"> 177 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 178 </div> 179 </div> 166 <?php 167 $oem = new CentroraOEM(); 168 $oemCustomer = $oem->hasOEMCustomer(); 169 if(!empty($oemCustomer['data']['customer_id'])) { 170 echo $oem->getCallToActionAndFooter(); 171 }else {?> 172 <?php echo $this->model->getCallToActionAndFooter(); }?> 180 173 </div> 181 174 </div> … … 441 434 </div> 442 435 </div> 443 <div class="row row-set"> 444 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px; margin-top: 15px;"> 445 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 446 <div class="call-to-action-txt"> 447 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 448 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 449 </div></a> 450 </div> 451 </div> 452 <div class="row" style="margin-bottom: 15px;"> 453 <div id="footer" class="col-sm-12"> 454 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 455 </div> 456 </div> 436 <?php 437 $oem = new CentroraOEM(); 438 $oemCustomer = $oem->hasOEMCustomer(); 439 if(!empty($oemCustomer['data']['customer_id'])) { 440 echo $oem->getCallToActionAndFooter(); 441 }else {?> 442 <?php echo $this->model->getCallToActionAndFooter(); }?> 457 443 </div> 458 444 </div> -
ose-firewall/trunk/assets/views/mfscan.php
r1387925 r1581581 10 10 ?> 11 11 <div id="oseappcontainer"> 12 <div class="container ">12 <div class="container wrapbody"> 13 13 <?php $this->model->showLogo(); 14 $this->model->showHeader(); ?>14 // $this->model->showHeader(); ?> 15 15 <div class="row"> 16 16 <div class="col-md-12"> 17 17 <div class="panel panel-primary plain "> 18 18 <!-- Start .panel --> 19 <div class="panel-heading">20 19 21 </div> 22 <div class="panel-body"> 20 <div class="panel-body wrap-container"> 21 <div class="row row-set"> 22 <div class="col-sm-3 p-l-r-0"> 23 <div id="c-tag"> 24 <div class="col-sm-12" style="padding-left: 0px;"> 25 <span class="tag-title">Modified Files Scanner<span> 26 </div> 27 <p class="tag-content">The Modified Files Scanner can detect modified files within a certain time period and files which are symbolic links.</p> 28 </div> 29 </div> 30 <div class="col-sm-3"> 31 <div class="vs-line-1" style="padding-top: 28px;"> 32 <div class="vs-line-1-number"> 33 <span class="scan-file-number" style="font-weight: 300; font-size: 18px;">Set Start Date</span> 34 </div> 35 <div class="vs-line-1-title" style="padding-top: 0px;"><input id='datepicker1' type='text' name="startdate"/></div> 36 </div> 37 </div> 38 <div class="col-sm-3"> 39 <div class="vs-line-1" style="padding-top: 28px;"> 40 <div class="vs-line-1-number"> 41 <span class="scan-file-number" style="font-weight: 300; font-size: 18px;">Set End Date</span> 42 </div> 43 <div class="vs-line-1-title" style="padding-top: 0px;"><input id='datepicker2' type='text' name="enddate"/></div> 44 </div> 45 </div> 46 <div class="col-sm-3"> 47 <div class="vs-line-1"> 48 <div class="vs-line-1-title"> <i id="mod-scanner-ssl" class="cursor-pointer fa fa-square-o"><input type='checkbox' id="symlink"/></i></div> 49 <div class="vs-line-1-number"> 50 Scan Symbolic link 51 </div> 52 </div> 53 </div> 54 </div> 55 <div class="row row-set" style="padding-right: 20px;"> 56 <div id="scan-date"></div> 57 </div> 58 59 60 61 62 63 23 64 <div class="row"> 24 65 <!--Scan Status--> 25 <div id="scan-window" class="col-md-12" >66 <div id="scan-window" class="col-md-12" style="padding:0px 20px;"> 26 67 <div id='scan_progress' class="alert alert-info fade in"> 27 68 <div class="row"> 28 <div class="col-md-1"> 29 <div class="bg-primary alert-icon"> 30 <i class="glyphicon glyphicon-info-sign s24"></i> 31 </div> 32 </div> 33 <div class="col-md-8"> 69 <div class="col-md-12"> 34 70 <div id="status_content" class="col-md-12" style="display: none;"> 35 71 <div id='status' class='col-md-12'> 36 72 <strong>Status </strong> 37 38 <div class="progress progress-striped active"> 73 <div class="progress progress-striped active" style="width: 100%; margin-left:0px;"> 39 74 <div id="vs_progress" class="progress-bar" role="progressbar" 40 75 aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" … … 45 80 </div> 46 81 <div id="last_batch" class='col-md-12'>Last Batch: 47 <strong id='last_file' class="text- success"></strong>82 <strong id='last_file' class="text-white" style="color:white;"></strong> 48 83 </div> 49 84 <div class='col-md-12'># Scanned: 50 <strong id='total_number' class="text-w arning"></strong>85 <strong id='total_number' class="text-white"></strong> 51 86 </div> 52 87 <div class='col-md-12'># Modified Files: 53 <a href="#scanresult"><strong id='vs_num' class="text- danger"></strong></a>88 <a href="#scanresult"><strong id='vs_num' class="text-white"></strong></a> 54 89 </div> 55 90 <div id="surfcalltoaction" … … 61 96 </div> 62 97 <div id="scanpathtext" class='col-md-12' style="display: none;">Scan Path: 63 <label class="text- primary" id="selectedfile"></label>98 <label class="text-white" id="selectedfile"></label> 64 99 </div> 65 100 </div> 66 </div>67 <div class="pull-right">68 <i class="fa fa-clock-o"></i>Last Scan:69 <strong id="scan-date" class="text-success"></strong>70 101 </div> 71 102 </div> 72 103 </div> 73 104 </div> 74 105 75 106 <div class="row"> 76 <div class="col-md-3"> 77 <label for="datepicker1"><?php oLang::_('SETSTARTDATE'); ?></label> 78 <input id='datepicker1' type='text' name="startdate"/> 79 </div> 80 <div class="col-md-3"> 81 <label for="datepicker2"><?php oLang::_('SETENDDATE'); ?></label> 82 <input id='datepicker2' type='text' name="enddate"/> 83 </div> 84 85 <div class="col-md-2"> 86 <label for="symlink"><?php oLang::_('SYMLINK'); ?></label> 87 (<i class="im im-redo2 text-warning"></i>) 88 <input type='checkbox' id="symlink"/> 89 </div> 90 91 <div id="scanbuttons"> 92 <button id="sfsstop" class='btn btn-sm mr5 mb10' style="display: none;"> 107 <div id="scanbuttons" class="col-sm-12" style="padding:0px 20px; margin-top:5px;"> 108 <button id="sfsstop" class='btn-new result-btn-set' style="display: none;"> 93 109 <i class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?> 94 110 </button> 95 <button id="sfsstart" class=' centrora-btn'>111 <button id="sfsstart" class='btn-new result-btn-set'> 96 112 <i id="ic-change" class="glyphicon glyphicon-play color-green"></i> <?php oLang::_('START_NEW_SCAN') ?> 97 113 </button> 98 114 <button data-target="#scanPathModal" data-toggle="modal" id="setscanpath" 99 115 title="<?php oLang::_('SETSCANPATH') ?>" 100 class='pull-right btn btn-config btn-sm mr5'>101 <i class="glyphicon glyphicon-folder-close text-primary"></i> 116 class='pull-right btn-new result-btn-set'> 117 <i class="glyphicon glyphicon-folder-close text-primary"></i> Set Scan Path 102 118 </button> 103 119 </div> 104 120 </div> 105 <div class="row">106 <div id="mfiles-results">107 <?php108 $filePath = OSE_FWDATA . ODS . "vsscanPath" . ODS . "mfList.inc";109 if (file_exists($filePath)) {110 oseFirewall::loadFiles();111 $data = str_replace("\n", '<br/>',oseFile::read($filePath));112 echo $data;113 }114 ?>115 </div>121 <div class="row"> 122 <div id="mfiles-results"> 123 <?php 124 $filePath = OSE_FWDATA . ODS . "vsscanPath" . ODS . "mfList.inc"; 125 if (file_exists($filePath)) { 126 oseFirewall::loadFiles(); 127 $data = str_replace("\n", '<br/>',oseFile::read($filePath)); 128 echo $data; 129 } 130 ?> 131 </div> 116 132 </div> 117 133 <div class="col-md-12" id="scan-result" class="row" style="display: none;"> … … 124 140 <div id="scan-result-panel"></div> 125 141 </div> 142 <?php 143 $oem = new CentroraOEM(); 144 $oemCustomer = $oem->hasOEMCustomer(); 145 if(!empty($oemCustomer['data']['customer_id'])) { 146 echo $oem->getCallToActionAndFooter(); 147 }else {?> 148 <?php echo $this->model->getCallToActionAndFooter(); }?> 149 </div> 126 150 </div> 127 151 </div> 128 152 </div> 153 129 154 <!--Scan Path Modal--> 130 155 <div class="modal fade" id="scanPathModal" tabindex="-1" role="dialog" aria-hidden="true"> … … 154 179 <div class="form-group"> 155 180 <div> 156 <button type="button" class="btn btn-sm" id='save-button'><i class="glyphicon glyphicon-save text-success"></i> Set Path181 <button type="button" class="btn-new result-btn-set" id='save-button'><i class="glyphicon glyphicon-save text-white"></i> Set Path 157 182 </button> 158 183 </div> -
ose-firewall/trunk/assets/views/oem/236/login.php
r1387925 r1581581 7 7 <div class="container"> 8 8 <?php 9 $this->model->showLogo (); 10 $this->model->showHeader(); 9 $oem = new CentroraOEM(); 10 $oemCustomer = $oem->hasOEMCustomer(); 11 if(!empty($oemCustomer['data']['customer_id'])) { 12 $this->model->showLogo (); 13 echo $oem->showLoginHeader(); 14 }else { 15 $this->model->showLogo (); 16 $this->model->showHeader(); 17 } 11 18 ?> 12 19 <div class="row"> -
ose-firewall/trunk/assets/views/oem/547/login.php
r1387925 r1581581 7 7 <div class="container"> 8 8 <?php 9 $this->model->showLogo (); 10 $this->model->showHeader(); 9 $oem = new CentroraOEM(); 10 $oemCustomer = $oem->hasOEMCustomer(); 11 if(!empty($oemCustomer['data']['customer_id'])) { 12 $this->model->showLogo (); 13 echo $oem->showLoginHeader(); 14 }else { 15 $this->model->showLogo (); 16 $this->model->showHeader(); 17 } 11 18 ?> 12 19 <div class="row"> -
ose-firewall/trunk/assets/views/oem/981/login.php
r1387925 r1581581 7 7 <div class="container"> 8 8 <?php 9 $this->model->showLogo (); 10 $this->model->showHeader(); 9 $oem = new CentroraOEM(); 10 $oemCustomer = $oem->hasOEMCustomer(); 11 if(!empty($oemCustomer['data']['customer_id'])) { 12 $this->model->showLogo (); 13 echo $oem->showLoginHeader(); 14 }else { 15 $this->model->showLogo (); 16 $this->model->showHeader(); 17 } 11 18 ?> 12 19 <div class="row"> -
ose-firewall/trunk/assets/views/scanreport.php
r1436160 r1581581 137 137 </table> 138 138 </div> 139 <div class="row row-set"> 140 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px; margin-top: 15px;"> 141 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 142 <div class="call-to-action-txt"> 143 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 144 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 145 </div></a> 146 </div> 147 </div> 148 <div class="row"> 149 <div id="footer" class="col-sm-12"> 150 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 151 </div> 152 </div> 139 140 <?php 141 $oem = new CentroraOEM(); 142 $oemCustomer = $oem->hasOEMCustomer(); 143 if(!empty($oemCustomer['data']['customer_id'])) { 144 echo $oem->getCallToActionAndFooter(); 145 }else {?> 146 <?php echo $this->model->getCallToActionAndFooter(); }?> 153 147 </div> 154 148 </div> … … 301 295 </table> 302 296 </div> 303 <div class="row row-set"> 304 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px; margin-top: 15px;"> 305 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 306 <div class="call-to-action-txt"> 307 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 308 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 309 </div></a> 310 </div> 311 </div> 312 <div class="row" style="margin-bottom: 15px;"> 313 <div id="footer" class="col-sm-12"> 314 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 315 </div> 316 </div> 297 298 299 300 <?php 301 $oem = new CentroraOEM(); 302 $oemCustomer = $oem->hasOEMCustomer(); 303 if(!empty($oemCustomer['data']['customer_id'])) { 304 echo $oem->getCallToActionAndFooter(); 305 }else {?> 306 <?php echo $this->model->getCallToActionAndFooter(); }?> 307 </div> 308 309 317 310 </div> 318 311 -
ose-firewall/trunk/assets/views/surfscan.php
r1425230 r1581581 10 10 $msg = $this->model->checkMD5DBUpToDate(); 11 11 ?> 12 <div id="oseappcontainer"> 13 <div class="container"> 14 <?php $this->model->showLogo(); $this->model->showHeader(); ?> 15 <div class="row"> 16 <div class="col-md-12"> 17 <div class="panel panel-primary plain "> 18 <!-- Start .panel --> 19 <div class="panel-heading"> 12 <div id="oseappcontainer"> 13 <div class="container wrapbody"> 14 <?php $this->model->showLogo(); 15 // $this->model->showHeader(); 16 ?> 17 <div class="row"> 18 <div class="col-md-12"> 19 <div class="panel panel-primary plain "> 20 <!-- Start .panel --> 20 21 21 </div> 22 <div class="panel-body"> 23 <div class="row"> 24 <div id="time-bar"><?php echo $msg['msg'] ?></div> 25 <!--Scan Status--> 26 <div id="scan-window" class="col-md-12"> 27 <button id = "updateMD5Sig" title="Update MD5 Signatures" type="button" class="pull-right btn btn-config btn-sm mr5"> 28 <i class="glyphicon glyphicon-refresh color-blue"></i> 29 </button> 30 <div id='scan_progress' class="alert alert-info fade in"> 31 <div class="row"> 32 <div class="col-md-1"> 33 <div class="bg-primary alert-icon"> 34 <i class="glyphicon glyphicon-info-sign s24"></i> 35 </div> 36 </div> 37 <div class="col-md-8"> 38 <div id = "status_content" class="col-md-12" style="display: none;" > 39 <div id='status' class='col-md-12'> 40 <strong>Status </strong> 41 <div class="progress progress-striped active"> 42 <div id="vs_progress" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> 43 <span id="p4text" ></span> 44 </div> 45 </div> 46 </div> 47 <div id = "last_batch" class='col-md-12'>Last Batch: 48 <strong id='last_file' class="text-success"></strong> 49 </div> 50 <div class='col-md-12'># Scanned: 51 <strong id='total_number' class="text-warning"></strong> 52 </div> 53 <div class='col-md-12'># Virus Files: 54 <a href="#scanresult"><strong id='vs_num' class="text-danger"></strong></a> 55 </div> 56 <div id="surfcalltoaction" class='alert alert-dismissable alert-danger col-md-12' style="display: none;"> 57 <!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>--> 58 <?php oLang::_('SURF_SCAN_CALL_TOACTION') ?> 59 </div> 60 </div> 61 <div id = "scanpathtext" class='col-md-12' style="display: none;">Scan Path: 62 <label class="text-primary" id="selectedfile"></label> 63 </div> 64 </div> 65 </div> 66 <div class="pull-right"> 67 <i class="fa fa-clock-o"></i>Last Scan: 68 <strong id="scan-date" class="text-success"></strong> 69 </div> 22 <div class="panel-body wrap-container"> 23 <div class="row row-set"> 24 <div class="col-sm-3 p-l-r-0"> 25 <div id="c-tag"> 26 <div class="col-sm-12" style="padding-left: 0px;"> 27 <span class="tag-title">MD5 Hash Scanner<span> 28 </div> 29 <p class="tag-content">MD5 Hash Scanner checks for all known viruses and malware. It is recommended that if nothing is detected you use the Dynamic Scanner</p> 30 </div> 31 </div> 32 <div class="col-sm-6"> 33 <div class="vs-line-1"> 34 <div class="vs-line-1-number" style="padding-top: 40px;"> 35 <span id = "hashstatus" class="scan-file-number" style="font-size: 16px; font-weight: 300;"><?php echo $msg['msg'] ?></span> 70 36 </div> 71 37 </div> 72 38 </div> 73 <div class="row"> 74 <div id="scanbuttons"> 75 <button id="sfsstop" class='centrora-btn' style="display: none;"> 76 <i id="ic-change" class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?> 77 </button> 78 <button id="sfsstart" class='centrora-btn'> 79 <i id="ic-change" class="glyphicon glyphicon-play color-green"></i> <?php oLang::_('START_NEW_SCAN') ?> 80 </button> 81 <button data-target="#scanPathModal" data-toggle="modal" id="setscanpath" title ="<?php oLang::_('SETSCANPATH') ?>" 82 class='pull-right centrora-btn'> 83 <i id="ic-change" class="glyphicon glyphicon-folder-close text-primary"></i> 84 Set Scan Path 85 </button> 39 40 <div class="col-sm-3"> 41 <div class="vs-line-1" style="padding:0px 45px 0px 0px;"> 42 <div class="vs-line-1-title"> <i id="updateMD5Sig" class="fa fa-refresh md5-icon-refresh"></i> 43 <br><span style="opacity:0.7;">Click to update your MD5 Virus signature</span> 44 </div> 86 45 </div> 87 46 </div> 88 <div class="col-md-12" id ="scan-result" class="row" style="display: none;"> 89 <strong class="alert-danger">Virus Files Detected!</strong> 90 <div id="scan-result-panel"></div> 47 </div> 48 49 50 <div class="row row-set" style="padding-right: 20px;"> 51 <div id="scan-date"></div> 52 </div> 53 54 <div class="row"> 55 <!--Scan Status--> 56 <div id="scan-window" class="col-md-12" style="padding:0px 20px;"> 57 <div id='scan_progress' class="alert alert-info fade in"> 58 <div class="row"> 59 <div class="col-md-12"> 60 <div id = "status_content" class="col-md-12" style="display: none;" > 61 <div id='status' class='col-md-12'> 62 <strong>Status </strong> 63 <div class="progress progress-striped active" style="width: 100%; margin-left:0px;"> 64 <div id="vs_progress" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"> 65 <span id="p4text" ></span> 66 </div> 67 </div> 68 </div> 69 <div id = "last_batch" class='col-md-12'>Last Batch: 70 <strong id='last_file' class="text-white" style="color:white; padding-left:0px !important;"></strong> 71 </div> 72 <div class='col-md-12'># Scanned: 73 <strong id='total_number' class="text-white"></strong> 74 </div> 75 <div class='col-md-12'># Virus Files: 76 <a href="#scanresult"><strong id='vs_num' class="text-white"></strong></a> 77 </div> 78 <div id="surfcalltoaction" class='alert alert-dismissable alert-danger col-md-12' style="display: none;"> 79 <!-- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>--> 80 <?php oLang::_('SURF_SCAN_CALL_TOACTION') ?> 81 </div> 82 </div> 83 <div id = "scanpathtext" class='col-md-12' style="display: none;">Scan Path: 84 <label class="text-white" id="selectedfile"></label> 85 </div> 86 </div> 87 </div> 88 89 </div> 91 90 </div> 92 91 </div> 92 <div class="row col-sm-12" style="padding-right: 20px;"> 93 <div id="scanbuttons"> 94 <button id="sfsstart" class='btn-new result-btn-set'> 95 <i id="ic-change" class="glyphicon glyphicon-play color-green"></i> <?php oLang::_('START_NEW_SCAN') ?> 96 </button> 97 <button id="sfsstop" class='btn-new result-btn-set' style="display: none;"> 98 <i id="ic-change" class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?> 99 </button> 100 <button data-target="#scanPathModal" data-toggle="modal" id="setscanpath" title ="<?php oLang::_('SETSCANPATH') ?>" 101 class='pull-right btn-new result-btn-set'> 102 <i id="ic-change" class="glyphicon glyphicon-folder-close text-primary"></i> 103 Set Scan Path 104 </button> 105 </div> 106 </div> 107 108 <?php 109 $oem = new CentroraOEM(); 110 $oemCustomer = $oem->hasOEMCustomer(); 111 if(!empty($oemCustomer['data']['customer_id'])) { 112 echo $oem->getCallToActionAndFooter(); 113 }else {?> 114 <?php echo $this->model->getCallToActionAndFooter(); }?> 115 </div> 116 117 118 <div class="col-md-12" id ="scan-result" class="row" style="display: none;"> 119 <strong class="alert-danger">Virus Files Detected!</strong> 120 <div id="scan-result-panel"></div> 121 </div> 93 122 </div> 94 <!--Scan Path Modal-->95 <div class="modal fade" id="scanPathModal" tabindex="-1" role="dialog" aria-hidden="true">96 <div class="modal-dialog">97 <div class="modal-content">98 <div class="modal-header">99 <button type="button" class="close" data-dismiss="modal">100 <span aria-hidden="true">×</span><span class="sr-only">Close</span>101 < /button>102 <h4 class="modal-title" id="myModalLabel2"><?php oLang::_('SCANPATH'); ?></h4>103 < /div>104 <div class="modal-body" style="height:400px">105 <label style="vertical-align: top;"><?php oLang::_('FILETREENAVIGATOR'); ?></label>106 <div class="panel-body" id="FileTreeDisplay"></div>107 < /div>108 <div class="modal-footer">109 <div class="panel-body">110 <div class="form-group">111 <label for="scanPath" class="col-sm-1 control-label"><?php oLang::_('PATH');?></label>112 <div class="col-sm-11">113 <input type="text" name="scanPath" id="selected_file" class="form-control">114 < /div>123 </div> 124 <!--Scan Path Modal--> 125 <div class="modal fade" id="scanPathModal" tabindex="-1" role="dialog" aria-hidden="true"> 126 <div class="modal-dialog"> 127 <div class="modal-content"> 128 <div class="modal-header"> 129 <button type="button" class="close" data-dismiss="modal"> 130 <span aria-hidden="true">×</span><span class="sr-only">Close</span> 131 </button> 132 <h4 class="modal-title" id="myModalLabel2"><?php oLang::_('SCANPATH'); ?></h4> 133 </div> 134 <div class="modal-body" style="height:400px"> 135 <label style="vertical-align: top;"><?php oLang::_('FILETREENAVIGATOR'); ?></label> 136 <div class="panel-body" id="FileTreeDisplay"></div> 137 </div> 138 <div class="modal-footer"> 139 <div class="panel-body"> 140 <div class="form-group"> 141 <label for="scanPath" class="col-sm-1 control-label"><?php oLang::_('PATH');?></label> 142 <div class="col-sm-11"> 143 <input type="text" name="scanPath" id="selected_file" class="form-control"> 115 144 </div> 116 <div class="form-group">117 <div>118 <button type="button" class="btn btn-sm" id='save-button'><i class="glyphicon glyphicon-save text-success"></i> <?php oLang::_('SET');?></button>119 < /div>145 </div> 146 <div class="form-group"> 147 <div> 148 <button type="button" class="btn-new result-btn-set" id='save-button'><i class="glyphicon glyphicon-save text-white"></i> <?php oLang::_('SET');?></button> 120 149 </div> 121 150 </div> … … 128 157 </div> 129 158 </div> 159 </div> -
ose-firewall/trunk/assets/views/template/vls/template-vls-scanstatus.php
r1387925 r1581581 64 64 </div> 65 65 </div> 66 <div class="pull-right">67 <i class="fa fa-clock-o"></i>Last Scan: 68 <strong id="scan-date" class="text-success"></strong>69 </div>66 <!-- <div class="pull-right">--> 67 <!-- <i class="fa fa-clock-o"></i>Last Scan:--> 68 <!-- <strong id="scan-date" class="text-success"></strong>--> 69 <!-- </div>--> 70 70 </div> 71 71 </div> -
ose-firewall/trunk/assets/views/vlscan.php
r1387925 r1581581 4 4 ?> 5 5 <div id="oseappcontainer"> 6 <div class="container ">6 <div class="container wrapbody"> 7 7 <?php 8 8 $this->model->showLogo(); 9 $this->model->showHeader();9 // $this->model->showHeader(); 10 10 ?> 11 11 <div class="row"> … … 13 13 <div class="panel panel-primary plain "> 14 14 <!-- Start .panel --> 15 <div class="panel-body"> 16 <div class="row config-buttons pull-right"> 17 <div class="col-md-12"> 15 <div class="panel-body wrap-container"> 16 <div class="row row-set" data-bind="with:vl_data"> 17 <div data-bind="foreach: {data: $data, as: 'vls'}"> 18 <div class="col-sm-3 p-l-r-0"> 19 <div id="c-tag"> 20 <div class="col-sm-12" style="padding-left: 0px;"> 21 <span class="tag-title">Vulnerabilities Scanner<span> 22 </div> 23 <p class="tag-content"> 24 Vulnerabilities Scanner is a powerful vulnerability detector. It scans through your website and detects any real vulnerabilities. Credits to WPScan Vulnerability. 25 </p> 26 </div> 27 </div> 28 <div class="col-sm-3"> 29 <div class="vs-line-1"> 30 <a href="#sectionWP" data-toggle="tab"> 31 <div class="cursor-pointer vs-line-1-title"> <i class="fa fa-<?php echo OSE_CMS=='joomla'? 'joomla' : 'wordpress' ?>"></i></div> 32 <div class="vs-line-1-number"> 33 <?php echo OSE_CMS=='joomla'? 'Joomla' : 'Wordpress' ?>: <span class="scan-file-number" data-bind="filteLength: vls.content.CMS.vulnerabilities"></span> 34 </div> 35 </a> 36 </div> 37 </div> 38 <div class="col-sm-3"> 39 <a data-toggle="tab" href="#sectionPlu"> 40 <div class="vs-line-1"> 41 <div class="cursor-pointer vs-line-1-title"> <i class="fa fa-wrench"></i></div> 42 <div class="vs-line-1-number"> 43 Plugins: <span data-bind="with:vls.content.plugin"> 44 <span class='scan-file-number' data-bind="filteLength:vls.content.plugin"></span> 45 </span> 46 </div> 47 </div> 48 </a> 49 </div> 50 <div class="col-sm-3"> 51 <div class="vs-line-1"> 52 <a data-toggle="tab" href="#sectionThm"> 53 <div class="cursor-pointer vs-line-1-title"> <i class="fa fa-puzzle-piece"></i></div> 54 <div class="vs-line-1-number"> 55 Themes: <span data-bind="with:vls.content.theme"> 56 <span class='scan-file-number' data-bind="filteLength:vls.content.theme"></span> 57 </span> 58 </div> 59 </a> 60 </div> 61 </div> 18 62 </div> 19 63 </div> 64 <div class="row row-set" style="padding-right: 20px;"> 65 <div id="scan-date"></div> 66 <div> 67 <?php require_once('template/vls/template-vls-records.php') ?> 68 </div> 69 </div> 70 71 72 73 74 20 75 <div class="row"> 21 76 <?php require_once('template/vls/template-vls-scanstatus.php') ?> 22 77 </div> 23 78 24 <div class=" row">79 <div class="col-sm-12" style="padding-right: 20px;"> 25 80 <div id="scanbuttons"> 26 <button id="vls top" class='centrora-btn'><i id="ic-change"27 class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?>81 <button id="vlscan" class='btn-new result-btn-set'><i id="ic-change" 82 class="glyphicon glyphicon-play color-green"></i> <?php oLang::_('START_NEW_SCAN') ?> 28 83 </button> 29 <button id="vls can" class='centrora-btn'><i id="ic-change"30 class="glyphicon glyphicon-play color-green"></i> <?php oLang::_('START_NEW_SCAN') ?>84 <button id="vlstop" class='btn-new result-btn-set'><i id="ic-change" 85 class="glyphicon glyphicon-stop color-red"></i> <?php oLang::_('STOP_VIRUSSCAN') ?> 31 86 </button> 32 87 </div> 33 88 </div> 34 <?php require_once('template/vls/template-vls-records.php') ?> 89 <?php 90 $oem = new CentroraOEM(); 91 $oemCustomer = $oem->hasOEMCustomer(); 92 if(!empty($oemCustomer['data']['customer_id'])) { 93 echo $oem->getCallToActionAndFooter(); 94 }else {?> 95 <?php echo $this->model->getCallToActionAndFooter(); }?> 96 </div> 97 35 98 </div> 36 99 -
ose-firewall/trunk/assets/views/vsscan.php
r1417654 r1581581 11 11 ?> 12 12 <div id="oseappcontainer"> 13 <div class="container wrapbody" >13 <div class="container wrapbody" id="vsscan-page"> 14 14 <?php 15 15 $this->model->showLogo(); … … 21 21 <div class="panel panel-primary plain "> 22 22 <!-- Start .panel --> 23 24 23 <div class="panel-body wrap-container"> 25 24 <div class="row row-set"> … … 207 206 </div> 208 207 </div> 209 <div class="row row-set" style="margin-top:14px;"> 210 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 211 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 212 <div class="call-to-action-txt"> 213 <img width="35" height="35" alt="C_puma" src="http://googledrive.com/host/0BzcQR8G4BGjUX0ZzTzBvUVNEb00"> 214 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 215 </div></a> 216 </div> 217 <div class="col-sm-3"> 218 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 219 Background Scanning 220 </div> 221 </div> 222 </div> 223 <div class="row"> 224 <div id="footer" class="col-sm-12"> 225 <div>Centrora 2016 a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 226 </div> 227 </div> 208 209 <?php 210 $oem = new CentroraOEM(); 211 $oemCustomer = $oem->hasOEMCustomer(); 212 if(!empty($oemCustomer['data']['customer_id'])) { 213 echo $oem->getCallToActionAndFooter(); 214 }else {?> 215 <?php echo $this->model->getCallToActionAndFooter(); }?> 228 216 </div> 229 217 … … 460 448 461 449 <?php 462 $this->model->showFooterJs();450 $this->model->showFooterJs(); 463 451 ?> -
ose-firewall/trunk/classes/App/Controller/SurfscanController.php
r1425230 r1581581 54 54 public function action_updateMD5DB() 55 55 { 56 $booleanresult = $this->model->updateMD5DB ( ); 57 if ($booleanresult) { 58 $this->model->aJaxReturn(true, 'SUCCESS', $this->model->getLang("SURF_SCAN_SIG_UPDATED")); 59 } else { 60 $this->model->aJaxReturn(false, 'FAIL', $this->model->getLang("SURF_SCAN_SIG_UPDATED")); 61 } 56 $result = $this->model->updateMD5DB ( ); 57 $this->model->returnJSON($result); 58 62 59 } 63 60 -
ose-firewall/trunk/classes/App/Model/BaseModel.php
r1425230 r1581581 26 26 if (!defined('OSE_FRAMEWORK') && !defined('OSEFWDIR') && !defined('_JEXEC')) 27 27 { 28 die('Direct Access Not Allowed');28 die('Direct Access Not Allowed'); 29 29 } 30 30 class BaseModel { 31 protected $db = null;32 protected $cent_nounce = "";33 protected $qatest = false;34 public function __construct() {35 36 }37 public function getCHeader() {}38 public function getCDescription() {}39 public function showLogo () {40 oseFirewall :: showLogo();41 }42 protected function loadDatabase () {43 $this->db = oseFirewall::getDBO();44 }45 protected function loadCoreLibrary () {46 require_once (OSE_FWFRAMEWORK.ODS.'oseFirewallWordpress.php');47 }48 protected function loadLibrary () {49 $this->loadFirewallStat () ;50 oseFirewall::callLibClass('ipmanager', 'ipmanager');51 }52 protected function loadFirewallStat () {53 if (OSE_CMS == 'joomla')54 {55 oseFirewall::callLibClass('firewallstat', 'firewallstatJoomla');56 }57 else58 {59 oseFirewall::callLibClass('firewallstat', 'firewallstatWordpress');60 }61 }62 public function showSubTitle(){63 echo "We are always here to help";64 }65 66 protected function loadJSLauguage ($cs, $baseUrl) {31 protected $db = null; 32 protected $cent_nounce = ""; 33 protected $qatest = false; 34 public function __construct() { 35 36 } 37 public function getCHeader() {} 38 public function getCDescription() {} 39 public function showLogo () { 40 oseFirewall :: showLogo(); 41 } 42 protected function loadDatabase () { 43 $this->db = oseFirewall::getDBO(); 44 } 45 protected function loadCoreLibrary () { 46 require_once (OSE_FWFRAMEWORK.ODS.'oseFirewallWordpress.php'); 47 } 48 protected function loadLibrary () { 49 $this->loadFirewallStat () ; 50 oseFirewall::callLibClass('ipmanager', 'ipmanager'); 51 } 52 protected function loadFirewallStat () { 53 if (OSE_CMS == 'joomla') 54 { 55 oseFirewall::callLibClass('firewallstat', 'firewallstatJoomla'); 56 } 57 else 58 { 59 oseFirewall::callLibClass('firewallstat', 'firewallstatWordpress'); 60 } 61 } 62 public function showSubTitle(){ 63 echo "We are always here to help"; 64 } 65 66 protected function loadJSLauguage ($cs, $baseUrl) { 67 67 $lang = oseFirewallBase::getLocaleString(); 68 $cs->registerScriptFile($baseUrl . '/public/messages/'.$lang.'.js', CClientScript::POS_HEAD);69 }70 public function getNounce () {71 echo '<input type="hidden" id="centnounce" value ="'.oseFirewall::loadNounce().'" />';72 }73 public function showHeader () { 74 $html = '<div class="bs-callout bs-callout-info fade in">';68 $cs->registerScriptFile($baseUrl . '/public/messages/'.$lang.'.js', CClientScript::POS_HEAD); 69 } 70 public function getNounce () { 71 echo '<input type="hidden" id="centnounce" value ="'.oseFirewall::loadNounce().'" />'; 72 } 73 public function showHeader () { 74 $html = '<div class="bs-callout bs-callout-info fade in">'; 75 75 // $html .='<span class="icon-separator"> 76 76 // <i class="glyphicon glyphicon-bullhorn"></i> 77 77 // </span>'; 78 $html .= '<span class="icon-separator">78 $html .= '<span class="icon-separator"> 79 79 80 80 </span>'; 81 $html .= '<div class="header-wrapper">81 $html .= '<div class="header-wrapper"> 82 82 '.$this->getCHeader().'<small>'.$this->getCDescription ().'</small> 83 83 </div>'; 84 $html .= '</div>';85 echo $html; 86 }87 88 public function showSubHeader()89 {90 $html = '<div class="sub-header">';91 $html .= '<div><img id="sub-icon" src="' . OSE_FWURL . '/public/images/premium/sub_icon.png"></div>';92 93 $html .= '<div class="header-wrapper">84 $html .= '</div>'; 85 echo $html; 86 } 87 88 public function showSubHeader() 89 { 90 $html = '<div class="sub-header">'; 91 $html .= '<div><img id="sub-icon" src="' . OSE_FWURL . '/public/images/premium/sub_icon.png"></div>'; 92 93 $html .= '<div class="header-wrapper"> 94 94 95 95 ' . $this->getCHeader() . '<small>' . $this->getCDescription() . '</small> 96 96 </div>'; 97 $html .= '</div>';98 echo $html;99 }100 public function throwAjaxReturn ($result, $status, $msg, $continue) {101 oseAjax :: aJaxReturn($result, $status, $msg, $continue); 102 }103 public function throwAjaxRecursive ($result, $status, $msg, $continue, $step) {104 oseAjax :: throwAjaxRecursive($result, $status, $msg, $continue, $step); 105 }106 protected function transMessage ($success, $msg)107 {108 $style = ($success==true)?'ajax-success':'ajax-failed';109 return '<div class="'.$style.'" >'.$msg.'</div>';110 }111 protected function addPages($url, $action) {112 $query = 'SELECT `id`, `visits` FROM `#__osefirewall_pages` WHERE `page_url` = ' . $this->db->quoteValue($url);113 $this->db->setQuery($query);114 $results = $this->db->loadObject();115 if (empty ($results)) {116 $varValues = array (117 'page_url' => $url,118 'action' => $action,119 'visits' => 1120 );121 $id = $this->db->addData('insert', '#__osefirewall_pages', null, null, $varValues);122 } else {123 $varValues = array (124 'visits' => $results->visits + 1125 );126 $this->db->addData('update', '#__osefirewall_pages', 'id', $results->id, $varValues);127 $id = $results->id;128 }129 return $id;130 }131 protected function addReferer($referer=null) {132 $query = 'SELECT `id` FROM `#__osefirewall_referers` WHERE `referer_url` = ' . $this->db->quoteValue($referer);133 $this->db->setQuery($query);134 $results = $this->db->loadObject();135 if (empty ($results)) {136 $varValues = array (137 'referer_url' => $referer138 );139 $id = $this->db->addData('insert', '#__osefirewall_referers', null, null, $varValues);140 } else {141 $id = $results->id;142 }143 return $id;144 }145 public function isDBReady(){146 $return = array ();147 $return['ready'] = oseFirewall :: isDBReady();148 $return['type'] = 'base';149 return $return['ready'];150 }151 public function returnJSON($results) {152 if ($this->qatest == true) {153 return $results;154 }155 else {156 oseAjax::returnJSON($results);157 }158 }159 public function loadRequest () {160 oseFirewall::loadRequest ();161 $this->qatest = oRequest :: getInt('qatest', false);162 }163 public function getVar ($var, $default) {164 $this->loadRequest ();165 return oRequest :: getVar($var, $default);166 }167 public function getInt ($var, $default=0) {168 $this->loadRequest ();169 return oRequest :: getInt($var, $default);170 }171 public function getLang ($var) {172 return oLang::_get($var);173 }174 public function aJaxReturn($result, $status, $msg, $continue = false, $id = null) {175 oseAjax::aJaxReturn($result, $status, $msg, $continue = false, $id = null);176 }177 public function getFirewallIpManager () {178 $this->loadDatabase();179 return new oseFirewallIpManager($this->db);180 }181 protected function loadJSON () {182 if (!class_exists('oseJSON')) {183 oseFirewall::loadJSON();184 }185 }186 public function JSON_encode ($var) {187 $this->loadJSON ();188 return oseJSON::encode($var); 189 }190 public function JSON_decode ($var) {191 $this->loadJSON ();192 return oseJSON::decode($var);193 }194 public function showSelectionRequired () {195 $this->aJaxReturn(false, 'ERROR', $this->getLang("PLEASE_SELECT_ITEMS"), false);196 }197 public function fileClean ($path) {198 oseFirewall::loadFiles ();199 return oseFile::clean ($path);200 }201 protected function loadAllAssets () {202 // JS203 if (OSE_CMS =='joomla')204 {205 if (JOOMLA15 == true) {206 oseFirewall::loadJSFile ('CentroraJquery', 'jquery-1.11.1.min.js', false);207 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false);208 209 }210 else {211 $version = new JVersion();212 if ($version->getShortVersion()<3 || $version->getShortVersion()>'5')213 { 214 oseFirewall::loadJSFile ('CentroraJquery', 'jquery-1.11.1.min.js', false);215 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false);216 }217 else218 {219 JHtml::_('bootstrap.framework');220 }221 }222 oseFirewall::loadJSFile ('CentroraJquery', 'joomla.js', false);223 } 224 else225 {97 $html .= '</div>'; 98 echo $html; 99 } 100 public function throwAjaxReturn ($result, $status, $msg, $continue) { 101 oseAjax :: aJaxReturn($result, $status, $msg, $continue); 102 } 103 public function throwAjaxRecursive ($result, $status, $msg, $continue, $step) { 104 oseAjax :: throwAjaxRecursive($result, $status, $msg, $continue, $step); 105 } 106 protected function transMessage ($success, $msg) 107 { 108 $style = ($success==true)?'ajax-success':'ajax-failed'; 109 return '<div class="'.$style.'" >'.$msg.'</div>'; 110 } 111 protected function addPages($url, $action) { 112 $query = 'SELECT `id`, `visits` FROM `#__osefirewall_pages` WHERE `page_url` = ' . $this->db->quoteValue($url); 113 $this->db->setQuery($query); 114 $results = $this->db->loadObject(); 115 if (empty ($results)) { 116 $varValues = array ( 117 'page_url' => $url, 118 'action' => $action, 119 'visits' => 1 120 ); 121 $id = $this->db->addData('insert', '#__osefirewall_pages', null, null, $varValues); 122 } else { 123 $varValues = array ( 124 'visits' => $results->visits + 1 125 ); 126 $this->db->addData('update', '#__osefirewall_pages', 'id', $results->id, $varValues); 127 $id = $results->id; 128 } 129 return $id; 130 } 131 protected function addReferer($referer=null) { 132 $query = 'SELECT `id` FROM `#__osefirewall_referers` WHERE `referer_url` = ' . $this->db->quoteValue($referer); 133 $this->db->setQuery($query); 134 $results = $this->db->loadObject(); 135 if (empty ($results)) { 136 $varValues = array ( 137 'referer_url' => $referer 138 ); 139 $id = $this->db->addData('insert', '#__osefirewall_referers', null, null, $varValues); 140 } else { 141 $id = $results->id; 142 } 143 return $id; 144 } 145 public function isDBReady(){ 146 $return = array (); 147 $return['ready'] = oseFirewall :: isDBReady(); 148 $return['type'] = 'base'; 149 return $return['ready']; 150 } 151 public function returnJSON($results) { 152 if ($this->qatest == true) { 153 return $results; 154 } 155 else { 156 oseAjax::returnJSON($results); 157 } 158 } 159 public function loadRequest () { 160 oseFirewall::loadRequest (); 161 $this->qatest = oRequest :: getInt('qatest', false); 162 } 163 public function getVar ($var, $default) { 164 $this->loadRequest (); 165 return oRequest :: getVar($var, $default); 166 } 167 public function getInt ($var, $default=0) { 168 $this->loadRequest (); 169 return oRequest :: getInt($var, $default); 170 } 171 public function getLang ($var) { 172 return oLang::_get($var); 173 } 174 public function aJaxReturn($result, $status, $msg, $continue = false, $id = null) { 175 oseAjax::aJaxReturn($result, $status, $msg, $continue = false, $id = null); 176 } 177 public function getFirewallIpManager () { 178 $this->loadDatabase(); 179 return new oseFirewallIpManager($this->db); 180 } 181 protected function loadJSON () { 182 if (!class_exists('oseJSON')) { 183 oseFirewall::loadJSON(); 184 } 185 } 186 public function JSON_encode ($var) { 187 $this->loadJSON (); 188 return oseJSON::encode($var); 189 } 190 public function JSON_decode ($var) { 191 $this->loadJSON (); 192 return oseJSON::decode($var); 193 } 194 public function showSelectionRequired () { 195 $this->aJaxReturn(false, 'ERROR', $this->getLang("PLEASE_SELECT_ITEMS"), false); 196 } 197 public function fileClean ($path) { 198 oseFirewall::loadFiles (); 199 return oseFile::clean ($path); 200 } 201 protected function loadAllAssets () { 202 // JS 203 if (OSE_CMS =='joomla') 204 { 205 if (JOOMLA15 == true) { 206 oseFirewall::loadJSFile ('CentroraJquery', 'jquery-1.11.1.min.js', false); 207 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false); 208 209 } 210 else { 211 $version = new JVersion(); 212 if ($version->getShortVersion()<3 || $version->getShortVersion()>'5') 213 { 214 oseFirewall::loadJSFile ('CentroraJquery', 'jquery-1.11.1.min.js', false); 215 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false); 216 } 217 else 218 { 219 JHtml::_('bootstrap.framework'); 220 } 221 } 222 oseFirewall::loadJSFile ('CentroraJquery', 'joomla.js', false); 223 } 224 else 225 { 226 226 oseFirewall::loadJSFile('CentroraWPJquery', 'wordpress.js', false); 227 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false);228 }227 oseFirewall::loadJSFile ('CentroraBootStrapJS', 'bootstrap.min.js', false); 228 } 229 229 // oseFirewall::loadJSFile ('CentroraDropboxJS', 'dropins.js', false); 230 230 oseFirewall::loadJSFile('CentroraJueryUI', 'jquery-ui.min.js', false); 231 231 oseFirewall::loadJSFile('CentroraDataTableJS', 'jquery.dataTables.min.js', false); 232 oseFirewall::loadJSFile ('CentroraMaskInput','plugins/maskedinput/jquery.maskedinput.js', false);233 oseFirewall::loadJSFile ('CentroraMaskIP','plugins/maskedinput/jquery.input-ip-address-control-1.0.min.js', false);234 oseFirewall::loadJSFile ('CentroraBootbox', 'plugins/bootbox/bootbox.js', false);235 oseFirewall::loadJSFile ('CentroraForm', 'plugins/form/jquery.form.min.js', false);232 oseFirewall::loadJSFile ('CentroraMaskInput','plugins/maskedinput/jquery.maskedinput.js', false); 233 oseFirewall::loadJSFile ('CentroraMaskIP','plugins/maskedinput/jquery.input-ip-address-control-1.0.min.js', false); 234 oseFirewall::loadJSFile ('CentroraBootbox', 'plugins/bootbox/bootbox.js', false); 235 oseFirewall::loadJSFile ('CentroraForm', 'plugins/form/jquery.form.min.js', false); 236 236 237 237 //oseFirewall::loadJSFile ('CentroraModernizr', 'modernizr.custom.js', false); 238 oseFirewall::loadJSFile ('CentroraJResponse', 'jRespond.min.js', false);239 oseFirewall::loadJSFile ('CentroraSlimscroll', 'plugins/slimscroll/jquery.slimscroll.min.js', false);240 oseFirewall::loadJSFile ('CentroraSlimscrolHor', 'plugins/slimscroll/jquery.slimscroll.horizontal.min.js', false);241 oseFirewall::loadJSFile ('CentroraAppstart', 'jquery.appStart.js', false);238 oseFirewall::loadJSFile ('CentroraJResponse', 'jRespond.min.js', false); 239 oseFirewall::loadJSFile ('CentroraSlimscroll', 'plugins/slimscroll/jquery.slimscroll.min.js', false); 240 oseFirewall::loadJSFile ('CentroraSlimscrolHor', 'plugins/slimscroll/jquery.slimscroll.horizontal.min.js', false); 241 oseFirewall::loadJSFile ('CentroraAppstart', 'jquery.appStart.js', false); 242 242 oseFirewall::loadJSFile('CentroraInputMask', 'plugins/inputmask/jquery.mask.js', false); 243 243 oseFirewall::loadJSFile('CentroraTipsy', 'plugins/tipsy/jquery.tipsy.js', false); … … 254 254 oseFirewall::loadJSFile('CentroraColors', 'colors.js', false); 255 255 }; 256 oseFirewall::loadJSFile ('CentroraApp', 'app.js', false);256 oseFirewall::loadJSFile ('CentroraApp', 'app.js', false); 257 257 $lang = oseFirewallBase::getLocaleString(); 258 oseFirewall::loadLanguageJSFile ('CentroraLanguage', ''.$lang.'.js', false);259 // CSS260 oseFirewall::loadCSSFile ('CentroraDataTable', 'jquery.dataTables.min.css', false);258 oseFirewall::loadLanguageJSFile ('CentroraLanguage', ''.$lang.'.js', false); 259 // CSS 260 oseFirewall::loadCSSFile ('CentroraDataTable', 'jquery.dataTables.min.css', false); 261 261 oseFirewall::loadCSSFile ('CentroraJueryUIcss', 'jquery-ui.css', false); 262 262 263 263 // oseFirewall::loadCSSFile ('CentroraDatePicker', 'datepicker.css', false); 264 264 oseFirewall::loadCSSFile ('CentroraBootStrap', 'bootstrap.css', false); 265 oseFirewall::loadCSSFile ('CentroraWaitme', 'waitme.less.css', false);266 oseFirewall::loadCSSFile ('CentroraIcons', 'icons.css', false);267 oseFirewall::loadCSSFile ('CentroraBootStrapLess', 'main.css', false);268 269 oseFirewall::loadCSSFile ('CentroraFontAwesomeMin', 'font-awesome.min.css', false);270 //load style css271 $style = $this->getConfiguration('style');272 if (!empty($style['data']) && $style['data']['style'] == 'classic') {265 oseFirewall::loadCSSFile ('CentroraWaitme', 'waitme.less.css', false); 266 oseFirewall::loadCSSFile ('CentroraIcons', 'icons.css', false); 267 oseFirewall::loadCSSFile ('CentroraBootStrapLess', 'main.css', false); 268 269 oseFirewall::loadCSSFile ('CentroraFontAwesomeMin', 'font-awesome.min.css', false); 270 //load style css 271 $style = $this->getConfiguration('style'); 272 if (!empty($style['data']) && $style['data']['style'] == 'classic') { 273 273 oseFirewall::loadCSSFile('CentroraV4Style', 'dynamic.css', false); 274 274 } else { … … 276 276 277 277 } 278 oseFirewall::loadCSSURL ('CentroraV4Font','https://fonts.googleapis.com/css?family=Open+Sans%3A400italic%2C400%2C600%2C700%7CRoboto+Slab%3A400%2C300%2C700');278 oseFirewall::loadCSSURL ('CentroraV4Font','https://fonts.googleapis.com/css?family=Open+Sans%3A400italic%2C400%2C600%2C700%7CRoboto+Slab%3A400%2C300%2C700'); 279 279 oseFirewall::loadCSSFile('CentroraTipsyCss', 'tipsy.css', false); 280 280 if (class_exists('JConfig') || class_exists('SConfig')) 281 281 { 282 oseFirewall::loadCSSFile ('CentroraJFix', 'jfix.css', false);282 oseFirewall::loadCSSFile ('CentroraJFix', 'jfix.css', false); 283 283 } 284 284 $this->getOEMCss(); 285 }286 protected function getOEMCss () {287 oseFirewall::callLibClass('oem', 'oem');288 $oem = new CentroraOEM(); 289 $oem->loadCSS (); 290 }291 protected function getEmptyReturn () {292 $return = array();293 $return['data']['id'] = 0;294 $return['data']['name'] = 'N/A';295 $return['recordsTotal'] = 0;296 $return['recordsFiltered']=0;297 return $return;298 }299 public function getConfiguration($type)300 {301 $this->loadFirewallStat () ;302 $oseFirewallStat = new oseFirewallStat();303 $results = $oseFirewallStat->getConfiguration($type);304 return $results;305 }306 public function isConfigurationDBReady($data)307 {308 require_once(OSE_FWFRAMEWORK.ODS.'oseFirewallBase.php');309 if(isset($data['blockCountry'] ) && $data['blockCountry'] == 1)310 {311 if(oseFirewallBase :: isCountryBlockConfigDBReady() == false)312 {313 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_SAVECOUNTRYBLOCK_FAILE'), false);314 }315 }316 if(isset($data['adVsPatterns'] ) && $data['adVsPatterns'] == 1){317 if(oseFirewallBase :: isAdvancePatternConfigDBReady() == false)318 {319 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_ADPATTERNS_FAILE'), false);320 }321 }322 if(isset($data['adRules'] ) && $data['adRules'] == 1)323 {324 if(oseFirewallBase :: isAdvanceSettingConfigDBReady() == false)325 {326 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_ADRULES_FAILE'), false);327 }328 }329 }285 } 286 protected function getOEMCss () { 287 oseFirewall::callLibClass('oem', 'oem'); 288 $oem = new CentroraOEM(); 289 $oem->loadCSS (); 290 } 291 protected function getEmptyReturn () { 292 $return = array(); 293 $return['data']['id'] = 0; 294 $return['data']['name'] = 'N/A'; 295 $return['recordsTotal'] = 0; 296 $return['recordsFiltered']=0; 297 return $return; 298 } 299 public function getConfiguration($type) 300 { 301 $this->loadFirewallStat () ; 302 $oseFirewallStat = new oseFirewallStat(); 303 $results = $oseFirewallStat->getConfiguration($type); 304 return $results; 305 } 306 public function isConfigurationDBReady($data) 307 { 308 require_once(OSE_FWFRAMEWORK.ODS.'oseFirewallBase.php'); 309 if(isset($data['blockCountry'] ) && $data['blockCountry'] == 1) 310 { 311 if(oseFirewallBase :: isCountryBlockConfigDBReady() == false) 312 { 313 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_SAVECOUNTRYBLOCK_FAILE'), false); 314 } 315 } 316 if(isset($data['adVsPatterns'] ) && $data['adVsPatterns'] == 1){ 317 if(oseFirewallBase :: isAdvancePatternConfigDBReady() == false) 318 { 319 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_ADPATTERNS_FAILE'), false); 320 } 321 } 322 if(isset($data['adRules'] ) && $data['adRules'] == 1) 323 { 324 if(oseFirewallBase :: isAdvanceSettingConfigDBReady() == false) 325 { 326 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_ADRULES_FAILE'), false); 327 } 328 } 329 } 330 330 331 331 public function showGoogleSecret() 332 332 { 333 333 require_once(OSE_FWFRAMEWORK . ODS . 'googleAuthenticator' . ODS . 'class_gauthenticator.php'); 334 $gauthenticator = new CentroraGoogleAuthenticator();334 $gauthenticator = new CentroraGoogleAuthenticator(); 335 335 $googleAuth = oseFirewall::getConfiguration('admin'); 336 336 … … 348 348 return $result; 349 349 } 350 public function saveConfiguration($type, $data)351 {352 $this->loadFirewallStat () ;353 $this->isConfigurationDBReady($data);354 $oseFirewallStat = new oseFirewallStat();355 $result = $oseFirewallStat->saveConfiguration($type, $data);356 $this -> confAjaxReturn ($result);357 }350 public function saveConfiguration($type, $data) 351 { 352 $this->loadFirewallStat () ; 353 $this->isConfigurationDBReady($data); 354 $oseFirewallStat = new oseFirewallStat(); 355 $result = $oseFirewallStat->saveConfiguration($type, $data); 356 $this -> confAjaxReturn ($result); 357 } 358 358 359 359 public function saveConfigurationNoExit($type, $data) … … 365 365 return $result; 366 366 } 367 public function confAjaxReturn ($result)368 {369 if ($result==true)370 {371 oseAjax::aJaxReturn(true, 'SUCCESS', oLang::_get('CONFIG_SAVE_SUCCESS'), true);372 }373 else374 {375 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_SAVE_FAILED'), false);376 }377 }378 public function loadFiles () {379 oseFirewall::loadFiles ();380 }381 public function getToken () {382 $panel = new panel ();383 $tokens = $panel->getToken();384 print_r($tokens);385 }386 public function showFooterJs() {387 oseFirewall::loadJSFile ('CentroraUpdate', 'update.js', false);388 }389 protected function getProductType () {390 if (class_exists('SConfig'))391 {392 $product = 'st';393 }394 else395 {396 $product = 'pl';397 }398 return $product; 399 }367 public function confAjaxReturn ($result) 368 { 369 if ($result==true) 370 { 371 oseAjax::aJaxReturn(true, 'SUCCESS', oLang::_get('CONFIG_SAVE_SUCCESS'), true); 372 } 373 else 374 { 375 oseAjax::aJaxReturn(false, 'ERROR', oLang::_get('CONFIG_SAVE_FAILED'), false); 376 } 377 } 378 public function loadFiles () { 379 oseFirewall::loadFiles (); 380 } 381 public function getToken () { 382 $panel = new panel (); 383 $tokens = $panel->getToken(); 384 print_r($tokens); 385 } 386 public function showFooterJs() { 387 oseFirewall::loadJSFile ('CentroraUpdate', 'update.js', false); 388 } 389 protected function getProductType () { 390 if (class_exists('SConfig')) 391 { 392 $product = 'st'; 393 } 394 else 395 { 396 $product = 'pl'; 397 } 398 return $product; 399 } 400 400 401 401 public function oempasscode() … … 423 423 { 424 424 if (class_exists('SConfig')){ 425 if (is_readable('/home/centrora')) 426 { 427 $rootpath = dirname('/home/centrora'); 428 } 429 elseif (is_readable(dirname(OSE_ABSPATH))) 430 { 431 $rootpath = dirname(dirname(OSE_ABSPATH)); 432 } 433 else { 434 $rootpath = dirname(OSE_ABSPATH ); 435 } 425 if (is_readable('/home/centrora')) 426 { 427 $rootpath = dirname('/home/centrora'); 428 } 429 elseif (is_readable('/var/www/vhosts/default')) 430 { 431 $rootpath = dirname('/var/www/vhosts/default'); 432 } 433 elseif (is_readable(dirname(OSE_ABSPATH))) 434 { 435 $rootpath = dirname(dirname(OSE_ABSPATH)); 436 } 437 else { 438 $rootpath = dirname(OSE_ABSPATH ); 439 } 436 440 }else { 437 441 $rootpath = OSE_ABSPATH; … … 443 447 } 444 448 445 public function getPageUrl($page) 446 { 447 $url = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 448 $query = $_SERVER['QUERY_STRING']; 449 if (OSE_CMS == "wordpress") { 450 switch ($page) { 451 case 'ipmanage': 452 $replace = "page=ose_fw_manageips"; 453 echo str_replace($query, $replace, $url); 454 break; 455 case 'scanResult': 456 $replace = "page=ose_fw_scanreport"; 457 echo str_replace($query, $replace, $url); 458 break; 459 case 'backup': 460 $replace = "page=ose_fw_backup"; 461 echo str_replace($query, $replace, $url); 462 break; 463 case 'permconfig': 464 $replace = "page=ose_fw_permconfig"; 465 echo str_replace($query, $replace, $url); 466 break; 467 } 468 } else { 469 $joomla = "view=dashboard"; 470 switch ($page) { 471 case 'ipmanage': 472 $replace = "view=manageips"; 473 echo str_replace($joomla, $replace, $url); 474 break; 475 case 'scanResult': 476 $replace = "view=vsreport"; 477 echo str_replace($joomla, $replace, $url); 478 break; 479 case 'backup': 480 $replace = "view=backup"; 481 echo str_replace($joomla, $replace, $url); 482 break; 483 case 'permconfig': 484 $replace = "view=permconfig"; 485 $joomla = "view=fpscan"; 486 echo str_replace($joomla, $replace, $url); 487 break; 488 } 489 } 490 } 491 492 public function getImgUrl($imageName) 493 { 494 return OSE_FWURL . '/public/images/' . $imageName; 495 } 449 public function getPageUrl($page) 450 { 451 $url = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 452 $query = $_SERVER['QUERY_STRING']; 453 if (OSE_CMS == "wordpress") { 454 switch ($page) { 455 case 'ipmanage': 456 $replace = "page=ose_fw_manageips"; 457 echo str_replace($query, $replace, $url); 458 break; 459 case 'scanResult': 460 $replace = "page=ose_fw_scanreport"; 461 echo str_replace($query, $replace, $url); 462 break; 463 case 'backup': 464 $replace = "page=ose_fw_backup"; 465 echo str_replace($query, $replace, $url); 466 break; 467 case 'permconfig': 468 $replace = "page=ose_fw_permconfig"; 469 echo str_replace($query, $replace, $url); 470 break; 471 } 472 } else { 473 $joomla = "view=dashboard"; 474 switch ($page) { 475 case 'ipmanage': 476 $replace = "view=manageips"; 477 echo str_replace($joomla, $replace, $url); 478 break; 479 case 'scanResult': 480 $replace = "view=vsreport"; 481 echo str_replace($joomla, $replace, $url); 482 break; 483 case 'backup': 484 $replace = "view=backup"; 485 echo str_replace($joomla, $replace, $url); 486 break; 487 case 'permconfig': 488 $replace = "view=permconfig"; 489 $joomla = "view=fpscan"; 490 echo str_replace($joomla, $replace, $url); 491 break; 492 } 493 } 494 } 495 496 public function getImgUrl($imageName) 497 { 498 return OSE_FWURL . '/public/images/' . $imageName; 499 } 500 501 public function getCallToActionAndFooter() 502 { 503 return '<div class="row row-set" style="margin-top:14px;"> 504 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 505 <a href="http://www.centrora.com/developers/" target="_blank"><div class="call-to-action"> 506 <div class="call-to-action-txt"> 507 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'/images/C_puma.png"> 508 Schedule your scanning and update with Centrora Premium <sup>Now</sup></div> 509 </div></a> 510 </div> 511 <div class="col-sm-3"> 512 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 513 Background Scanning 514 </div> 515 </div> 516 </div> 517 <div class="row"> 518 <div id="footer" class="col-sm-12"> 519 <div>Centrora '.date('Y').' a portfolio of Luxur Group PTY LTD, All rights reserved.</div> 520 </div> 521 </div>'; 522 } 496 523 } -
ose-firewall/trunk/classes/Library/fwscanner/fwscannerad.php
r1446915 r1581581 157 157 $attackContent = $value; 158 158 $attackVar = ($index == 'GET') ? "get." . $key : "post." . $key; 159 if (is_array($attackContent)) { 160 $attackContent = implode("|", $attackContent); 161 } 162 preg_match_all("/" . $option['filter'] . "/ims", $attackContent, $matched); 163 if (!empty($matched[0])) { 164 $tmpResult = $this->composeResult($option['impact'], $matched[0], $option['id'], $option['attacktype'], $attackVar, 'ad'); 165 $tmpResults[] = $tmpResult; 166 $impact += $option['impact']; 167 } 159 if(!empty($attackContent)) { 160 if (is_array($attackContent)) { 161 $attackContent1 = $this->array_flatten($attackContent); 162 $attackContent = implode("|", $attackContent1); 163 } 164 preg_match_all("/" . $option['filter'] . "/ims", $attackContent, $matched); 165 if (!empty($matched[0])) { 166 $tmpResult = $this->composeResult($option['impact'], $matched[0], $option['id'], $option['attacktype'], $attackVar, 'ad'); 167 $tmpResults[] = $tmpResult; 168 $impact += $option['impact']; 169 } 170 } 168 171 } 169 172 } … … 311 314 } 312 315 } 316 317 public function array_flatten($array) { 318 if (!is_array($array)) { 319 return FALSE; 320 } 321 $result = array(); 322 foreach ($array as $key => $value) { 323 if (is_array($value)) { 324 $result = array_merge($result, $this->array_flatten($value)); 325 } 326 else { 327 $result[$key] = $value; 328 } 329 } 330 return $result; 331 } 313 332 } -
ose-firewall/trunk/classes/Library/oem/218.php
r1387925 r1581581 103 103 return '<li><a href="http://www.webandwire.de" title="Home">Quick links: <i class="glyphicon glyphicon-home"></i> <span class="hidden-xs hidden-sm hidden-md">'.OSE_WORDPRESS_FIREWALL_SHORT.'</span> </a></li>'; 104 104 } 105 106 public function getCalltoAction() 107 { 108 return '<div class="row row-set" style="margin-top:14px;"> 109 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 110 <a href="https://webandwire.de/" target="_blank"><div class="call-to-action"> 111 <div class="call-to-action-txt"> 112 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/logo-header.png"> 113 Schedule your scanning and update with WEBandWIRE PagePROTECT <sup>Now</sup></div> 114 </div></a> 115 </div> 116 <div class="col-sm-3"> 117 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 118 Background Scanning 119 </div> 120 </div> 121 </div>'; 122 } 123 124 public function getCallToActionAndFooter() 125 { 126 return '<div class="row row-set" style="margin-top:14px;"> 127 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 128 <a href="https://webandwire.de/" target="_blank"><div class="call-to-action"> 129 <div class="call-to-action-txt"> 130 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/logo-header.png"> 131 Schedule your scanning and update with WEBandWIRE PagePROTECT <sup>Now</sup></div> 132 </div></a> 133 </div> 134 <div class="col-sm-3"> 135 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 136 Background Scanning 137 </div> 138 </div> 139 </div> 140 <div class="row"> 141 <div id="footer" class="col-sm-12"> 142 <p class="pull-center"> 143 WEBandWIRE PagePROTECT is a portfolio of WEBandWIRE Internet- und EDV-Dienstleistungen. © <?php echo date("Y"); ?> <a 144 href="https://webandwire.de/" target="_blank">WEBandWIRE PagePROTECT</a>. All Rights Reserved. <br /> Credits 145 to: <a href="http://www.centrora.com" target="_blank">Centrora Security!®</a> 146 </p> 147 </div> 148 </div>'; 149 } 150 151 public function showLoginHeader() 152 { 153 $html = '<div class="bs-callout bs-callout-info fade in">'; 154 $html .= '<span class="icon-separator"> 155 156 </span>'; 157 $html .= '<div class="header-wrapper"> 158 WEBandWIRE PagePROTECT Member Login<small> You can login here with your WEBandWIRE PagePROTECT Account to activate your premium services</small> 159 </div>'; 160 $html .= '</div>'; 161 echo $html; 162 } 105 163 } -
ose-firewall/trunk/classes/Library/oem/236.php
r1387925 r1581581 76 76 return '<li><a href="http://gabemedia.dk" title="Home">Quick links: <i class="glyphicon glyphicon-home"></i> <span class="hidden-xs hidden-sm hidden-md">'.OSE_WORDPRESS_FIREWALL_SHORT.'</span> </a></li>'; 77 77 } 78 79 public function getCallToActionAndFooter() 80 { 81 return '<div class="row row-set" style="margin-top:14px;"> 82 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 83 <a href="http://gabemedia.dk/" target="_blank"><div class="call-to-action"> 84 <div class="call-to-action-txt"> 85 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/logo-header.png"> 86 Schedule your scanning and update with Gabemedia Security <sup>Now</sup></div> 87 </div></a> 88 </div> 89 <div class="col-sm-3"> 90 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 91 Background Scanning 92 </div> 93 </div> 94 </div> 95 <div class="row"> 96 <div id="footer" class="col-sm-12"> 97 <p class="pull-center"> 98 Gabemedia Security is a portfolio of Gabemedia. © <?php echo date("Y"); ?> <a 99 href="http://gabemedia.dk/" target="_blank">Gabemedia</a>. All Rights Reserved. <br /> Credits 100 to: <a href="http://www.centrora.com" target="_blank">Centrora Security!®</a> 101 </p> 102 </div> 103 </div>'; 104 } 105 106 public function showLoginHeader() 107 { 108 $html = '<div class="bs-callout bs-callout-info fade in">'; 109 $html .= '<span class="icon-separator"> 110 111 </span>'; 112 $html .= '<div class="header-wrapper"> 113 Gabemedia Member Login<small> You can login here with your Gabemedia Account to activate your premium services</small> 114 </div>'; 115 $html .= '</div>'; 116 echo $html; 117 } 78 118 } -
ose-firewall/trunk/classes/Library/oem/547.php
r1388930 r1581581 43 43 } 44 44 public function addLogo () { 45 return '<div class="logo"><img src="'.OSE_FWPUBLICURL.' css/oem/'.$this->customer_id.'/imgs/logo-header.png" alt ="Premium eSecurity"/></div>';45 return '<div class="logo"><img src="'.OSE_FWPUBLICURL.'/css/oem/'.$this->customer_id.'/imgs/logo-header.png" alt ="Premium eSecurity"/></div>'; 46 46 } 47 47 public function defineVendorName () { … … 62 62 return '<li><a href="http://www.premium.bh/" title="Home">Quick links: <i class="glyphicon glyphicon-home"></i> <span class="hidden-xs hidden-sm hidden-md">'.OSE_WORDPRESS_FIREWALL_SHORT.'</span> </a></li>'; 63 63 } 64 65 public function getCallToActionAndFooter() 66 { 67 return '<div class="row row-set" style="margin-top:14px;"> 68 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 69 <a href="http://www.premium.bh/" target="_blank"><div class="call-to-action"> 70 <div class="call-to-action-txt"> 71 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/logo-header.png"> 72 Schedule your scanning and update with Premium eSecurity <sup>Now</sup></div> 73 </div></a> 74 </div> 75 <div class="col-sm-3"> 76 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 77 Background Scanning 78 </div> 79 </div> 80 </div> 81 <div class="row"> 82 <div id="footer" class="col-sm-12"> 83 <p class="pull-center"> 84 Premium eSecurity is a portfolio of Premium eSecurity. © <?php echo date("Y"); ?> <a 85 href="http://www.premium.bh/" target="_blank">Premium eSecurity</a>. All Rights Reserved. <br /> Credits 86 to: <a href="http://www.centrora.com" target="_blank">Centrora Security!®</a> 87 </p> 88 </div> 89 </div>'; 90 } 91 92 public function showLoginHeader() 93 { 94 $html = '<div class="bs-callout bs-callout-info fade in">'; 95 $html .= '<span class="icon-separator"> 96 97 </span>'; 98 $html .= '<div class="header-wrapper"> 99 Premium eSecurity Member Login<small> You can login here with your Premium eSecurity Account to activate your premium services</small> 100 </div>'; 101 $html .= '</div>'; 102 echo $html; 103 } 64 104 } -
ose-firewall/trunk/classes/Library/oem/981.php
r1388930 r1581581 63 63 return '<li><a href="http://www.ellipticalinfinity.com/" title="Home">Quick links: <i class="glyphicon glyphicon-home"></i> <span class="hidden-xs hidden-sm hidden-md">'.OSE_WORDPRESS_FIREWALL_SHORT.'</span> </a></li>'; 64 64 } 65 public function getCallToActionAndFooter() 66 { 67 return '<div class="row row-set" style="margin-top:14px;"> 68 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 69 <a href="http://www.ellipticalinfinity.com/" target="_blank"><div class="call-to-action"> 70 <div class="call-to-action-txt"> 71 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/logo-header.png"> 72 Schedule your scanning and update with Elliptical Infinity <sup>Now</sup></div> 73 </div></a> 74 </div> 75 <div class="col-sm-3"> 76 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 77 Background Scanning 78 </div> 79 </div> 80 </div> 81 <div class="row"> 82 <div id="footer" class="col-sm-12"> 83 <p class="pull-center"> 84 Elliptical Infinity Security is a portfolio of Elliptical Infinity. © <?php echo date("Y"); ?> <a 85 href="http://www.ellipticalinfinity.com/" target="_blank">Elliptical Infinity</a>. All Rights Reserved. <br /> Credits 86 to: <a href="http://www.centrora.com" target="_blank">Centrora Security!®</a> 87 </p> 88 </div> 89 </div>'; 90 } 91 92 public function showLoginHeader() 93 { 94 $html = '<div class="bs-callout bs-callout-info fade in">'; 95 $html .= '<span class="icon-separator"> 96 97 </span>'; 98 $html .= '<div class="header-wrapper"> 99 Elliptical Infinity Member Login<small> You can login here with your Elliptical Infinity Account to activate your premium services</small> 100 </div>'; 101 $html .= '</div>'; 102 echo $html; 103 } 65 104 } -
ose-firewall/trunk/classes/Library/oem/999.php
r1387925 r1581581 43 43 } 44 44 public function addLogo () { 45 return '<div class="logo"><img src="'.OSE_FWPUBLICURL.' css/oem/'.$this->customer_id.'/imgs/logo-header.png" width="90px" alt ="ME Security"/></div>'.$this->showOEMName ();45 return '<div class="logo"><img src="'.OSE_FWPUBLICURL.'/css/oem/'.$this->customer_id.'/imgs/logo-header.png" width="90px" alt ="ME Security"/></div>'.$this->showOEMName (); 46 46 } 47 47 public function defineVendorName () { … … 59 59 return true; 60 60 } 61 62 public function getCallToActionAndFooter() 63 { 64 return '<div class="row row-set" style="margin-top:14px;"> 65 <div class="col-sm-12" style="padding-left: 0px; padding-right: 20px;"> 66 <a href="http://www.marketingentourage.com.au/" target="_blank"><div class="call-to-action"> 67 <div class="call-to-action-txt"> 68 <img width="35" height="35" alt="C_puma" src="'.OSE_FWPUBLICURL.'css/oem/'.$this->customer_id.'/imgs/5s.png"> 69 Schedule your scanning and update with ME Security <sup>Now</sup></div> 70 </div></a> 71 </div> 72 <div class="col-sm-3"> 73 <div id="bg-scan" class="vs-bg-dark col-sm-12" data-target="#bgModel" data-toggle="modal" style="display: none"> 74 Background Scanning 75 </div> 76 </div> 77 </div> 78 <div class="row"> 79 <div id="footer" class="col-sm-12"> 80 <p class="pull-center"> 81 ME Security is a portfolio of ME Security. © <?php echo date("Y"); ?> <a 82 href="http://www.marketingentourage.com.au/" target="_blank">ME Security</a>. All Rights Reserved. <br /> Credits 83 to: <a href="http://www.centrora.com" target="_blank">Centrora Security!®</a> 84 </p> 85 </div> 86 </div>'; 87 } 88 89 public function showLoginHeader() 90 { 91 $html = '<div class="bs-callout bs-callout-info fade in">'; 92 $html .= '<span class="icon-separator"> 93 94 </span>'; 95 $html .= '<div class="header-wrapper"> 96 ME Security Member Login<small> You can login here with yourME Security Account to activate your premium services</small> 97 </div>'; 98 $html .= '</div>'; 99 echo $html; 100 } 61 101 } -
ose-firewall/trunk/classes/Library/oem/oem.php
r1442785 r1581581 112 112 return $this->newInstance->addLogo(); 113 113 } 114 public function getCallToActionAndFooter () { 115 return $this->newInstance->getCallToActionAndFooter(); 116 } 114 117 public function showOEMName () { 115 118 if (!empty($this->newInstance)) … … 164 167 return $results; 165 168 } 166 public function loadCSS () { 167 $config = $this->getConfiguration('oem'); 168 if (!empty($config['data']['customer_id'])) { 169 oseFirewall::loadCSSFile ('OEMCss', 'oem/'.$config['data']['customer_id'].'/custom.css', false); 170 } 171 else if (self::isOEMDataExists() ) 172 { 173 $customer_id = self::getCustomerIDFromFile (); 174 oseFirewall::loadCSSFile ('OEMCss', 'oem/'.$customer_id.'/custom.css', false); 175 } 176 } 169 public function loadCSS () { 170 $config = $this->getConfiguration('oem'); 171 if (!empty($config['data']['customer_id'])) { 172 if(OSE_CMS == "joomla" && $config['data']['customer_id'] ==1480) 173 { 174 oseFirewall::loadCSSFile ('OEMCss', 'oem/'.$config['data']['customer_id'].'/customJoomla.css', false); 175 }else { 176 oseFirewall::loadCSSFile ('OEMCss', 'oem/'.$config['data']['customer_id'].'/custom.css', false); 177 } 178 } 179 else if (self::isOEMDataExists() ) { 180 $customer_id = self::getCustomerIDFromFile(); 181 if (OSE_CMS == "joomla" && $customer_id == 1480) { 182 oseFirewall::loadCSSFile('OEMCss', 'oem/' . $customer_id . '/customJoomla.css', false); 183 } else { 184 oseFirewall::loadCSSFile('OEMCss', 'oem/' . $customer_id . '/custom.css', false); 185 } 186 } 187 } 177 188 178 189 public function loadJS() … … 249 260 } 250 261 } 262 263 public function showLoginHeader () { 264 return $this->newInstance->showLoginHeader(); 265 } 266 267 public function getOEMServicesName() 268 { 269 270 } 251 271 } -
ose-firewall/trunk/classes/Library/oseFirewallBase.php
r1487677 r1581581 1020 1020 return str_replace(array('"', "'", '<', '>'), "", $var); 1021 1021 } 1022 public static function prepareErrorMessage($message) 1023 { 1024 $result['status'] = 0; 1025 $result['info'] = $message; 1026 return $result; 1027 } 1028 public static function prepareSuccessMessage($message) 1029 { 1030 $result['status'] = 1; 1031 $result['info'] = $message; 1032 return $result; 1033 } 1034 public static function prepareCustomMessage($status,$message1,$message2) 1035 { 1036 $result['status'] = $status; 1037 $result['info'] = $message1; 1038 $result['info2'] = $message2; 1039 return $result; 1040 } 1022 1041 } -
ose-firewall/trunk/classes/Library/oseFirewallJoomla.php
r1409422 r1581581 375 375 $serverversion = self::getServerVersion(); 376 376 $isOutdated = (self::getVersionCompare($serverversion) > 0)?true:false; 377 $head .='<div id ="versions" class="col-lg-6"> <div class ="'.(($isOutdated==true)?'version-outdated':'version-updated').'"><i class="glyphicon glyphicon-'.(($isOutdated==true)?'remove':'ok').'"></i> '.self::getVersion ().'</div>';377 $head .='<div id ="versions"> <div class ="'.(($isOutdated==true)?'version-outdated':'version-updated').'"><i class="glyphicon glyphicon-'.(($isOutdated==true)?'remove':'ok').'"></i> '.self::getVersion ().'</div>'; 378 378 $urls = $oemShowNews? self::getDashboardURLs() : null; 379 379 oseFirewall::loadJSFile ('CentroraUpdateApp', 'VersionAutoUpdate.js', false); -
ose-firewall/trunk/classes/Library/panel/panel.php
r1496143 r1581581 348 348 349 349 private function getUpdateCheck () { 350 $url = "https://www.centrora.com/accountApi/version/getLastestVersion ";350 $url = "https://www.centrora.com/accountApi/version/getLastestVersion?version=7"; 351 351 $ch = curl_init(); 352 352 curl_setopt($ch, CURLOPT_URL, $url); … … 399 399 // Get a database connector 400 400 $db = JFactory::getDbo(); 401 $zipFileName = "master.zip"; 401 402 if (class_exists('SConfig') && !class_exists('JConfig')) { 402 $zipFileName = "pkg_centrora_suite.zip";403 }403 $url = "https://github.com/Centrora/centrora-suite-update/archive/master.zip"; 404 } 404 405 else { 405 406 if (JOOMLA15 == true) { 406 $zipFileName = "com_centrora_j15.zip";407 $url = "https://github.com/Centrora/centrora-joomla15/archive/master.zip"; 407 408 } 408 409 else { 409 $zipFileName = "pkg_centrora.zip";410 $url = "https://github.com/Centrora/centrora-joomla/archive/master.zip"; 410 411 } 411 412 } 412 $url = "https://www.centrora.com/software/".$zipFileName;413 413 // Define Temp Folder; 414 414 $config = JFactory::getConfig(); -
ose-firewall/trunk/classes/Library/vsscanner/fpscanner.php
r1401965 r1581581 143 143 foreach ($scanList['scanlist'] as $key => $path) { 144 144 if (is_dir($path)) { 145 if (intval(substr(sprintf('%o', fileperms($path)), -4)) >$baseFolderPerm) {145 if (intval(substr(sprintf('%o', fileperms($path)), -4)) != $baseFolderPerm) { 146 146 $vsFileList [] = "<br/><div class='col-md-8'><i class='im im-folder-open text-primary'> </i>$path</div>" 147 147 ."<div class='col-md-1'>".substr(sprintf('%o', fileperms($path)), -4)."</div>"; … … 149 149 } 150 150 } elseif (is_file($path)) { 151 if (intval(substr(sprintf('%o', fileperms($path)), -4)) >$baseFilePerm) {151 if (intval(substr(sprintf('%o', fileperms($path)), -4)) != $baseFilePerm) { 152 152 $vsFileList [] = "<div class='col-md-8'><i class='im im-file9 text-warning'> </i>$path</div>" 153 153 ."<div class='col-md-1'>".substr(sprintf('%o', fileperms($path)), -4)."</div>"; -
ose-firewall/trunk/classes/Library/vsscanner/surfscanner.php
r1496143 r1581581 28 28 } 29 29 oseFirewall::callLibClass('vsscanner', 'vsscanner'); 30 31 30 class surfScanner 32 31 { … … 82 81 { 83 82 $data = array(); 84 $url = 'https://www.centrora.com/accountApi/Maldetect/checkLastMD5Update';83 $url = API_SERVER.'Maldetect/checkLastMD5Update'; 85 84 $serverresult = oseJSON::decode( $this->getJsonData($url), true ); 86 85 $query = 'SELECT MAX(inserted_on) as inserted_on FROM '. $this->db->quoteTable($this->vshashtable); … … 102 101 public function updateMD5DB() 103 102 { 104 $url = 'https://www.centrora.com/accountApi/Maldetect/getUpdateMD5Data'; 105 $resultlist = oseJSON::decode( $this->getJsonData($url), true ); 103 $url = API_SERVER.'Maldetect/getUpdateMD5Data'; 104 $jsonData = $this->getJsonData($url); 105 if(empty($jsonData)) 106 { 107 //server returned null 108 return oseFirewallBase::prepareErrorMessage("Server returned empty hash table \n".CONTACT_SUPPORT); 109 } 110 $resultlist = oseJSON::decode($jsonData, true); 106 111 $this->deleteMD5DBData(); 107 $this->insertMD5DBData($resultlist); 108 return true; 112 $insertResult = $this->insertMD5DBData($resultlist); 113 if($insertResult) 114 { 115 $displayMessage = "MD5 Hash is up to date. Last Updated On : ".date('Y-m-d H:i:s'); 116 return oseFirewallBase::prepareCustomMessage(1,SURF_SCAN_SIG_UPDATED,$displayMessage); 117 }else { 118 return oseFirewallBase::prepareErrorMessage("There was some problem in updating the MD5 Hash database" . "\n".CONTACT_SUPPORT); 119 } 120 109 121 } 110 122 … … 293 305 curl_setopt($ch, CURLOPT_URL, $url); 294 306 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 295 curl_setopt($ch, CURLOPT_TIMEOUT, 5);307 curl_setopt($ch, CURLOPT_TIMEOUT, 10); 296 308 $json_data = curl_exec($ch); 297 309 curl_close($ch); -
ose-firewall/trunk/classes/Library/vsscanner/vsscanner.php
r1460069 r1581581 340 340 $this->clearTable(); 341 341 $this->cleanMalwareData (); 342 $this->clearPathFiles(); 343 $this->clearPattern(); 342 344 $_SESSION['completed'] = 0; 343 345 $_SESSION['start_time'] = time(); … … 361 363 return $result; 362 364 } 365 366 protected function clearPathFiles() 367 { 368 $files = scandir(OSE_FWDATA . ODS . "vsscanPath" . ODS); 369 if (count($files) > 3) { 370 foreach ($files as $file) { 371 if (substr($file,0,4)=="path") { 372 unlink(OSE_FWDATA . ODS . "vsscanPath" . ODS.$file); 373 } 374 } 375 } 376 } 377 363 378 protected function scanFiles () { 364 379 // ini_set("display_errors", "off"); … … 595 610 } 596 611 $i=0; 597 while (!empty($this->vsInfo)) {598 $this->last_scanned = stripslashes(array_pop($this->vsInfo));599 if(oseFile::exists($this->last_scanned)==false) { 600 continue; 601 } 602 if (filesize($this->last_scanned)>2048000) 603 { 604 continue; 605 } 606 else 607 { 608 $this->scanFile($this->last_scanned, $pattern); 609 } 610 // In order to allow the scanner to continue without touching the same files again 611 if ($remote == true && $i == 5) { 612 $i=0;613 $this->createBatchFile ($process, $this->vsInfo) ; 614 } 615 $i++; 616 }612 while (!empty($this->vsInfo)) { 613 $needle = "com_ose_firewall/protected/data"; 614 $this->last_scanned = stripslashes(array_pop($this->vsInfo)); 615 if(strpos($this->last_scanned,$needle) == false) { 616 if (oseFile::exists($this->last_scanned) == false) { 617 continue; 618 } 619 if (filesize($this->last_scanned) > 2048000) { 620 continue; 621 } else { 622 $this->scanFile($this->last_scanned, $pattern); 623 } 624 // In order to allow the scanner to continue without touching the same files again 625 if ($remote == true && $i == 5) { 626 $i = 0; 627 $this->createBatchFile($process, $this->vsInfo); 628 } 629 $i++; 630 } 631 } 617 632 return $this->returnCompleteMsg($this->last_scanned, $process, $size, $lastfileno, $remote); 618 619 633 } 620 634 -
ose-firewall/trunk/ose_firewall_badge.php
r1563627 r1581581 4 4 Description: Plugin For Showing Centrora Security Badge 5 5 Author: Centrora Security 6 Version: 6. 5.166 Version: 6.6.0 7 7 */ 8 8 //include(dirname(__FILE__).'/includes/oseBadgeWidget.php'); -
ose-firewall/trunk/ose_wordpress_firewall.php
r1563627 r1581581 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: 6. 5.167 Version: 6.6.0 8 8 Author URI: http://www.centrora.com/ 9 9 */ … … 20 20 width: 800px;'>Centrora requires PHP 5.3.0, please contact your hosting company to update your PHP version. It will take them 5 seconds to do so.</div>"); 21 21 } 22 23 22 if (function_exists("ini_set")) { 24 ini_set("display_errors", "o ff");23 ini_set("display_errors", "on"); 25 24 } 26 25 // Basic configuration; -
ose-firewall/trunk/public/css/dynamic.css
r1417654 r1581581 17 17 18 18 #logo-labels { 19 background: url(../images/logo4.png) no-repeat 20px 40px #2c88c5;20 19 box-shadow: 0 4px 0 #18a689; 21 20 padding: 20px 10px; … … 74 73 .logo-labels ul li a:active { 75 74 float: left; 76 background: url(../gfx/label-icons.gif) no-repeat left top;77 75 padding: 0 0 0 19px; 78 76 color: #FFFFFF; … … 83 81 .logo-labels ul li.usermessage a, .logo-labels ul li.usermessage a:link, 84 82 .logo-labels ul li.usermessage a:visited, .logo-labels ul li.usermessage a:active { 85 background: url(../gfx/label-icons.gif) no-repeat left -22px;86 83 } 87 84 88 85 .logo-labels ul li.logout a, .logo-labels ul li.logout a:link, 89 86 .logo-labels ul li.logout a:visited, .logo-labels ul li.logout a:active { 90 background: url(../gfx/label-icons.gif) no-repeat left -44px;91 87 } 92 88 93 89 .logo-labels ul li span { 94 90 float: left; 95 background: url(../gfx/label.gif) no-repeat right top;96 91 padding: 0 8px 0 6px; 97 92 overflow: hidden; … … 101 96 102 97 .logo-labels ul li:hover span { 103 background: url(../gfx/label.gif) no-repeat right -22px;104 98 } 105 99 … … 126 120 .menu-search .search input { 127 121 float: left; 128 background: url(../gfx/search-input.gif) no-repeat left top transparent;129 122 border: 0; 130 123 outline: none; … … 144 137 .menu-search .search button { 145 138 float: left; 146 background: url(../gfx/search-button.gif) no-repeat left top transparent;147 139 border: none; 148 140 outline: none; … … 691 683 /*more info refer to bootstrap css file line 5556*/ 692 684 } 693 } 685 694 686 #logo-labels a { 695 687 text-decoration: none; … … 722 714 723 715 /*.active img {*/ 724 /*margin-left: 14px;*/725 /*width: 45px;*/716 /*margin-left: 14px;*/ 717 /*width: 45px;*/ 726 718 /*}*/ 727 719 … … 885 877 /*content: "\2014";*/ 886 878 position: absolute; 879 cursor: pointer; 887 880 } 888 881 … … 1827 1820 1828 1821 1829 1830 1831 1822 #dashmenu { 1832 1823 width: 200px; -
ose-firewall/trunk/public/css/main.css
r1436160 r1581581 5000 5000 color: #fff !important; 5001 5001 } 5002 5003 .md5-icon-refresh:hover { 5004 text-shadow: 1px 1px 1px #343434; 5005 animation-name: spin; 5006 animation-duration: 20s; 5007 animation-iteration-count: infinite; 5008 animation-timing-function: linear; 5009 } 5010 5011 #scan-date{ 5012 clear:both; 5013 background-color: #3c3c48; 5014 color:white; 5015 text-align: center; 5016 font-size: 12px; 5017 box-shadow: 1px 2px 1px -1px #333333; 5018 position: relative; 5019 z-index: 100; 5020 } 5021 5022 #symlink{ 5023 display: none; 5024 } 5025 5026 #mfiles-results { 5027 color: #fff; 5028 } 5029 5030 #folderPerm{ 5031 color: #000; 5032 } 5033 5034 #filePerm{ 5035 color: #000; 5036 } -
ose-firewall/trunk/public/js/fpscan.js
r1387925 r1581581 46 46 $( this ).dialog( "close" ); 47 47 var val = '0' + document.fmode.u.value + document.fmode.g.value + document.fmode.w.value; 48 $ (inputfield).val(val);48 $(inputfield).val(val); 49 49 }, 50 50 Cancel: function() { … … 122 122 moment(ko.unwrap(data.scanDate)).startOf('second').from(ko.unwrap(data.serverNow)) 123 123 ).attr("title", moment(ko.unwrap(data.scanDate)).format('llll')); 124 $('#scan-date').prepend('Last Scan: '); 124 125 } 125 126 } -
ose-firewall/trunk/public/js/mfscan.js
r1387925 r1581581 20 20 showLoading(O_TERMINATE_SCAN); 21 21 location.reload(); 22 } 23 }); 24 25 $('#mod-scanner-ssl').click(function(){ 26 if($('#mod-scanner-ssl').hasClass('fa-square-o')){ 27 $('#mod-scanner-ssl').removeClass('fa-square-o'); 28 $('#mod-scanner-ssl').addClass('fa-check-square-o'); 29 $('#mod-scanner-ssl').css('margin-right','-7px'); 30 $('#symlink').prop('checked', true); 31 } 32 else{ 33 $('#mod-scanner-ssl').removeClass('fa-check-square-o'); 34 $('#mod-scanner-ssl').addClass('fa-square-o'); 35 $('#mod-scanner-ssl').css('margin-right','0px'); 36 $('#symlink').prop('checked', false); 22 37 } 23 38 }); … … 120 135 moment(ko.unwrap(data.scanDate)).startOf('second').from(ko.unwrap(data.serverNow)) 121 136 ).attr("title", moment(ko.unwrap(data.scanDate)).format('llll')); 137 $('#scan-date').prepend('Last Scan: '); 122 138 } 123 139 } -
ose-firewall/trunk/public/js/surfscan.js
r1387925 r1581581 93 93 moment(ko.unwrap(data.scanDate)).startOf('second').from(ko.unwrap(data.serverNow)) 94 94 ).attr("title", moment(ko.unwrap(data.scanDate)).format('llll')); 95 $('#scan-date').prepend('Last Scan: '); 95 96 } 96 97 } … … 149 150 runupdateMD5Sig('updateMD5DB'); 150 151 } else { 152 hideLoading(); 151 153 showMD5Dialogue(data) 152 154 } 155 }else if(action == 'updateMD5DB') 156 { 157 hideLoading(); 158 if(data.status == 1) 159 { 160 $("#hashstatus").html(data.info2); 161 showDialogue(data.info,O_UPDATE_DIALOG_HEADING,O_CLOSE); 162 }else { 163 showDialogue(data.info,O_ERROR,O_CLOSE); 164 } 153 165 } 154 hideLoading();155 166 } 156 167 }); … … 159 170 160 171 function showMD5Dialogue(data) { 172 161 173 bootbox.dialog({ 162 174 message: data.result, -
ose-firewall/trunk/readme.txt
r1563627 r1581581 5 5 Tags: wordpress security, admin, anti-spam, comments, anti-hack, anti-virus, firewall, plugin, virus cleaning, google, phishing, malware, google drive, google drive backup, dropbox, dropbox backup, one drive, one drive backup, virus scanner, malware scanning, malware removal, backup, wordpress backup 6 6 Requires at least: 3.7 7 Tested up to: 4. 5.28 Stable tag: 6. 5.167 Tested up to: 4.7.1 8 Stable tag: 6.6.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 164 164 165 165 == Changelog == 166 = 6.6.0 = 167 * Added new OEM 168 * Improved UI for all scanner sections 169 * Fixed Firewall Scanner bug when variable is an nested array 170 * Updated software update url to github url 171 * Fixed virus scanner bug for whitelisted files 172 * Plesk Panel support 173 * Update PHP Mailer to latest version 166 174 167 175 = 6.5.16 = -
ose-firewall/trunk/vendor/oseframework/emails/phpmailer/phpmailer.php
r1387925 r1581581 26 26 if (!defined('OSE_FRAMEWORK') && !defined('OSE_ADMINPATH') && !defined('_JEXEC')) 27 27 { 28 die('Direct Access Not Allowed');28 die('Direct Access Not Allowed'); 29 29 } 30 30 … … 98 98 * @var string 99 99 */ 100 public $Version = '5.2. 14';100 public $Version = '5.2.22'; 101 101 102 102 /** … … 268 268 * An ID to be used in the Message-ID header. 269 269 * If empty, a unique id will be generated. 270 * You can set your own, but it must be in the format "<id@domain>", 271 * as defined in RFC5322 section 3.6.4 or it will be ignored. 272 * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 270 273 * @var string 271 274 */ … … 352 355 /** 353 356 * SMTP auth type. 354 * Options are LOGIN (default), PLAIN, NTLM, CRAM-MD5357 * Options are CRAM-MD5, LOGIN, PLAIN, NTLM, XOAUTH2, attempted in that order if not specified 355 358 * @var string 356 359 */ … … 419 422 * Whether to split multiple to addresses into multiple messages 420 423 * or send them all in one message. 424 * Only supported in `mail` and `sendmail` transports, not in SMTP. 421 425 * @var boolean 422 426 */ … … 461 465 /** 462 466 * DKIM Identity. 463 * Usually the email address used as the source of the email 467 * Usually the email address used as the source of the email. 464 468 * @var string 465 469 */ … … 485 489 */ 486 490 public $DKIM_private = ''; 491 492 /** 493 * DKIM private key string. 494 * If set, takes precedence over `$DKIM_private`. 495 * @var string 496 */ 497 public $DKIM_private_string = ''; 487 498 488 499 /** … … 514 525 515 526 /** 527 * Which validator to use by default when validating email addresses. 528 * May be a callable to inject your own validator, but there are several built-in validators. 529 * @see PHPMailer::validateAddress() 530 * @var string|callable 531 * @static 532 */ 533 public static $validator = 'auto'; 534 535 /** 516 536 * An instance of the SMTP sender class. 517 537 * @var SMTP … … 701 721 * @param boolean $exceptions Should we throw external exceptions? 702 722 */ 703 public function __construct($exceptions = false) 704 { 705 $this->exceptions = (boolean)$exceptions; 723 public function __construct($exceptions = null) 724 { 725 if ($exceptions !== null) { 726 $this->exceptions = (boolean)$exceptions; 727 } 706 728 } 707 729 … … 712 734 { 713 735 //Close any open SMTP connection nicely 714 if ($this->Mailer == 'smtp') { 715 $this->smtpClose(); 716 } 736 $this->smtpClose(); 717 737 } 718 738 … … 738 758 $subject = $this->encodeHeader($this->secureHeader($subject)); 739 759 } 740 if (ini_get('safe_mode') || !($this->UseSendmailOptions)) { 760 761 //Can't use additional_parameters in safe_mode, calling mail() with null params breaks 762 //@link http://php.net/manual/en/function.mail.php 763 if (ini_get('safe_mode') or !$this->UseSendmailOptions or is_null($params)) { 741 764 $result = @mail($to, $subject, $body, $header); 742 765 } else { … … 745 768 return $result; 746 769 } 747 748 770 /** 749 771 * Output debugging info via user-defined method. … … 771 793 //Cleans up output a bit for a better looking, HTML-safe output 772 794 echo htmlentities( 773 preg_replace('/[\r\n]+/', '', $str),774 ENT_QUOTES,775 'UTF-8'776 )777 . "<br>\n";795 preg_replace('/[\r\n]+/', '', $str), 796 ENT_QUOTES, 797 'UTF-8' 798 ) 799 . "<br>\n"; 778 800 break; 779 801 case 'echo': 780 802 default: 781 803 //Normalize line breaks 782 $str = preg_replace('/ (\r\n|\r|\n)/ms', "\n", $str);804 $str = preg_replace('/\r\n?/ms', "\n", $str); 783 805 echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( 784 "\n",785 "\n \t ",786 trim($str)787 ) . "\n";806 "\n", 807 "\n \t ", 808 trim($str) 809 ) . "\n"; 788 810 } 789 811 } … … 1094 1116 * Check that a string looks like an email address. 1095 1117 * @param string $address The email address to check 1096 * @param string $patternselect A selector for the validation pattern to use :1118 * @param string|callable $patternselect A selector for the validation pattern to use : 1097 1119 * * `auto` Pick best pattern automatically; 1098 1120 * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0, PHP >= 5.3.2, 5.2.14; … … 1101 1123 * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. 1102 1124 * * `noregex` Don't use a regex: super fast, really dumb. 1125 * Alternatively you may pass in a callable to inject your own validator, for example: 1126 * PHPMailer::validateAddress('[email protected]', function($address) { 1127 * return (strpos($address, '@') !== false); 1128 * }); 1129 * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. 1103 1130 * @return boolean 1104 1131 * @static 1105 1132 * @access public 1106 1133 */ 1107 public static function validateAddress($address, $patternselect = 'auto') 1108 { 1134 public static function validateAddress($address, $patternselect = null) 1135 { 1136 if (is_null($patternselect)) { 1137 $patternselect = self::$validator; 1138 } 1139 if (is_callable($patternselect)) { 1140 return call_user_func($patternselect, $address); 1141 } 1109 1142 //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 1110 1143 if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { … … 1223 1256 $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); 1224 1257 if (($punycode = defined('INTL_IDNA_VARIANT_UTS46') ? 1225 idn_to_ascii($domain) :1226 idn_to_ascii($domain)) !== false) {1258 idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46) : 1259 idn_to_ascii($domain)) !== false) { 1227 1260 return substr($address, 0, $pos) . $punycode; 1228 1261 } … … 1328 1361 // Sign with DKIM if enabled 1329 1362 if (!empty($this->DKIM_domain) 1330 && !empty($this->DKIM_private)1331 1363 && !empty($this->DKIM_selector) 1332 && file_exists($this->DKIM_private)) { 1364 && (!empty($this->DKIM_private_string) 1365 || (!empty($this->DKIM_private) && file_exists($this->DKIM_private)) 1366 ) 1367 ) { 1333 1368 $header_dkim = $this->DKIM_Add( 1334 1369 $this->MIMEHeader . $this->mailHeader, … … 1396 1431 protected function sendmailSend($header, $body) 1397 1432 { 1398 if ($this->Sender != '') { 1433 // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. 1434 if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { 1399 1435 if ($this->Mailer == 'qmail') { 1400 $sendmail = sprintf('%s -f%s', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));1436 $sendmailFmt = '%s -f%s'; 1401 1437 } else { 1402 $sendmail = sprintf('%s -oi -f%s -t', escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender));1438 $sendmailFmt = '%s -oi -f%s -t'; 1403 1439 } 1404 1440 } else { 1405 1441 if ($this->Mailer == 'qmail') { 1406 $sendmail = sprintf('%s', escapeshellcmd($this->Sendmail));1442 $sendmailFmt = '%s'; 1407 1443 } else { 1408 $sendmail = sprintf('%s -oi -t', escapeshellcmd($this->Sendmail)); 1409 } 1410 } 1444 $sendmailFmt = '%s -oi -t'; 1445 } 1446 } 1447 1448 // TODO: If possible, this should be changed to escapeshellarg. Needs thorough testing. 1449 $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); 1450 1411 1451 if ($this->SingleTo) { 1412 1452 foreach ($this->SingleToArray as $toAddr) { … … 1455 1495 1456 1496 /** 1497 * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. 1498 * 1499 * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. 1500 * @param string $string The string to be validated 1501 * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report 1502 * @access protected 1503 * @return boolean 1504 */ 1505 protected static function isShellSafe($string) 1506 { 1507 // Future-proof 1508 if (escapeshellcmd($string) !== $string 1509 or !in_array(escapeshellarg($string), array("'$string'", "\"$string\"")) 1510 ) { 1511 return false; 1512 } 1513 1514 $length = strlen($string); 1515 1516 for ($i = 0; $i < $length; $i++) { 1517 $c = $string[$i]; 1518 1519 // All other characters have a special meaning in at least one common shell, including = and +. 1520 // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. 1521 // Note that this does permit non-Latin alphanumeric characters based on the current locale. 1522 if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { 1523 return false; 1524 } 1525 } 1526 1527 return true; 1528 } 1529 1530 /** 1457 1531 * Send mail using the PHP mail() function. 1458 1532 * @param string $header The message headers … … 1471 1545 $to = implode(', ', $toArr); 1472 1546 1473 if (empty($this->Sender)) { 1474 $params = ' '; 1475 } else { 1476 $params = sprintf('-f%s', $this->Sender); 1477 } 1478 if ($this->Sender != '' and !ini_get('safe_mode')) { 1547 $params = null; 1548 //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver 1549 if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { 1550 // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. 1551 if (self::isShellSafe($this->Sender)) { 1552 $params = sprintf('-f%s', $this->Sender); 1553 } 1554 } 1555 if (!empty($this->Sender) and !ini_get('safe_mode') and $this->validateAddress($this->Sender)) { 1479 1556 $old_from = ini_get('sendmail_from'); 1480 1557 ini_set('sendmail_from', $this->Sender); 1481 1558 } 1482 1559 $result = false; 1483 if ($this->SingleTo &&count($toArr) > 1) {1560 if ($this->SingleTo and count($toArr) > 1) { 1484 1561 foreach ($toArr as $toAddr) { 1485 1562 $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); … … 1530 1607 throw new cPHPMailerException($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); 1531 1608 } 1532 if ('' == $this->Sender) { 1609 if (!empty($this->Sender) and $this->validateAddress($this->Sender)) { 1610 $smtp_from = $this->Sender; 1611 } else { 1533 1612 $smtp_from = $this->From; 1534 } else {1535 $smtp_from = $this->Sender;1536 1613 } 1537 1614 if (!$this->smtp->mail($smtp_from)) { … … 1587 1664 * @return boolean 1588 1665 */ 1589 public function smtpConnect($options = array())1666 public function smtpConnect($options = null) 1590 1667 { 1591 1668 if (is_null($this->smtp)) { 1592 1669 $this->smtp = $this->getSMTPInstance(); 1670 } 1671 1672 //If no options are provided, use whatever is set in the instance 1673 if (is_null($options)) { 1674 $options = $this->SMTPOptions; 1593 1675 } 1594 1676 … … 1662 1744 throw new cPHPMailerException($this->lang('connect_host')); 1663 1745 } 1664 // We must resend HELO after tlsnegotiation1746 // We must resend EHLO after TLS negotiation 1665 1747 $this->smtp->hello($hello); 1666 1748 } … … 1701 1783 public function smtpClose() 1702 1784 { 1703 if ( $this->smtp !== null) {1785 if (is_a($this->smtp, 'SMTP')) { 1704 1786 if ($this->smtp->connected()) { 1705 1787 $this->smtp->quit(); … … 1720 1802 public function setLanguage($langcode = 'en', $lang_path = '') 1721 1803 { 1804 // Backwards compatibility for renamed language codes 1805 $renamed_langcodes = array( 1806 'br' => 'pt_br', 1807 'cz' => 'cs', 1808 'dk' => 'da', 1809 'no' => 'nb', 1810 'se' => 'sv', 1811 ); 1812 1813 if (isset($renamed_langcodes[$langcode])) { 1814 $langcode = $renamed_langcodes[$langcode]; 1815 } 1816 1722 1817 // Define full set of translatable strings in English 1723 1818 $PHPMAILER_LANG = array( … … 1745 1840 // Calculate an absolute path so it can work if CWD is not here 1746 1841 $lang_path = dirname(__FILE__). DIRECTORY_SEPARATOR . 'language'. DIRECTORY_SEPARATOR; 1842 } 1843 //Validate $langcode 1844 if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { 1845 $langcode = 'en'; 1747 1846 } 1748 1847 $foundlang = true; … … 2039 2138 } 2040 2139 2140 // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 2141 // https://tools.ietf.org/html/rfc5322#section-3.6.4 2041 2142 if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { 2042 2143 $this->lastMessageID = $this->MessageID; … … 2145 2246 2146 2247 /** 2248 * Create unique ID 2249 * @return string 2250 */ 2251 protected function generateId() { 2252 return md5(uniqid(time())); 2253 } 2254 2255 /** 2147 2256 * Assemble the message body. 2148 2257 * Returns an empty string on failure. … … 2155 2264 $body = ''; 2156 2265 //Create unique IDs and preset boundaries 2157 $this->uniqueid = md5(uniqid(time()));2266 $this->uniqueid = $this->generateId(); 2158 2267 $this->boundary[1] = 'b1_' . $this->uniqueid; 2159 2268 $this->boundary[2] = 'b2_' . $this->uniqueid; … … 2171 2280 if ($bodyEncoding == '8bit' and !$this->has8bitChars($this->Body)) { 2172 2281 $bodyEncoding = '7bit'; 2282 //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit 2173 2283 $bodyCharSet = 'us-ascii'; 2174 2284 } 2175 2285 //If lines are too long, and we're not already using an encoding that will shorten them, 2176 //change to quoted-printable transfer encoding 2286 //change to quoted-printable transfer encoding for the body part only 2177 2287 if ('base64' != $this->Encoding and self::hasLineLongerThanMax($this->Body)) { 2178 $this->Encoding = 'quoted-printable';2179 2288 $bodyEncoding = 'quoted-printable'; 2180 2289 } … … 2185 2294 if ($altBodyEncoding == '8bit' and !$this->has8bitChars($this->AltBody)) { 2186 2295 $altBodyEncoding = '7bit'; 2296 //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit 2187 2297 $altBodyCharSet = 'us-ascii'; 2188 2298 } 2189 2299 //If lines are too long, and we're not already using an encoding that will shorten them, 2190 //change to quoted-printable transfer encoding 2300 //change to quoted-printable transfer encoding for the alt body part only 2191 2301 if ('base64' != $altBodyEncoding and self::hasLineLongerThanMax($this->AltBody)) { 2192 2302 $altBodyEncoding = 'quoted-printable'; … … 2292 2402 break; 2293 2403 default: 2294 // catch case 'plain' and case '' 2295 $body .= $this->encodeString($this->Body, $bodyEncoding); 2404 // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types 2405 //Reset the `Encoding` property in case we changed it for line length reasons 2406 $this->Encoding = $bodyEncoding; 2407 $body .= $this->encodeString($this->Body, $this->Encoding); 2296 2408 break; 2297 2409 } … … 2399 2511 /** 2400 2512 * Set the message type. 2401 * cPHPMailer only supports some preset message types, 2402 * not arbitrary MIME structures. 2513 * cPHPMailer only supports some preset message types, not arbitrary MIME structures. 2403 2514 * @access protected 2404 2515 * @return void … … 2418 2529 $this->message_type = implode('_', $type); 2419 2530 if ($this->message_type == '') { 2531 //The 'plain' message_type refers to the message having a single body element, not that it is plain-text 2420 2532 $this->message_type = 'plain'; 2421 2533 } … … 2447 2559 /** 2448 2560 * Add an attachment from a path on the filesystem. 2561 * Never use a user-supplied path to a file! 2449 2562 * Returns false if the file could not be found or read. 2450 2563 * @param string $path Path to the attachment. … … 2733 2846 case 'comment': 2734 2847 $matchcount = preg_match_all('/[()"]/', $str, $matches); 2735 // Intentional fall-through2848 // Intentional fall-through 2736 2849 case 'text': 2737 2850 default: … … 2904 3017 // RFC 2047 section 5.2 2905 3018 $pattern = '\(\)"'; 2906 // intentional fall-through2907 // for this reason we build the $pattern without including delimiters and []3019 // intentional fall-through 3020 // for this reason we build the $pattern without including delimiters and [] 2908 3021 case 'text': 2909 3022 default: … … 2972 3085 * This is used in HTML messages that embed the images 2973 3086 * the HTML refers to using the $cid value. 3087 * Never use a user-supplied path to a file! 2974 3088 * @param string $path Path to the attachment. 2975 3089 * @param string $cid Content ID of the attachment; Use this to reference … … 3284 3398 return ($this->error_count > 0); 3285 3399 } 3286 3287 public function useSMTP ($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport) {3288 $this->Host = $smtphost;3289 $this->Port = $smtpport;3290 $this->SMTPSecure = $smtpsecure;3291 $this->SMTPAuth = $smtpauth;3292 $this->Username = $smtpuser;3293 $this->Password = $smtppass;3294 $this->IsSMTP() ;3295 }3296 3400 3297 3401 /** … … 3342 3446 3343 3447 /** 3344 * Create a message from an HTML string. 3345 * Automatically makes modifications for inline images and backgrounds 3346 * and creates a plain-text version by converting the HTML. 3347 * Overwrites any existing values in $this->Body and $this->AltBody 3448 * Create a message body from an HTML string. 3449 * Automatically inlines images and creates a plain-text version by converting the HTML, 3450 * overwriting any existing values in Body and AltBody. 3451 * Do not source $message content from user input! 3452 * $basedir is prepended when handling relative URLs, e.g. <img src="/images/a.png"> and must not be empty 3453 * will look for an image file in $basedir/images/a.png and convert it to inline. 3454 * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) 3455 * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. 3348 3456 * @access public 3349 3457 * @param string $message HTML message string 3350 * @param string $basedir baseline directory for path3458 * @param string $basedir Absolute path to a base directory to prepend to relative paths to images 3351 3459 * @param boolean|callable $advanced Whether to use the internal HTML to text converter 3352 3460 * or your own custom converter @see cPHPMailer::html2text() 3353 * @return string $message 3461 * @return string $message The transformed message Body 3354 3462 */ 3355 3463 public function msgHTML($message, $basedir = '', $advanced = false) … … 3357 3465 preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); 3358 3466 if (array_key_exists(2, $images)) { 3467 if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { 3468 // Ensure $basedir has a trailing / 3469 $basedir .= '/'; 3470 } 3359 3471 foreach ($images[2] as $imgindex => $url) { 3360 3472 // Convert data URIs into embedded images … … 3366 3478 $data = rawurldecode($data); 3367 3479 } 3368 $cid = md5($url) . '@ cPHPMailer.0'; // RFC2392 S 23480 $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 3369 3481 if ($this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, 'base64', $match[1])) { 3370 3482 $message = str_replace( … … 3374 3486 ); 3375 3487 } 3376 } elseif (substr($url, 0, 4) !== 'cid:' && !preg_match('#^[A-z]+://#', $url)) { 3377 // Do not change urls for absolute images (thanks to corvuscorax) 3488 continue; 3489 } 3490 if ( 3491 // Only process relative URLs if a basedir is provided (i.e. no absolute local paths) 3492 !empty($basedir) 3493 // Ignore URLs containing parent dir traversal (..) 3494 && (strpos($url, '..') === false) 3378 3495 // Do not change urls that are already inline images 3496 && substr($url, 0, 4) !== 'cid:' 3497 // Do not change absolute URLs, including anonymous protocol 3498 && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) 3499 ) { 3379 3500 $filename = basename($url); 3380 3501 $directory = dirname($url); … … 3382 3503 $directory = ''; 3383 3504 } 3384 $cid = md5($url) . '@cPHPMailer.0'; // RFC2392 S 2 3385 if (strlen($basedir) > 1 && substr($basedir, -1) != '/') { 3386 $basedir .= '/'; 3387 } 3505 $cid = md5($url) . '@phpmailer.0'; // RFC2392 S 2 3388 3506 if (strlen($directory) > 1 && substr($directory, -1) != '/') { 3389 3507 $directory .= '/'; … … 3421 3539 * This is used by msgHTML(). 3422 3540 * Note - older versions of this function used a bundled advanced converter 3423 * which was been removed for license reasons in #232 3541 * which was been removed for license reasons in #232. 3424 3542 * Example usage: 3425 3543 * <code> … … 3720 3838 * @access public 3721 3839 * @param string $signHeader 3722 * @throws c PHPMailerException3723 * @return string 3840 * @throws cphpmailerException 3841 * @return string The DKIM signature value 3724 3842 */ 3725 3843 public function DKIM_Sign($signHeader) … … 3731 3849 return ''; 3732 3850 } 3733 $privKeyStr = file_get_contents($this->DKIM_private);3734 if ( $this->DKIM_passphrase != '') {3851 $privKeyStr = !empty($this->DKIM_private_string) ? $this->DKIM_private_string : file_get_contents($this->DKIM_private); 3852 if ('' != $this->DKIM_passphrase) { 3735 3853 $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); 3736 3854 } else { 3737 $privKey = $privKeyStr; 3738 } 3739 if (openssl_sign($signHeader, $signature, $privKey)) { 3740 return base64_encode($signature); 3741 } 3855 $privKey = openssl_pkey_get_private($privKeyStr); 3856 } 3857 //Workaround for missing digest algorithms in old PHP & OpenSSL versions 3858 //@link http://stackoverflow.com/a/11117338/333340 3859 if (version_compare(PHP_VERSION, '5.3.0') >= 0 and 3860 in_array('sha256WithRSAEncryption', openssl_get_md_methods(true))) { 3861 if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { 3862 openssl_pkey_free($privKey); 3863 return base64_encode($signature); 3864 } 3865 } else { 3866 $pinfo = openssl_pkey_get_details($privKey); 3867 $hash = hash('sha256', $signHeader); 3868 //'Magic' constant for SHA256 from RFC3447 3869 //@link https://tools.ietf.org/html/rfc3447#page-43 3870 $t = '3031300d060960864801650304020105000420' . $hash; 3871 $pslen = $pinfo['bits'] / 8 - (strlen($t) / 2 + 3); 3872 $eb = pack('H*', '0001' . str_repeat('FF', $pslen) . '00' . $t); 3873 3874 if (openssl_private_encrypt($eb, $signature, $privKey, OPENSSL_NO_PADDING)) { 3875 openssl_pkey_free($privKey); 3876 return base64_encode($signature); 3877 } 3878 } 3879 openssl_pkey_free($privKey); 3742 3880 return ''; 3743 3881 } … … 3756 3894 list($heading, $value) = explode(':', $line, 2); 3757 3895 $heading = strtolower($heading); 3758 $value = preg_replace('/\s +/', ' ', $value); // Compress useless spaces3896 $value = preg_replace('/\s{2,}/', ' ', $value); // Compress useless spaces 3759 3897 $lines[$key] = $heading . ':' . trim($value); // Don't forget to remove WSP around the value 3760 3898 } … … 3794 3932 public function DKIM_Add($headers_line, $subject, $body) 3795 3933 { 3796 $DKIMsignatureType = 'rsa-sha 1'; // Signature & hash algorithms3934 $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms 3797 3935 $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body 3798 3936 $DKIMquery = 'dns/txt'; // Query method … … 3802 3940 $from_header = ''; 3803 3941 $to_header = ''; 3942 $date_header = ''; 3804 3943 $current = ''; 3805 3944 foreach ($headers as $header) { … … 3810 3949 $to_header = $header; 3811 3950 $current = 'to_header'; 3951 } elseif (strpos($header, 'Date:') === 0) { 3952 $date_header = $header; 3953 $current = 'date_header'; 3812 3954 } else { 3813 3955 if (!empty($$current) && strpos($header, ' =?') === 0) { … … 3820 3962 $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); 3821 3963 $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); 3964 $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); 3822 3965 $subject = str_replace( 3823 3966 '|', … … 3827 3970 $body = $this->DKIM_BodyC($body); 3828 3971 $DKIMlen = strlen($body); // Length of body 3829 $DKIMb64 = base64_encode(pack('H*', sha1($body))); // Base64 of packed binary SHA-1hash of body3972 $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body 3830 3973 if ('' == $this->DKIM_identity) { 3831 3974 $ident = ''; … … 3840 3983 ";\r\n" . 3841 3984 "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . 3842 "\th=From:To: Subject;\r\n" .3985 "\th=From:To:Date:Subject;\r\n" . 3843 3986 "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . 3844 3987 "\tz=$from\r\n" . 3845 3988 "\t|$to\r\n" . 3989 "\t|$date\r\n" . 3846 3990 "\t|$subject;\r\n" . 3847 3991 "\tbh=" . $DKIMb64 . ";\r\n" . … … 3850 3994 $from_header . "\r\n" . 3851 3995 $to_header . "\r\n" . 3996 $date_header . "\r\n" . 3852 3997 $subject_header . "\r\n" . 3853 3998 $dkimhdrs -
ose-firewall/trunk/vendor/oseframework/emails/phpmailer/pop3.php
r1387925 r1581581 64 64 * @access public 65 65 */ 66 public $Version = '5.2. 14';66 public $Version = '5.2.22'; 67 67 68 68 /** -
ose-firewall/trunk/vendor/oseframework/emails/phpmailer/smtp.php
r1387925 r1581581 60 60 * @var string 61 61 */ 62 const VERSION = '5.2. 14';62 const VERSION = '5.2.22'; 63 63 64 64 /** … … 111 111 * @see SMTP::VERSION 112 112 */ 113 public $Version = '5.2. 14';113 public $Version = '5.2.22'; 114 114 115 115 /** … … 181 181 182 182 /** 183 * @var array patterns to extract smtp transaction id from smtp reply 184 * Only first capture group will be use, use non-capturing group to deal with it 185 * Extend this class to override this property to fulfil your needs. 186 */ 187 protected $smtp_transaction_id_patterns = array( 188 'exim' => '/[0-9]{3} OK id=(.*)/', 189 'sendmail' => '/[0-9]{3} 2.0.0 (.*) Message/', 190 'postfix' => '/[0-9]{3} 2.0.0 Ok: queued as (.*)/' 191 ); 192 193 /** 183 194 * The socket for the server connection. 184 195 * @var resource … … 236 247 //Avoid clash with built-in function names 237 248 if (!in_array($this->Debugoutput, array('error_log', 'html', 'echo')) and is_callable($this->Debugoutput)) { 238 call_user_func($this->Debugoutput, $str, $ this->do_debug);249 call_user_func($this->Debugoutput, $str, $level); 239 250 return; 240 251 } … … 247 258 //Cleans up output a bit for a better looking, HTML-safe output 248 259 echo htmlentities( 249 preg_replace('/[\r\n]+/', '', $str),250 ENT_QUOTES,251 'UTF-8'252 )253 . "<br>\n";260 preg_replace('/[\r\n]+/', '', $str), 261 ENT_QUOTES, 262 'UTF-8' 263 ) 264 . "<br>\n"; 254 265 break; 255 266 case 'echo': … … 258 269 $str = preg_replace('/(\r\n|\r|\n)/ms', "\n", $str); 259 270 echo gmdate('Y-m-d H:i:s') . "\t" . str_replace( 260 "\n",261 "\n \t ",262 trim($str)263 )."\n";271 "\n", 272 "\n \t ", 273 trim($str) 274 )."\n"; 264 275 } 265 276 } … … 302 313 if ($streamok) { 303 314 $socket_context = stream_context_create($options); 304 //Suppress errors; connection failures are handled at a higher level305 $this->smtp_conn = @stream_socket_client(315 set_error_handler(array($this, 'errorHandler')); 316 $this->smtp_conn = stream_socket_client( 306 317 $host . ":" . $port, 307 318 $errno, … … 311 322 $socket_context 312 323 ); 324 restore_error_handler(); 313 325 } else { 314 326 //Fall back to fsockopen which should work in more places, but is missing some features … … 317 329 self::DEBUG_CONNECTION 318 330 ); 331 set_error_handler(array($this, 'errorHandler')); 319 332 $this->smtp_conn = fsockopen( 320 333 $host, … … 324 337 $timeout 325 338 ); 339 restore_error_handler(); 326 340 } 327 341 // Verify we connected properly … … 366 380 return false; 367 381 } 382 383 //Allow the best TLS version(s) we can 384 $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; 385 386 //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT 387 //so add them back in manually if we can 388 if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { 389 $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; 390 $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; 391 } 392 368 393 // Begin encrypted connection 369 394 if (!stream_socket_enable_crypto( 370 395 $this->smtp_conn, 371 396 true, 372 STREAM_CRYPTO_METHOD_TLS_CLIENT397 $crypto_method 373 398 )) { 374 399 return false; … … 403 428 404 429 if (array_key_exists('EHLO', $this->server_caps)) { 405 // SMTP extensions are available. Let's try to find a proper authentication method430 // SMTP extensions are available. Let's try to find a proper authentication method 406 431 407 432 if (!array_key_exists('AUTH', $this->server_caps)) { … … 419 444 420 445 if (empty($authtype)) { 421 foreach (array(' LOGIN', 'CRAM-MD5', 'NTLM', 'PLAIN', 'XOAUTH2') as $method) {446 foreach (array('CRAM-MD5', 'LOGIN', 'PLAIN', 'NTLM', 'XOAUTH2') as $method) { 422 447 if (in_array($method, $this->server_caps['AUTH'])) { 423 448 $authtype = $method; … … 493 518 $ntlm_client = new ntlm_sasl_client_class; 494 519 //Check that functions are available 495 if (!$ntlm_client-> Initialize($temp)) {520 if (!$ntlm_client->initialize($temp)) { 496 521 $this->setError($temp->error); 497 522 $this->edebug( … … 503 528 } 504 529 //msg1 505 $msg1 = $ntlm_client-> TypeMsg1($realm, $workstation); //msg1530 $msg1 = $ntlm_client->typeMsg1($realm, $workstation); //msg1 506 531 507 532 if (!$this->sendCommand( … … 522 547 ); 523 548 //msg3 524 $msg3 = $ntlm_client-> TypeMsg3(549 $msg3 = $ntlm_client->typeMsg3( 525 550 $ntlm_res, 526 551 $username, … … 766 791 { 767 792 $this->server_caps = array(); 768 $lines = explode("\n", $this-> last_reply);793 $lines = explode("\n", $this->helo_rply); 769 794 770 795 foreach ($lines as $n => $s) { … … 1208 1233 return $this->Timeout; 1209 1234 } 1235 1236 /** 1237 * Reports an error number and string. 1238 * @param integer $errno The error number returned by PHP. 1239 * @param string $errmsg The error message returned by PHP. 1240 */ 1241 protected function errorHandler($errno, $errmsg) 1242 { 1243 $notice = 'Connection: Failed to connect to server.'; 1244 $this->setError( 1245 $notice, 1246 $errno, 1247 $errmsg 1248 ); 1249 $this->edebug( 1250 $notice . ' Error number ' . $errno . '. "Error notice: ' . $errmsg, 1251 self::DEBUG_CONNECTION 1252 ); 1253 } 1254 1255 /** 1256 * Will return the ID of the last smtp transaction based on a list of patterns provided 1257 * in SMTP::$smtp_transaction_id_patterns. 1258 * If no reply has been received yet, it will return null. 1259 * If no pattern has been matched, it will return false. 1260 * @return bool|null|string 1261 */ 1262 public function getLastTransactionID() 1263 { 1264 $reply = $this->getLastReply(); 1265 1266 if (empty($reply)) { 1267 return null; 1268 } 1269 1270 foreach($this->smtp_transaction_id_patterns as $smtp_transaction_id_pattern) { 1271 if(preg_match($smtp_transaction_id_pattern, $reply, $matches)) { 1272 return $matches[1]; 1273 } 1274 } 1275 1276 return false; 1277 } 1210 1278 } 1211 ?> -
ose-firewall/trunk/vendor/oseframework/users/oseUsers.php
r1417654 r1581581 26 26 if (!defined('OSE_FRAMEWORK') && !defined('OSE_ADMINPATH') && !defined('_JEXEC')) 27 27 { 28 die('Direct Access Not Allowed');28 die('Direct Access Not Allowed'); 29 29 } 30 30 class oseUsers 31 31 { 32 private $cms = null; 33 private $db = null; 34 private static $cmsStatic = null; 35 public function __construct($app) 36 { 37 $this->app = $app; 38 $this->setCMS(); 39 $this->setDB(); 40 } 41 private function setCMS() 42 { 43 if (defined('_JEXEC')) 44 { 45 $this->cms = 'joomla'; 46 } 47 else 48 if (defined('WPLANG') || defined('WPINC')) 49 { 50 $this->cms = 'wordpress'; 51 } 52 } 53 private static function setCMSStatic() 54 { 55 if (defined('_JEXEC')) 56 { 57 self::$cmsStatic = 'joomla'; 58 } 59 else 60 if (defined('WPLANG') || defined('WPINC')) 61 { 62 self::$cmsStatic = 'wordpress'; 63 } 64 } 65 private function setDB() 66 { 67 switch ($this->cms) 68 { 69 case 'joomla': 70 $this->db = oseJoomla::getDBO(); 71 break; 72 case 'wordpress': 73 $this->db = oseWordpress::getDBO(); 74 break; 75 } 76 } 77 public function getAdminUsers() 78 { 79 if ($this->cms == 'joomla') 80 { 81 $admins = $this->getJoomlaAdmin(); 82 } 83 else 84 { 85 $admins = $this->getWordpressAdmin(); 86 } 87 return $admins; 88 } 89 public function getAllUsers() 90 { 91 if ($this->cms == 'joomla') 92 { 93 $admins = $this->getJoomlaUsers(); 94 } 95 else 96 { 97 $admins = $this->getWordpressUsers(); 98 } 99 return $admins; 100 } 101 private function getJoomlaAdmin() 102 { 103 $groupids = $this->getJoomlaAdminGroups(); 104 $where = array(); 105 $where[] = ' `group_id` IN ('.implode(',', $groupids).') '; 106 $where = $this->db->implodeWhere($where); 107 $query = 'SELECT `id`, `name` FROM `#__users` AS user LEFT JOIN `#__user_usergroup_map` as map ON user.id = map.user_id '.$where; 108 $this->db->setQuery($query); 109 return $this->db->loadObjectList(); 110 } 111 private function getWordpressAdmin() 112 { 113 $adminids = $this->get_super_admins(); 114 $return = array(); 115 for ($i = 0; $i < COUNT($adminids); $i++) 116 { 117 $user = get_user_by('id', $adminids[$i]); 118 $return[$i]['id'] = $user->ID; 119 $return[$i]['name'] = $user->display_name; 120 } 121 return $return; 122 } 123 public function get_super_admins() 124 { 125 $query = "SELECT * FROM `#__usermeta` where `meta_value` LIKE '%administrator%'"; 126 $this->db->setQuery($query); 127 $objList = $this->db->loadObjectList(); 128 $return = array(); 129 foreach ($objList as $obj) 130 { 131 if (preg_match("/[wp|\w+]\_*capabilities/", $obj->meta_key)) 132 { 133 $return[] = $obj->user_id; 134 } 135 } 136 return $return; 137 } 138 private function getWordpressUsers() 139 { 140 $where = ''; 141 oseFramework::loadRequest(); 142 $query = oRequest::getVar('query', null); 143 if (!empty($query)) 144 { 145 $where = ' WHERE `user_nicename` LIKE "%'.$this->db->quoteValue($query).'%"'; 146 } 147 $query = "SELECT `ID`, `user_nicename` as `name` FROM `#__users` ".$where; 148 $this->db->setQuery($query); 149 return $this->db->loadObjectList(); 150 } 151 public function getJoomlaAdminGroups() 152 { 153 $groups = $this->getJoomlaUserGroupsDB(); 154 $admin_groups = array(); 155 foreach ($groups as $group_id) 156 { 157 if (JAccess::checkGroup($group_id, 'core.login.admin')) 158 { 159 $admin_groups[] = $group_id; 160 } 161 elseif (JAccess::checkGroup($group_id, 'core.admin')) 162 { 163 $admin_groups[] = $group_id; 164 } 165 } 166 $admin_groups = array_unique($admin_groups); 167 return $admin_groups; 168 } 169 private function getJoomlaUserGroupsDB() 170 { 171 $this->db->setQuery("SELECT `id` FROM `#__usergroups`"); 172 $groups = $this->db->loadObjectList(); 173 $return = array(); 174 foreach ($groups as $group) 175 { 176 $return[] = $group->id; 177 } 178 return $return; 179 } 180 public function getJoomlaUserGroups() 181 { 182 $user = JFactory::getUser(); 183 $user_groups = JAccess::getGroupsByUser($user->id); 184 return $user_groups; 185 } 186 public function registerUser($userInfo) 187 { 188 return wp_insert_user($userInfo); 189 } 190 public static function isLoggedin() 191 { 192 if (class_exists('oseWordpress')) 193 { 194 return is_user_logged_in(); 195 } 196 else 197 { 198 $user = JFactory::getUser(); 199 return ($user->guest == true) ? false : true; 200 } 201 } 202 public static function getUserID() 203 { 204 self::setCMSStatic(); 205 if (self::$cmsStatic == 'joomla') 206 { 207 $user = JFactory::getUser(); 208 return $user->id; 209 } 210 else 211 { 212 $current_user = wp_get_current_user(); 213 return $current_user->ID; 214 } 215 } 216 public function isAdmin() 217 { 218 self::setCMSStatic(); 219 if (self::$cmsStatic == 'joomla') 220 { 221 $current_user = JFactory::getUser(); 222 $adminids = $this->getJoomlaAdminGroups(); 223 $result = false; 224 foreach ($current_user->groups as $group) 225 { 226 if (in_array($group, $adminids)) 227 { 228 $result = true; 229 break; 230 } 231 } 232 return $result; 233 } 234 else 235 { 236 if (!function_exists('wp_get_current_user')) { 237 $this->loadUserClass (); 238 } 239 $current_user = wp_get_current_user(); 240 $adminids = $this->get_super_admins (); 241 return (in_array($current_user->ID, $adminids)); 242 } 243 } 244 protected function loadUserClass () { 245 require_once(ABSPATH."wp-includes/pluggable.php"); 246 require_once(ABSPATH."wp-includes/functions.php"); 247 } 248 public static function getUserLogin() 249 { 250 self::setCMSStatic(); 251 if (self::$cmsStatic == 'joomla') 252 { 253 $current_user = JFactory::getUser(); 254 return $current_user->username; 255 } 256 else 257 { 258 $current_user = wp_get_current_user(); 259 return $current_user->user_login; 260 } 261 } 262 public static function getUserEmail() 263 { 264 self::setCMSStatic(); 265 if (self::$cmsStatic == 'joomla') 266 { 267 $current_user = JFactory::getUser(); 268 return $current_user->email; 269 } 270 else 271 { 272 $current_user = wp_get_current_user(); 273 return $current_user->user_email; 274 } 275 } 276 public static function getUserInfo() 277 { 278 self::setCMSStatic(); 279 if (self::$cmsStatic == 'joomla') 280 { 281 $current_user = JFactory::getUser(); 282 $result['name']= $current_user->username; 283 $result['email'] = $current_user->email; 284 return $result; 285 } 286 else 287 { 288 if(!function_exists('wp_get_current_user')) { 289 include(ABSPATH . "wp-includes/pluggable.php"); 290 } 291 $current_user = wp_get_current_user(); 292 $result['name']= $current_user->user_login; 293 $result['email'] = $current_user->user_email; 294 return $result; 295 } 32 private $cms = null; 33 private $db = null; 34 private static $cmsStatic = null; 35 public function __construct($app) 36 { 37 $this->app = $app; 38 $this->setCMS(); 39 $this->setDB(); 40 } 41 private function setCMS() 42 { 43 if (defined('_JEXEC')) 44 { 45 $this->cms = 'joomla'; 46 } 47 else 48 if (defined('WPLANG') || defined('WPINC')) 49 { 50 $this->cms = 'wordpress'; 51 } 52 } 53 private static function setCMSStatic() 54 { 55 if (defined('_JEXEC')) 56 { 57 self::$cmsStatic = 'joomla'; 58 } 59 else 60 if (defined('WPLANG') || defined('WPINC')) 61 { 62 self::$cmsStatic = 'wordpress'; 63 } 64 } 65 private function setDB() 66 { 67 switch ($this->cms) 68 { 69 case 'joomla': 70 $this->db = oseJoomla::getDBO(); 71 break; 72 case 'wordpress': 73 $this->db = oseWordpress::getDBO(); 74 break; 75 } 76 } 77 public function getAdminUsers() 78 { 79 if ($this->cms == 'joomla') 80 { 81 $admins = $this->getJoomlaAdmin(); 82 } 83 else 84 { 85 $admins = $this->getWordpressAdmin(); 86 } 87 return $admins; 88 } 89 public function getAllUsers() 90 { 91 if ($this->cms == 'joomla') 92 { 93 $admins = $this->getJoomlaUsers(); 94 } 95 else 96 { 97 $admins = $this->getWordpressUsers(); 98 } 99 return $admins; 100 } 101 private function getJoomlaAdmin() 102 { 103 $groupids = $this->getJoomlaAdminGroups(); 104 $where = array(); 105 $where[] = ' `group_id` IN ('.implode(',', $groupids).') '; 106 $where = $this->db->implodeWhere($where); 107 $query = 'SELECT `id`, `name` FROM `#__users` AS user LEFT JOIN `#__user_usergroup_map` as map ON user.id = map.user_id '.$where; 108 $this->db->setQuery($query); 109 return $this->db->loadObjectList(); 110 } 111 private function getWordpressAdmin() 112 { 113 $adminids = $this->get_super_admins(); 114 $return = array(); 115 for ($i = 0; $i < COUNT($adminids); $i++) 116 { 117 $user = get_user_by('id', $adminids[$i]); 118 $return[$i]['id'] = $user->ID; 119 $return[$i]['name'] = $user->display_name; 120 } 121 return $return; 122 } 123 public function get_super_admins() 124 { 125 $query = "SELECT * FROM `#__usermeta` where `meta_value` LIKE '%administrator%'"; 126 $this->db->setQuery($query); 127 $objList = $this->db->loadObjectList(); 128 $return = array(); 129 foreach ($objList as $obj) 130 { 131 if (preg_match("/[wp|\w+]\_*capabilities/", $obj->meta_key)) 132 { 133 $return[] = $obj->user_id; 134 } 135 } 136 return $return; 137 } 138 private function getWordpressUsers() 139 { 140 $where = ''; 141 oseFramework::loadRequest(); 142 $query = oRequest::getVar('query', null); 143 if (!empty($query)) 144 { 145 $where = ' WHERE `user_nicename` LIKE "%'.$this->db->quoteValue($query).'%"'; 146 } 147 $query = "SELECT `ID`, `user_nicename` as `name` FROM `#__users` ".$where; 148 $this->db->setQuery($query); 149 return $this->db->loadObjectList(); 150 } 151 public function getJoomlaAdminGroups() 152 { 153 $groups = $this->getJoomlaUserGroupsDB(); 154 $admin_groups = array(); 155 foreach ($groups as $group_id) 156 { 157 if (JAccess::checkGroup($group_id, 'core.login.admin')) 158 { 159 $admin_groups[] = $group_id; 160 } 161 elseif (JAccess::checkGroup($group_id, 'core.admin')) 162 { 163 $admin_groups[] = $group_id; 164 } 165 } 166 $admin_groups = array_unique($admin_groups); 167 return $admin_groups; 168 } 169 private function getJoomlaUserGroupsDB() 170 { 171 $this->db->setQuery("SELECT `id` FROM `#__usergroups`"); 172 $groups = $this->db->loadObjectList(); 173 $return = array(); 174 foreach ($groups as $group) 175 { 176 $return[] = $group->id; 177 } 178 return $return; 179 } 180 public function getJoomlaUserGroups() 181 { 182 $user = JFactory::getUser(); 183 $user_groups = JAccess::getGroupsByUser($user->id); 184 return $user_groups; 185 } 186 public function registerUser($userInfo) 187 { 188 return wp_insert_user($userInfo); 189 } 190 public static function isLoggedin() 191 { 192 if (class_exists('oseWordpress')) 193 { 194 return is_user_logged_in(); 195 } 196 else 197 { 198 $user = JFactory::getUser(); 199 return ($user->guest == true) ? false : true; 200 } 201 } 202 public static function getUserID() 203 { 204 self::setCMSStatic(); 205 if (self::$cmsStatic == 'joomla') 206 { 207 $user = JFactory::getUser(); 208 return $user->id; 209 } 210 else 211 { 212 $current_user = wp_get_current_user(); 213 return $current_user->ID; 214 } 215 } 216 public function isAdmin() 217 { 218 self::setCMSStatic(); 219 if (self::$cmsStatic == 'joomla') 220 { 221 if (class_exists('pm_Session')) { 222 // This is to add super admin access to Suite when root account logs in Plesk 223 $result = pm_Session::getClient()->isAdmin(); 224 } 225 else { 226 $current_user = JFactory::getUser(); 227 $adminids = $this->getJoomlaAdminGroups(); 228 $result = false; 229 foreach ($current_user->groups as $group) 230 { 231 if (in_array($group, $adminids)) 232 { 233 $result = true; 234 break; 235 } 236 } 237 } 238 return $result; 239 } 240 else 241 { 242 if (!function_exists('wp_get_current_user')) { 243 $this->loadUserClass (); 244 } 245 $current_user = wp_get_current_user(); 246 $adminids = $this->get_super_admins (); 247 return (in_array($current_user->ID, $adminids)); 248 } 249 } 250 protected function loadUserClass () { 251 require_once(ABSPATH."wp-includes/pluggable.php"); 252 require_once(ABSPATH."wp-includes/functions.php"); 253 } 254 public static function getUserLogin() 255 { 256 self::setCMSStatic(); 257 if (self::$cmsStatic == 'joomla') 258 { 259 $current_user = JFactory::getUser(); 260 return $current_user->username; 261 } 262 else 263 { 264 $current_user = wp_get_current_user(); 265 return $current_user->user_login; 266 } 267 } 268 public static function getUserEmail() 269 { 270 self::setCMSStatic(); 271 if (self::$cmsStatic == 'joomla') 272 { 273 $current_user = JFactory::getUser(); 274 return $current_user->email; 275 } 276 else 277 { 278 $current_user = wp_get_current_user(); 279 return $current_user->user_email; 280 } 281 } 282 public static function getUserInfo() 283 { 284 self::setCMSStatic(); 285 if (self::$cmsStatic == 'joomla') 286 { 287 $current_user = JFactory::getUser(); 288 $result['name']= $current_user->username; 289 $result['email'] = $current_user->email; 290 return $result; 291 } 292 else 293 { 294 if(!function_exists('wp_get_current_user')) { 295 include(ABSPATH . "wp-includes/pluggable.php"); 296 } 297 $current_user = wp_get_current_user(); 298 $result['name']= $current_user->user_login; 299 $result['email'] = $current_user->user_email; 300 return $result; 301 } 296 302 297 }303 } 298 304 }
Note: See TracChangeset
for help on using the changeset viewer.