Skip to content

Instantly share code, notes, and snippets.

View kafeg's full-sized avatar
💭
In C++ we trust!

Vitaly kafeg

💭
In C++ we trust!
View GitHub Profile
@kafeg
kafeg / huaweiDecrypt.py
Created October 22, 2024 08:21 — forked from staaldraad/huaweiDecrypt.py
Decrypt Huawei router/firewall passwords. Huawei stores passwords using DES encryption when the crypted option is enabled.
#!/usr/bin/python
"""
Simple tool to extract local users and passwords from most Huawei routers/firewalls config files.
Will extract plain-text passwords and crypted credentials. Huawei config files use DES encryption with
a known key. Using this information, the script will decrypt credentials found in the config file.
Author: Etienne Stalmans ([email protected])
Version: 1.0 (12/01/2014)
"""
from Crypto.Cipher import DES
@kafeg
kafeg / docker-compose.yaml
Created October 23, 2024 21:22
Synology WeTTY (Web-Terminal) Docker container (LAN only)
version: '3'
services:
wetty:
image: wettyoss/wetty
container_name: wetty
restart: unless-stopped
ports:
- "3000:3000"
command:
- --base=/
@kafeg
kafeg / amneziawg-client-proxmox-host.sh
Created November 9, 2024 10:08
Proxmox VE 8.2 host + AmneziaWG
# The problem: by default not available kernel sources for compile AmneziaWG kernel module.
# So the amnezia instalation is broken by default because of DKMS module can not be built/configured.
# Usually this is not needed on the host, but my use case is WG installation as client
# Prepare for installation as written here (https://github.com/amnezia-vpn/amneziawg-linux-kernel-module):
apt-get install pve-headers
apt install -y software-properties-common python3-launchpadlib gnupg2 linux-headers-$(uname -r)
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 57290828
echo "deb https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
echo "deb-src https://ppa.launchpadcontent.net/amnezia/ppa/ubuntu focal main" | sudo tee -a /etc/apt/sources.list
@kafeg
kafeg / sample_sensors.png
Last active March 14, 2025 09:52 — forked from mehstg/wg_mqtt_exporter.sh
Wireguard CLI to MQTT Bash Script - For getting Wireguard information in to Home Assistant MQTT sensors
sample_sensors.png
@kafeg
kafeg / manage.sh
Last active January 15, 2025 15:09
Synology WireGuard and AmneziaWG build script: kernel module and tools
#!/bin/sh
set -x
# Place the manage.sh, awg (or wg), awg-quick (or wg-quick), amneziawg.ko (or wireguard.ko) and your wg0.conf somewhere to filesystem on Synology
# Use start/stop for manage as regular process or installsvc/uninstallsvc/startsvc/stopsvc to manage as systemd service
WG="awg"
WGQUICK="awg-quick"
KMOD="amneziawg.ko"