Skip to content

Instantly share code, notes, and snippets.

View ixs's full-sized avatar
👋

Andreas Thienemann ixs

👋
View GitHub Profile
@ixs
ixs / intel_x520_patcher.py
Last active April 25, 2024 07:19
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <andreas@bawue.net>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
@ixs
ixs / document.load_client_injection.js
Created September 5, 2019 10:23
userscript adding the document.load() function in order to make legacy webinterfaces such as the Avocent PM3000 webinterface work again.
// ==UserScript==
// @name document.load client injection
// @namespace http://tampermonkey.net/
// @version 0.1
// @description The Avocent PM1000/2000/3000 PDU runs an old JavaScript interface that relies on the XMLDocument.fetch() function that has been removed. Emulate this.
// @description inject the document.load implementation into real page context.
// @author Andreas Thienemann <andreas@bawue.net>, based on a script from jnd@chromium.org, based on idea from gurreiro_fabio@yahoo.com.br
// @match http://172.16.10.64/*
// @match http://172.16.10.65/*
// @run-at document-start
@ixs
ixs / uBlacklist.txt
Created February 19, 2024 13:58
My uBlacklist collection
#
# Tries to filter SEO spam pages which have low content value.
#
*://www.sentinelone.com/*
*://www.airplane.dev/*
*://www.machinelearningplus.com/*
*://www.toptal.com/*
*://sematext.com/*
*://blog.sentry.io/*
*://betterstack.com/*
@ixs
ixs / debug-milter.py
Created February 7, 2024 15:39
A simple milter that will print callbacks and macros to stdout.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
debug-milter.py
A super simple Mail Filter (milter) which will print callbacks and received
macros to stdout as they are sent by the mailserver.
Ideal to understanding what a mailserver is sending to a milter for debugging
purposes.
@ixs
ixs / cimc_kvm.py
Created November 8, 2018 13:28
Commandline KVM viewer for Cisco UCS CIMC
#!/usr/bin/python
import Crypto.Hash
import Crypto.Hash.HMAC
import Crypto.Hash.SHA512
import Crypto.Random
import Crypto.Cipher
import base64
import collections
import hashlib
@ixs
ixs / cimc-certgen.sh
Last active July 3, 2023 05:05
Cisco UCS CIMC/IMC Certificate Generator
#!/bin/bash
set -euo pipefail
#
# Use the Cisco IMC XML Interface to generate a CSR, use dehydrated to
# have this signed and upload the resulting cert back to the IMC.
# This script requires a working dehydrated setup, preferably using the
# DNS-01 ACME protocol.
#
#!/usr/bin/python3
#
# IPTables Trace parser
# Licensed under GPLv3+ by Andreas Thienemann <andreas@bawue.net>
#
# Takes a tracelog and a connection ID and will display the actual firewall rules
# a packet hits on it's way through the different iptables chains.
#
# Instructions:
# 1. Enable rule to mark packets to trace in the raw table:
#!/bin/bash
#
# Dockerized Mastodon Database Backup Script
#
DIR=$(date +%d-%m-%y)
DEST="./db_backups/$DIR"
mkdir -p "$DEST"
MASTODON_ENV=$(basename "${PWD}")
@ixs
ixs / ipmi_sel_housekeeping.sh
Created November 30, 2015 00:54
Clear the IPMI SEL log before it gets full and synchronize the system time.
#!/bin/sh
# Clear the system event log on the BMC when it is more than 80% full.
THRESH=80
SEL_STATE=$(/usr/bin/ipmitool sel info 2> /dev/null)
if [ $? -ne 0 ]; then
echo Problem fetching SEL info.
@ixs
ixs / tasmota-configure.sh
Last active January 31, 2022 16:44
Tasmota mass configuration
#!/bin/bash
#
# Do initial configuration of a SP111 plug on your local wifi
#
# Licensed under the GPLv3+
#
TEMPLATE='{"NAME":"SP111 v1.1","GPIO":[56,0,158,0,132,134,0,0,131,17,0,21,0],"FLAG":0,"BASE":45}'
function uriencode {