REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 4.03 KB
Close
/home/nshryvcy/blissfulnepal.com/wp-content/plugins/malcare-security/callback/wings/ipstore.php
Text
Base64
<?php if (!defined('ABSPATH')) exit; if (!class_exists('MCIPStoreCallback')) : require_once dirname( __FILE__ ) . '/../../protect/ipstore.php'; class MCIPStoreCallback extends MCCallbackBase { public $db; const IPSTORE_WING_VERSION = 1.4; public function __construct($callback_handler) { $this->db = $callback_handler->db; } public function updateBVTableContent($table, $value, $filter) { $this->db->query("UPDATE $table SET $value $filter;"); } public function insertBVTableContent($table, $fields, $value) { $this->db->query("INSERT INTO $table $fields values $value;"); } public function deleteIPs($table, $rmfilters) { if (is_array($rmfilters)) { foreach ($rmfilters as $rmfilter) { $rmfilter = base64_decode($rmfilter); $this->db->deleteBVTableContent($table, $rmfilter); } } } public function insertIPs($table, $fields, $values) { if (is_array($values)) { foreach ($values as $value) { $value = base64_decode($value); $this->insertBVTableContent($table, $fields, $value); } } } public function updateIPs($table, $value, $filters) { if (is_array($filters)) { foreach ($filters as $filter) { $filter = base64_decode($filter); $this->updateBVTableContent($table, $value, $filter); } } } public function getIPs($table, $auto_increment_offset, $type, $category) { $query = "SELECT `start_ip_range` FROM $table WHERE id < $auto_increment_offset AND `type` in (" . implode(',', $type) . ") AND "; $query .= ($category == MCProtectIpstoreDB_V648::CATEGORY_FW) ? "`is_fw` = true;" : "`is_lp` = true;"; return $this->db->getCol($query); } public function getIPStoreOffset($table, $auto_increment_offset) { $db = $this->db; return intval($db->getVar("SELECT MAX(id) FROM $table WHERE id < $auto_increment_offset")); } public function getIPStoreInfo($table, $auto_increment_offset) { $db = $this->db; $info = array(); $info['fw_blacklisted_ips'] = $this->getIPs($table, $auto_increment_offset, MCProtectIpstoreDB_V648::blacklistedTypes(), MCProtectIpstoreDB_V648::CATEGORY_FW); $info['lp_blacklisted_ips'] = $this->getIPs($table, $auto_increment_offset, MCProtectIpstoreDB_V648::blacklistedTypes(), MCProtectIpstoreDB_V648::CATEGORY_LP); $info['fw_whitelisted_ips'] = $this->getIPs($table, $auto_increment_offset, MCProtectIpstoreDB_V648::whitelistedTypes(), MCProtectIpstoreDB_V648::CATEGORY_FW); $info['lp_whitelisted_ips'] = $this->getIPs($table, $auto_increment_offset, MCProtectIpstoreDB_V648::whitelistedTypes(), MCProtectIpstoreDB_V648::CATEGORY_LP); $info['ip_store_offset'] = $this->getIPStoreOffset($table, $auto_increment_offset); $info['country_ips_size'] = intval($db->getVar("SELECT COUNT(id) FROM $table WHERE id >= $auto_increment_offset")); return $info; } public function process($request) { $db = $this->db; $params = $request->params; $table = $params['table']; $bvTable = $db->getBVTable($table); $auto_increment_offset = $params['auto_increment_offset']; if (!$db->isTablePresent($bvTable)) { $resp = array("info" => false); } else { switch ($request->method) { case "ipstrinfo": $info = $this->getIPStoreInfo($bvTable, $auto_increment_offset); $resp = array("info" => $info); break; case "insrtips": $values = $params['values']; $fields = $params['fields']; if (array_key_exists('rmfilter', $params)) { $db->deleteBVTableContent($table, $params['rmfilter']); } $this->insertIPs($bvTable, $fields, $values); $resp = array("offset" => $this->getIPStoreOffset($bvTable, $auto_increment_offset)); break; case "dltips": $rmfilters = $params['rmfilters']; $this->deleteIPs($table, $rmfilters); $resp = array("offset" => $this->getIPStoreOffset($bvTable, $auto_increment_offset)); break; case "updtips": $value = $params['value']; $filters = $params['filters']; $this->updateIPs($bvTable, $value, $filters); $resp = array("offset" => $this->getIPStoreOffset($bvTable, $auto_increment_offset)); break; default: $resp = false; } return $resp; } } } endif;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 15
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
account.php
2.71 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
actlog.php
1.65 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
brand.php
1.27 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bv_upgrader_skin.php
2.23 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
db.php
11.76 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dynsync.php
2.57 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fs.php
15.51 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fs_write.php
15.01 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
info.php
17.77 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ipstore.php
4.03 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
manage.php
35.19 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
misc.php
8.17 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
protect.php
3.20 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
security.php
5.36 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
watch.php
10.43 KB
lrw-r--r--
2026-06-07 01:29:47
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).