Skip to content

Instantly share code, notes, and snippets.

Hiding in the shadows…

Markus Birth mbirth

Hiding in the shadows…
View GitHub Profile
mbirth / index.php
Created Feb 1, 2021
PHP proxy for when your host doesn't allow cgi-bin or .pl scripts but PHP
View index.php
# Put this in the same directory where AWStats' cgi-bin dir is!
$config = 'your.default.config';
$output = 'main';
$cmd = './';
# Mandatory parameter
View prds.txt
PRD-63116-001 Unlocked BBB100-1 (USA)
PRD-63116-003 Bell BBB100-1
PRD-63116-005 BBB100-1
PRD-63116-007 BBB100-1
PRD-63116-009 BBB100-1
PRD-63116-010 BBB100-1
PRD-63116-013 BBB100-1
PRD-63116-017 BBB100-1
PRD-63116-020 BBB100-1
PRD-63116-021 BBB100-1 (HK?)
mbirth /
Created Apr 26, 2017
AES implementations in Python3, PHP and JavaScript

Python3: AES / Rijndael

Usually, you should use PyCrypto from the python-crypto package. But if you want to code in Python3, there's no fast hybrid((i.e. mostly C-code, partly Python-code)) implementation of such a library.

Using Google, you will most probably stumble on Bram Cohen's Rijndael implementation in pure Python. I took his code and made it Python3 ready by replacing all xrange() by range(), all divisions (/) by integer-divisions (//) and made the string.join() working. There were no more changes neccessary.

mbirth /
Last active May 6, 2019 — forked from adammw/
Timed Text Captions to SRT Subtitles converter script
#!/usr/bin/env python
# Usage: python source.xml
from xml.dom.minidom import parse
import sys
def fixTime(time):
# 00:00:00.000
return time.replace(".", ",")
#Inspired by
#Copy a file or directory out of a git repository, preserving history!
#Creates DESTINATIONPATH with patches that can be applied with git am
mbirth / mrpe_oraclebackup.cmd
Created Jun 19, 2014
Nagios/Check_MK NRPE/MRPE check to monitor Oracle database backups. Will return "OK" if there was a database backup completed in the last 30 hours and CRIT otherwise.
View mrpe_oraclebackup.cmd
@echo off
set DB=%3
if "x%USERNAME%x"=="xx" goto syntax
if "x%PASSWORD%x"=="xx" goto syntax
if "x%DB%x"=="xx" goto syntax
goto syntaxok
mbirth /
Created May 26, 2014
Script to download and prepare DigiPort kernel modules for DKMS. THIS WILL ONLY MANAGE THE KERNEL MODULES, NOT THE ADDITIONAL INIT-SCRIPTS! Install the additional scripts by removing the line "FULLPACKAGE = FULLPACKAGE" from Makefile and running ´make install´.
# Get sources from:
if [ ! -x /usr/sbin/dkms ]; then
echo "DKMS not found. Install DKMS (from RepoForge) before running this script."
exit 1
# Download latest source as of 2014-05-26
echo "Downloading latest sources (if download fails, check for an updated URL)..."
mbirth / nma_notify
Created May 23, 2014
Check_MK Flexible Notifications script to notify about incidents via Notify My Android (NMA!) service.
View nma_notify
# Notify My Android
if [ $NOTIFY_WHAT == "HOST" ]; then
mbirth /
Created May 22, 2014
Nagios/Check_MK NRPE/MRPE check to monitor for kernel modules. Will throw a critical when the specified kernel module is not loaded. Also returns performance data.
if [ "$1" = "" ]; then
echo "USAGE:"
echo "$0 <kernel-mod>"
exit 99
STATUS=`lsmod | grep "$MOD"`
mbirth /
Created May 15, 2014
Nagios/Check_MK NRPE/MRPE check to monitor local files for changes using Git. Will throw a warning when files have been changed and show the unified diff in the long status output. Performance data is also returned.
if [ -z "${DIR}" ]; then
echo "Syntax: $0 git-root"
exit 1
cd $DIR
STATUS=`git diff --shortstat --exit-code`
cd - >/dev/null