Skip to content

Instantly share code, notes, and snippets.

Vladimír Smitka lynt-smitka

Block or report user

Report or block lynt-smitka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp-config-debug.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
View wp-config-part.php
define( 'WP_DEBUG', true );
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
View ip_block_mu_plugin_gui.php
<?php
function get_real_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
View ip_block_mu_plugin.php
<?php
function get_real_client_ip()
{
$ipaddress = '';
if (isset($_SERVER['HTTP_CLIENT_IP']))
$ipaddress = $_SERVER['HTTP_CLIENT_IP'];
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="webp">
<match url="(.+)\.(jpe?g|png)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_ACCEPT}" pattern="image/webp" ignoreCase="false" />
<add input="{DOCUMENT_ROOT}/{R:1}.webp" matchType="IsFile" />
@lynt-smitka
lynt-smitka / 1-common.txt
Last active Sep 12, 2019
Dir buster lists
View 1-common.txt
info.php
phpinfo.php
i.php
test.php
debug.php
admin.php
administrace.php
administration.php
administrator.php
admin
View wp-block-admin-for-users.php
//hide admin bar for subsribers
function lynt_hide_admin_bar() {
if (current_user_can('subscriber')) show_admin_bar(false);
}
add_action('after_setup_theme', 'lynt_hide_admin_bar');
//redirect subscribers to homepage after dashboard visit attempt
function lynt_block_dashboard() {
if (current_user_can('subscriber') && is_admin() && ! wp_doing_ajax() ) {
View nonmod_params-nginx.conf
if ($query_string ~ "^(?<pre>.*?)(&?fbclid=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_source=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_medium=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
rewrite ^(.*)$ $1?$pre$post?;
}
if ($query_string ~ "^(?<pre>.*?)(&?utm_campaign=[a-zA-Z0-9_-]+)(?<post>.*?)$"){
View nonmod_params.htaccess
RewriteCond %{QUERY_STRING} ^(.*?)(&?(?:fbclid|gclid|utm_source|utm_medium|utm_campaign|utm_term|utm_content)=[a-zA-Z0-9_-]+)(.*?)$
RewriteRule ^(.*)$ /$1?%1%3 [L,NE]
You can’t perform that action at this time.