Skip to content

Instantly share code, notes, and snippets.

View ixs's full-sized avatar
👋

Andreas Thienemann ixs

👋
View GitHub Profile
@ixs
ixs / gist:a8e5da2632ac93d5ec744ca9a3e05f28
Last active September 24, 2021 12:20
PowerDNS crash matrix
pdns-auth-master: works
pdns-auth-45: works
pdns-auth-46: not found
Sep 23 14:11:07 Loading '/usr/local/lib/pdns/libgsqlite3backend.so'
Sep 23 14:11:07 This is a standalone pdns
Sep 23 14:11:07 Listening on controlsocket in '/var/run/pdns/pdns.controlsocket'
Sep 23 14:11:07 UDP server bound to 0.0.0.0:53
Sep 23 14:11:07 UDP server bound to [::]:53
Sep 23 14:11:07 TCP server bound to 0.0.0.0:53
@ixs
ixs / prips.py
Created August 4, 2021 12:57
prips in python - support ipv6
#!/usr/bin/env python3
import ipaddress
import sys
for ip in ipaddress.ip_network(sys.argv[1]).hosts():
print(ip)
@ixs
ixs / ip_finder.sh
Last active August 4, 2021 12:06
IP Finder als kleine Programmierübung
#!/bin/bash
set -euo pipefail
# IP Finder als kleine Programmierübung
NAMED=/var/named/data
NETZ="${1:-}"
if [ -z "$NETZ" ]; then
@ixs
ixs / rocky_os_family.py
Last active July 4, 2021 12:49
Salt custom grain to override os_family grain to ensure Rocky Linux is as part of the RedHat OS family.
#!/usr/bin/env python3
# Override os_family grain to ensure Rocky Linux is seen
# as part of the RedHat OS family.
#
# Similar functionality was added in https://github.com/saltstack/salt/pull/59682
# but has not been released yet.
#
# To install, drop this code into /svc/salt/_grains/ and run
# `salt '*' saltutil.sync_all`
@ixs
ixs / apple_contact_picture_crop.py
Last active January 14, 2021 10:58
Apple iOS compatible image crop for contact/vcard images
#!/usr/bin/env python3
from PIL import Image
import io
import logging
import vobject
import base64
import hashlib
"""
@ixs
ixs / Makefile
Last active July 3, 2020 08:07
Makefile to drive ansible from a venv
# Makefile
SHELL = /bin/bash
PYTHON_EXE = python3
TOPDIR = $(shell git rev-parse --show-toplevel)
all: venv ## Build complete environment
help: # Display help
@awk -F ':|##' \
'/^[^\t].+?:.*?##/ {\
@ixs
ixs / keepass-recovery.py
Created May 28, 2020 09:56
Try multiple passwords to access a keepass database
#!/usr/bin/env python3
#
# Forgot the password for my keepass library. I knew the password
# was based on a certain scheme that encodes the year etc.
#
# Rather than trying it out by hand, have a program do it for me.
#
# Quick and dirty...
#
#!/bin/sh
set -euo pipefail
MAX_SYS_UID=499
MAX_SYS_GID=499
ORIG_MAX_SYS_UID=999
ORIG_MAX_SYS_GID=999
# For debugging, set to echo
@ixs
ixs / ssltest.py
Last active February 28, 2020 21:41
Heartbleed test with data dump functionality.
#!/usr/bin/python
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
#
# Modified slightly by Andreas Thienemann <athienemann@schubergphilis.com> for clearer exploit code
# and 64k reads
#
# This version of the exploit does write received data to a file called "dump" in the local directory
# for analysis.
@ixs
ixs / gist:139769412b68515fa3e11ebd13a5b3ce
Last active December 10, 2019 21:19
Vodafone USSD session.
root@GL-X750:~# picocom --echo /dev/ttyUSB2
picocom v1.7
port is : /dev/ttyUSB2
flowcontrol : none
baudrate is : 9600
parity is : none
databits are : 8
escape is : C-a