Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am speeddragon on github.
  • I am speeddragon (https://keybase.io/speeddragon) on keybase.
  • I have a public key whose fingerprint is E6D3 F63A 471A 2E5D DD00 897E 6652 D464 A01F B2B9

To claim this, I am signing this object:

@speeddragon
speeddragon / gist:2d0ca42a3e2e70de1b4e
Last active October 16, 2015 09:48
Change link from old domain to new domain link in Wordpress
<?php
# Change link from old domain to new domain in Wordpress
require_once('wp-config.php');
global $wpdb;
$newDomain = "newdomain.com";
$oldDomain = "olddomain.com";
# Posts
$query = "SELECT ID, post_content FROM wp_posts WHERE post_content LIKE '%" . $oldDomain . "%';";
@speeddragon
speeddragon / clean_trash.php
Created April 16, 2015 11:26
Delete all wordpress trash posts
<?php
include_once('wp-config.php');
$trash = get_posts('post_status=trash&numberposts=-1');
echo "Post count: " . count($trash) . "\n";
foreach($trash as $post) {
wp_delete_post($post->ID, $bypass_trash = true);
}
Favorit themes
sonicradish.zsh-theme ( Orange, Futuristic )
fino-time.zsh-theme ( Green / Blue, Futuristic )
af-magic.zsh-theme (Blue / Gray, Modern)
cloud.zsh-theme (Green)
@speeddragon
speeddragon / wordpress-backdoor.yml
Last active July 1, 2023 09:36
Wordpress Backdoor Search with Ansible
- hosts: www_servers
user: ubuntu
sudo: yes
vars:
folder: /usr/share/nginx/html
backdoor_keywords:
- "FilesMan" # OK
- "<?php \\${" # OK
- 'mail(stripslashes(' # OK
- "<?php \\$array = array(" # OK
free
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free
make -f makefile.unix
@speeddragon
speeddragon / php-backdoor-removal.sh
Last active May 6, 2022 15:48
PHP/Wordpress Backdoor Removal
#
#
# WORDPRESS BASH SCRIPT TO CLEAN BACKDOOR FILES
#
#
DOMAIN=$1
FOLDER=$2
AWS_KEYFILE=~/aws.pem
@speeddragon
speeddragon / kali-linux-wl-fix.sh
Last active February 18, 2024 13:05
Kali Linux fix for "modprobe: FATAL: Module wl not found"
# Update and install necessary packages
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
# Download some extra packages, that do the trick for "wl module not found"
wget http://http.kali.org/kali/pool/main/l/linux-tools/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-amd64_4.3.3-5kali4_amd64.deb
# Install with correct order
@speeddragon
speeddragon / maxmind_csv_to_mysql.php
Created September 30, 2016 23:36
Convert CSV to MySQL database for MaxMind GeoLite2
<?php
function calculateEndIp($startIp, $mask) {
if (($min = ip2long($startIp)) !== false) {
$max = ($min | (1<<(32-$mask))-1);
$address = long2ip($max);
return $address;
}
}
// Read country to memory
Objective: Open door with a NodeMCU.
Images
------
Intercomunicator: http://www.farfisa-shop.co.uk/53-143-large/km8262w-b-w-videointercom-for-duo-syst-compact.jpg
Motherboard: https://imgur.com/a/fK46p
Documents
---------
Videointercoms with integrated coding for DUO system - www.farfisa.com/images/pdf/mi2334.pdf