Skip to content

Instantly share code, notes, and snippets.

View cfluegel's full-sized avatar
🏠
Working from home

Christoph Flügel cfluegel

🏠
Working from home
  • Neumünster, Germany
View GitHub Profile
@cfluegel
cfluegel / ttl-mods.txt
Created September 4, 2023 15:04 — forked from mueslimak3r/ttl-mods.txt
ttl mods for mangling TTL behind an LTE modem
# iptables rules for mangling ipv4 and ipv6 traffic
# prerouting rules appear to prevent leaks to the ISP
iptables -t mangle -I PREROUTING 1 -j TTL --ttl-set 65
ip6tables -t mangle -I PREROUTING 1 -j HL --hl-set 65
# postrouting rules do the heavy lifting
iptables -t mangle -I POSTROUTING 1 -j TTL --ttl-set 65
ip6tables -t mangle -A POSTROUTING 1 -j HL --hl-set 65
@cfluegel
cfluegel / docker-compose.yml
Created May 14, 2022 13:33
MariadDB Galera Test - Docker-Compose file
version: '2.1'
services:
mariadb-galera1:
image: docker.io/bitnami/mariadb-galera:10.7
volumes:
- 'mariadb_galera_data1:/bitnami/mariadb'
ports:
- '3306:3306'
environment:
@cfluegel
cfluegel / .git_hooks_pre-commit
Last active March 20, 2022 11:39 — forked from leucos/.git_hooks_pre-commit
ansible-vault pre-commit hook
#!/bin/sh
#
# Pre-commit hook that verifies if all files containing 'vault' in the name
# are encrypted.
# If not, commit will fail with an error message
#
# Original author: @ralovely
# https://www.reinteractive.net/posts/167-ansible-real-life-good-practices
#
# File should be .git/hooks/pre-commit and executable
@cfluegel
cfluegel / gist:bc078ae8cef3fcaf67bf03d8d5f4fec1
Last active May 22, 2022 07:06
GPG Public Key - christoph@fluegel.name
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGIQ2UEBEAC0AGHGAAMwfMSm4jLeV4dA9CGhc5Tq59OMarUQY3iSuc1Wksiq
M2q641N7DRLjf2hw8xcW2LOjaJGQECZPF07mRgjNxYY91AChiKm2rA5yBJDYDPdB
o3qi1zw4zIkNL2EzJ+jmV8mPWbwy4lM0yNVkZsY9iY0+fY7PqLI/UrHhGia2LYO3
tAx+JjNkhvR2gByjfnx613mbVPr0RqVJkiiiyWiPBDgE3UiozvbZH0zGuluPQw16
Xz1e9WxAuG9GGMWxfubIZsVkH4oY+JADTZ+Qpk04NFY+tJW/XL9gfYM6sATWeEai
KDftsYE7r0rtIdid2mYD1TDou62RDb9PZRRsG6uVPIHM7ymnES+bwXW5P28MUHlW
lEwAAAT2aWeyEwLnKalaLPLZz+EF+PZ1p759dR6fRF99cCXd9TjW+8JX6g1MUsRP
Jl+//jHl2bE39rCi5uEJv6G7h/COmLL7axOq3COgvkzu31PDd0B++HiUvbp1CBNZ
@cfluegel
cfluegel / GitHub-Forking.md
Created January 31, 2022 20:46 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

Generate a LLDP packet with scapy. Now that I understand the basic structure and was able to play a bit with it, I need to
find a way to put this into C/C++ code so that I can automatically identify windows computer.
Not sure yet if this is possible with winsock...
test=Ether(dst="01:80:c2:00:00:0e", src=get_if_hwaddr(conf.iface), type=0x88cc) / LLDPDUChassisID(subtype=0x4,id=get_if_hwaddr(conf.iface)) / LLDPDUPortID(subtype=0x5, id=str(conf.iface)) / LLDPDUTimeToLive(ttl=600) / LLDPDUEndOfLLDPDU()
<Ether dst=01:80:c2:00:00:0e src=50:ed:3c:1e:bc:89 type=LLDP |<LLDPDUChassisID subtype=MAC address id=50:ed:3c:1e:bc:89 |<LLDPDUPortID subtype=interface name id='en0' |<LLDPDUTimeToLive ttl=600 |<LLDPDUEndOfLLDPDU |>>>>>
@cfluegel
cfluegel / kickstart-test.cfg
Created November 22, 2020 16:38
Kickstart test file. It can be used as a starter for a proxmox guest installation. The idea is to use ansible for all further configuration.
#version=CENTOS7
auth --enableshadow --passalgo=sha512
text
firstboot --enable
eula --agreed
reboot --eject
# System Language Settings
keyboard --vckeymap=de-nodeadkeys --xlayout='de (nodeadkeys)'
lang de_DE.UTF-8
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF2+9hcBEADnPFY6sccBQwTYbcJpxIX6C5cW5Fs0zEVquFecuOp8vTzhYrF0
wg3zRORKvJ7yT51dtrYDj+pviZoNjf1tudhEHYvq7IqjmVyq2TT/EoIhdMQySiyp
JVObdjhzsZmAkGloUKtynGzhfwLHiSbA0AcexHm6nCpvKTpwz0uPjwFkQ6GiFtkq
OERb8NlAIk2kDCzKnTew51Xrs/5oA5hsQmlnfjQYfh7d6qW7xSlf36VehXRXQStr
NejFEJZJtskJS310NADbeeP5lpv+At5Iopt1Fouh2wLJ5i2+DGC/XZcxzIWwzjoO
BhfMLrBOrrdxTYEbIzQHpbCZyLZmKRvboV6+9RCuF/qFEye7xbMszYBvtnqoXCdJ
9tY0w/lueU+akPYZ9lkiEdvGdzd8zSqs0lmSCgPDbA0ZF63v0fRp74K4o8bFmdfR
jFGyc8xhS0WH6020kcxAZXKACLa1v6tRo0JMLFiYlEMcCAvsEHvkgMamuGDNmrx1
@cfluegel
cfluegel / YubiKey-GPG-SSH-guide.md
Created October 31, 2019 16:20 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.