Skip to content

Instantly share code, notes, and snippets.

@evanesoteric
evanesoteric / bak
Created July 27, 2025 17:10
This script backs up a user's home directory to a remote server using rsync.
#!/bin/bash
# ==============================================================================
# REMOTE RSYNC BACKUP SCRIPT
# ==============================================================================
# This script backs up a user's home directory to a remote server using rsync.
# It incorporates file logging, an execution timer, and a configurable port.
# ==============================================================================
# --- Configuration ---
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@evanesoteric
evanesoteric / artix-linux-rescue-recovery.sh
Created June 3, 2025 01:54
Artix linux rescue/recovery instructions.
## Identify drives and partitions
# lsblk # List block devices in tree format
# lsblk -f # List with filesystem information
# blkid # Display block device attributes (UUID, filesystem type, etc.)
# Unlock the encrypted LUKS partition
cryptsetup open /dev/nvme0n1p1 luksroot
# - /dev/nvme0n1p1: The encrypted partition (NVMe SSD, first partition)
# - luksroot: Name for the decrypted device mapper (/dev/mapper/luksroot)
@evanesoteric
evanesoteric / ffxi-gamepad.py
Last active June 1, 2025 16:46
Autofocus the HorizonXI game window when gamepad input is detected. A Final Fantasy XI (FFXI) gaming script.
#!/usr/bin/env python3
import evdev
import time
import subprocess
import sys
import threading
# ====================================================================
# CONFIGURATION - MODIFY THIS SECTION FOR YOUR SETUP
# ====================================================================
@evanesoteric
evanesoteric / nftables.conf
Created November 2, 2024 19:47
Nftables ruleset
#!/usr/bin/nft -f
# vim:set ts=2 sw=2 et:
flush ruleset
# whitelist { admin, office }
define admin = { 10.10.10.10, 172.16.0.0/16 }
# blacklist
@evanesoteric
evanesoteric / gpg-ssh-setup.md
Created January 31, 2024 01:34 — forked from mcattarinussi/gpg-ssh-setup.md
A setup guide to use a personal gpg key for ssh authentication

GPG - SSH setup

Generating the master key

Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.

Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)

  ▶ gpg --full-generate-key --expert

gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.

OpenWRT supports the ESPRESSObin Ultra since 2020. Official builds are available.

In thins gist I want to explain how to install the image onto the board via a USB thumb drive.

All you need

  • ESPRESSObin Ultra
  • 12V 2A DC or PoE power supply
  • USB A to USB Micro-B cable
  • wired internet connection
@evanesoteric
evanesoteric / linux-pam-backdoor-detect.sh
Created January 9, 2024 19:20 — forked from bcoles/linux-pam-backdoor-detect.sh
Detect PAM backdoors created by linux-pam-backdoor
#!/bin/bash
# Detect PAM backdoors created by linux-pam-backdoor:
# https://github.com/zephrax/linux-pam-backdoor
#
# Note: this will likely only work with PAM version 1.3.0.
# ---
# $ ./backdoor.sh -v 1.3.0 -p some_s3cr3t_p455word
# Automatic PAM Backdoor
# PAM Version: 1.3.0
# Password: some_s3cr3t_p455word
# https://github.com/nsacyber/Mitigating-Web-Shells/blob/master/LogCheck.py
import sys
import os.path
import csv
# Script will generate a list of URL that from Apache web access log that have least unique IP address or unique user-agents
# Written for Python 3
@evanesoteric
evanesoteric / vmangos-install.sh
Last active June 15, 2023 23:38
vMaNGOS Debian 11 Install (stable - working - complete)
# vMaNGOS Debian 11 Install (stable - working - complete)
#
# Deploy Debian 11 (buster) server
# login to server
ssh -p 22 root@<server_ip>
# escalate privileges / export paths
su -