Changeset 1936614
- Timestamp:
- 09/06/2018 05:53:56 AM (8 years ago)
- Location:
- ose-firewall/trunk
- Files:
-
- 7 edited
-
assets/views/dashboard.php (modified) (3 diffs)
-
classes/App/Model/ManageipsModel.php (modified) (1 diff)
-
classes/Library/firewallstat/firewallstatBase.php (modified) (2 diffs)
-
classes/Library/fwscannerv7/ipManagement.php (modified) (1 diff)
-
ose_firewall_badge.php (modified) (1 diff)
-
ose_wordpress_firewall.php (modified) (1 diff)
-
public/js/dashboard.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ose-firewall/trunk/assets/views/dashboard.php
r1814810 r1936614 25 25 <div class="panel panel-success"> 26 26 <div class="panel-body" id="dashmenu" style="min-height: 300px; margin-left:-45px; "> 27 <a href="javascript:void(0)" id="btn_ country"28 class="col-md-12"><?php oLang::_(' OVERVIEW_COUNTRY_MAP_BTN'); ?></a>27 <a href="javascript:void(0)" id="btn_recenthack" 28 class="col-md-12"><?php oLang::_('RECENT_HACKING_INFO_BTN'); ?></a> 29 29 <a href="javascript:void(0)" id="btn_traffic" 30 30 class="col-md-12"><?php oLang::_('OVERVIEW_TRAFFICS_BTN'); ?></a> 31 31 <a href="javascript:void(0)" id="btn_recentscan" 32 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 33 <!--<a href="javascript:void(0)" id="btn_backup" 36 34 class="col-md-12"><?php oLang::_('RECENT_BACKUP_BTN'); ?></a>--> … … 43 41 </select> 44 42 <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_visible"53 id="map-title"><?php oLang::_('OVERVIEW_COUNTRY_MAP'); ?></h3>54 </div>55 <div class="panel-body">56 <div id="world-map"></div>57 </div>58 43 </div> 59 44 </div> … … 107 92 <thead> 108 93 <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> 94 <th width="30%"><?php oLang::_('O_DATE'); ?></th> 95 <th width="40%"><?php oLang::_('O_IP'); ?></th> 96 <th width="30%"><?php oLang::_('O_STATUS'); ?></th> 113 97 </tr> 114 98 </thead> -
ose-firewall/trunk/classes/App/Model/ManageipsModel.php
r1814810 r1936614 67 67 { 68 68 $return = array(); 69 $oseFirewallStat = new oseFirewallStat(); 69 //$oseFirewallStat = new oseFirewallStat(); 70 oseFirewall::callLibClass('fwscannerv7', 'ipManagement'); 71 $ipManagement = new ipManagement(); 70 72 if (oseFirewall::isDBReady()) 71 73 { 72 $return = $ oseFirewallStat->getLatestTraffic();74 $return = $ipManagement->getLatestTraffic(); 73 75 } 74 76 else -
ose-firewall/trunk/classes/Library/firewallstat/firewallstatBase.php
r1814810 r1936614 1603 1603 public function getTrafficData () { 1604 1604 $return = array(); 1605 /* 1605 1606 $query = "SELECT EXTRACT(HOUR FROM`datetime`) as hour, COUNT(id) + SUM(`visits`) as count FROM `#__osefirewall_acl` " . 1606 1607 "WHERE (`status` = 1 OR `status` = 4) AND `datetime` > DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY hour ORDER BY `hour` ASC"; … … 1615 1616 $this->db->setQuery($query); 1616 1617 $return[2] = $this->db->loadObjectList(); 1618 */ 1619 $query = "SELECT EXTRACT(HOUR FROM`dateadded`) as hour, COUNT(id) as count, ip,status FROM `#__osefirewall_ipmanagement` " . 1620 "WHERE (`status` = 2 ) AND `dateadded` > DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY hour ORDER BY `hour` ASC"; 1621 $this->db->setQuery($query); 1622 $return[0] = $this->db->loadObjectList(); 1623 $return[0] = $this->filterIpsWithRecords($return[0]); 1624 $query = "SELECT EXTRACT(HOUR FROM`dateadded`) as hour, COUNT(id) as count, ip,status FROM `#__osefirewall_ipmanagement` " . 1625 "WHERE (`status` = 1) AND `dateadded` > DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY hour ORDER BY `hour` ASC"; 1626 $this->db->setQuery($query); 1627 $return[1] = $this->db->loadObjectList(); 1628 $return[1] = $this->filterIpsWithRecords($return[1]); 1629 $query = "SELECT EXTRACT(HOUR FROM`dateadded`) as hour, COUNT(id) as count, ip,status FROM `#__osefirewall_ipmanagement` " . 1630 "WHERE (`status` = 0) AND `dateadded` > DATE_SUB(CURDATE(), INTERVAL 1 DAY) GROUP BY hour ORDER BY `hour` ASC"; 1631 $this->db->setQuery($query); 1632 $return[2] = $this->db->loadObjectList(); 1633 $return[2] = $this->filterIpsWithRecords($return[2]); 1617 1634 return $return; 1618 1635 } 1619 1636 public function filterIpsWithRecords($records){ 1637 $return = array(); 1638 foreach ($records as $record){ 1639 $folderPath = OSE_WEBLOGFOLDER.ODS.$record->ip; 1640 if(file_exists($folderPath) && file_exists($folderPath."/blocked.php")){ 1641 $return[] = $record; 1642 }else{ 1643 if($record->status == 1 || $record->status == 2){ 1644 $return[] = $record; 1645 } 1646 } 1647 } 1648 return $return; 1649 } 1620 1650 private function headerArray() 1621 1651 { -
ose-firewall/trunk/classes/Library/fwscannerv7/ipManagement.php
r1814810 r1936614 1182 1182 } 1183 1183 1184 1185 1184 public function getLatestTraffic() 1185 { 1186 $return = $this->getIPInfoList('', '','', 0, 5, 'dateadded', 'desc'); 1187 $return['data'] = $this->convertLatestTraffic($return['data']); 1188 return $return; 1189 } 1190 private function convertLatestTraffic($results){ 1191 $i = 0; 1192 $return = array (); 1193 foreach ($results as $result){ 1194 $return[$i]->datetime = $result['datetime']; 1195 $return[$i]->ip = $result['ip']; 1196 $return[$i]->status = $result['status']; 1197 } 1198 return $return; 1199 } 1186 1200 } -
ose-firewall/trunk/ose_firewall_badge.php
r1927189 r1936614 4 4 Description: Plugin For Showing Centrora Security Badge 5 5 Author: Centrora Security 6 Version: 7.4. 66 Version: 7.4.7 7 7 */ 8 8 include(dirname(__FILE__).'/includes/oseBadgeWidget.php'); -
ose-firewall/trunk/ose_wordpress_firewall.php
r1927189 r1936614 5 5 Description: Centrora Security (previously OSE Firewall) - A WordPress Security Firewall plugin created by Centrora. Protect your WordPress site by identify any malicious codes, spam, virus, SQL injection, and security vulnerabilities. 6 6 Author: Centrora (Previously ProWeb) 7 Version: 7.4. 67 Version: 7.4.7 8 8 Author URI: http://www.centrora.com/ 9 9 */ -
ose-firewall/trunk/public/js/dashboard.js
r1824315 r1936614 190 190 }); 191 191 }); 192 193 $("#btn_recenthack").click(); 192 194 }); 193 195 … … 322 324 columns: [ 323 325 {"data": "datetime"}, 324 {"data": "ip32_start"}, 325 {"data": "score"}, 326 {"data": "ip"}, 326 327 {"data": "status"} 327 328 ]
Note: See TracChangeset
for help on using the changeset viewer.