Skip to content

Instantly share code, notes, and snippets.

@dot-mike
dot-mike / check_dir_size.py
Created February 5, 2026 14:33
CheckMK custom monitoring script
#!/usr/bin/env python3
""" This module is used for monitoring directory sizes and reporting these to CheckMK.
The status is automatically calculated based on WARN and CRIT levels of directory sizes.
If a max_size (see: dictionary host_paths) has been configured, WARN is 80% and CRIT is 90% of max_size.
"""
###############
### imports ###
###############
@dot-mike
dot-mike / plugins
Created January 8, 2026 22:25 — forked from afiestas/plugins
00001 PF.Magic's Petz 3 Player
00002 Headspace Beatnik Player Stub V1.0.0.1
00003 ZingWeb Plug-in for Netscape
00004 Windows Media Player Plug-in
00005 Parable ThingViewer 1.0
00006 Cosmo Player 2.1
00007 Adobe Acrobat
00008 Microsoft ActiveX Portability Container (NPWrap)
00009 VDOLive small plugin
00010 RealPlayer G2 LiveConnect (32-bit)
@echo off
cls
::Clean Manually for deleted users on Windows HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
::This is not a complete script!!!; supplement it with other tools if you wish.
::This script has already been tested on Windows 10
::I am not responsible for any use that may be made of it. It is for research purposes only.
netsh wlan delete profile *
ipconfig /flushdns
powershell -Command "Clear-DnsClientCache"
arp -d *
@dot-mike
dot-mike / mikrotik_s3_dhcp.py
Created June 30, 2025 15:02
Process and transform Mikrotik DHCP logs into JSON format and store it in S3
import json
import boto3
import os
from datetime import datetime
s3 = boto3.client('s3')
def lambda_handler(event, context):
incoming_data = json.loads(event['body']) if 'body' in event else event
@dot-mike
dot-mike / update-offline-elasticsearch.md
Last active November 21, 2025 14:29
Shell script to fetch beats and other binaries from Elasticsearch. Thanks to @lucabelluccini
@dot-mike
dot-mike / speedtest_exporter.js
Created April 11, 2025 19:35
Speedtest.net export speedtest to csv from website
(function () {
const rows = document.querySelectorAll('tr.result-row');
const csvRows = [];
// CSV Header
csvRows.push([
'Date',
'Time',
'Ping (ms)',
'Download (Mbps)',
@dot-mike
dot-mike / collect.sh
Created March 10, 2025 14:13
Ubuntu system evidence collection script
#!/bin/bash
# Evidence Collection Script
# Gathers system and application information for auditing
# ====================== CONFIGURATION SECTION ======================
# Configure services to check here
SERVICES_TO_CHECK=(
#"glusterd"
)
@dot-mike
dot-mike / reverse.py
Last active November 12, 2025 21:19
decrypts AS3 SWZ files
import struct
import zlib
import argparse
import sys
def rotate_left(value, shift, bit_size=32):
"""Rotate left a 32-bit integer."""
return ((value << shift) & (2**bit_size - 1)) | (value >> (bit_size - shift))
def decrypt_and_decompress(file_path):
@dot-mike
dot-mike / main.py
Created February 20, 2025 11:43
super duck punch flash sol save file editor
import hashlib
import random
def decrypt(input_string, key="keykey"):
chars_array = list("e7NjchMCEGgTpsx3mKXbVPiAqn8DLzWo_6.tvwJQ-R0OUrSak954fd2FYyuH~1lIBZ")
chars_length = len(chars_array)
# MD5 hash of the key
key_array = list(hashlib.md5(key.encode()).hexdigest())
# Split the input string into its components
random_key_array = list(input_string[:chars_length * 2])
@dot-mike
dot-mike / get_nodes_from_yaml.sh
Last active January 24, 2025 01:00
External group definition script for ClusterShell. Reads group definitions from a YAML file and outputs hostnames. This is created so we can store additional metadata with the hosts
#!/bin/bash
# External group definition script for ClusterShell
# Reads group definitions from a YAML file and outputs hostnames
# Default YAML file path
YAML_FILE="/etc/clustershell/groups.yaml"
# Parse command-line options
while getopts "f:" opt; do
case $opt in