Skip to content

Instantly share code, notes, and snippets.

{
"ip_geo_block_settings[version]": "3.0.2.2",
"ip_geo_block_settings[matching_rule]": "0",
"ip_geo_block_settings[white_list]": "FR",
"ip_geo_block_settings[black_list]": "ZZ",
"ip_geo_block_settings[extra_ips][white_list]": "209.15.20.235",
"ip_geo_block_settings[extra_ips][black_list]": "",
"ip_geo_block_settings[signature]": "../,/wp-config.php,/passwd",
"ip_geo_block_settings[login_fails]": "5",
"ip_geo_block_settings[response_code]": "403",
@tokkonopapa
tokkonopapa / class-ip-geo-block.php
Created August 13, 2017 18:46
Debug compatibility with Awesome Support plugin
<?php
/**
* IP Geo Block
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-2.0+
* @link http://www.ipgeoblock.com/
* @copyright 2013-2017 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-ip-geo-block-cron.php
Last active August 26, 2017 14:11
Fix the issue that an error message would not be shown when download/read/write error happens.
<?php
/**
* IP Geo Block - Cron Class
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-2.0+
* @link http://www.ipgeoblock.com/
* @copyright 2013-2017 tokkonopapa
*/
@tokkonopapa
tokkonopapa / ip-geo-block.php
Created September 1, 2017 12:23
Fix a bug of Emergent Functionality
<?php
/**
* IP Geo Block
*
* A WordPress plugin that blocks undesired access based on geolocation of IP address.
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-2.0+
* @link http://www.ipgeoblock.com/
@tokkonopapa
tokkonopapa / class-ip-geo-block.php
Created January 26, 2018 14:01
Fix the issue of conflict with Mail Poet 2.
<?php
/**
* IP Geo Block
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-2.0+
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-maxmind.php
Created January 29, 2018 23:02
Force to use legacy databases
<?php
/**
* IP Geo Block API class library for Maxmind
*
* @version 1.1.10
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
<?php
/**
* IP Geo Block
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-ip-geo-block-util.php
Created April 3, 2018 17:18
PHP less than 5.4 code.
<?php
/**
* IP Geo Block - Utilities
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / class-ip-geo-block-logs.php
Created April 4, 2018 13:41
Add fallback to alter the field `last` and `view` for MariaDB
<?php
/**
* IP Geo Block - Handling validation log
*
* @package IP_Geo_Block
* @author tokkonopapa <[email protected]>
* @license GPL-3.0
* @link http://www.ipgeoblock.com/
* @copyright 2013-2018 tokkonopapa
*/
@tokkonopapa
tokkonopapa / authenticate.min.js
Last active April 24, 2018 14:29
Possible fixed version as 3.0.10.5
/*
Project: WP-ZEP - Zero-day exploit Prevention for wp-admin
Copyright (c) 2013-2018 tokkonopapa ([email protected])
This software is released under the MIT License.
*/
!function(e,t,n){"use strict";function r(e){return e=e.replace(y.home+y.admin,""),C.hasOwnProperty(e)?C[e]:null}function o(e){var t=n.createElement("div");return t.appendChild(n.createTextNode(e)),e=t.innerHTML.replace(/["']/g,function(e){return{'"':"&quot;","'":"&#39;"}[e]}),t="",e}function a(e){e=e?e.toString():"";var t=e.match(/^(?:([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?/);return{scheme:t[1]||"",relative:t[2]||"",authority:t[3]||"",path:t[4]||"",query:t[5]||"",fragment:t[6]||""}}function i(e){return(e.scheme?e.scheme+":":"")+(e.relative+e.path)+(e.query?"?"+e.query:"")+(e.fragment?"#"+e.fragment:"")}function c(e,n){"object"!=typeof e&&(e=a(e||t.location.href));for(var r=e.query?e.query.split("&"):[],o=r.length;o-- >0;)if(0===r[o].indexOf(w.name)){r.splice(o,1);break}return r.push(w.name+"="+encodeURIComponent