Skip to content

Instantly share code, notes, and snippets.

View bjoern-r's full-sized avatar

Björn bjoern-r

  • Berlin; Germany
View GitHub Profile
@bjoern-r
bjoern-r / ipsec2wireshark.py
Last active December 13, 2023 22:02 — forked from rectalogic/ipsec2wireshark.py
Parse spis and keys from "ip xfrm state" output and generate a Wireshark ESP decryption config that can decrypt an ESP capture.
#!/usr/bin/env python
"""
Runs "ip xfrm state" and outputs lines to be added to ~/.wireshark/esp_sa
This process must be run using sudo.
This allows Wireshark to decrypt ipsec traffic captured with 'sudo tcpdump -vni any -U -w /tmp/esp.pcap "ip proto 50"'
"""
import sys
import subprocess
@bjoern-r
bjoern-r / bloom.py
Last active January 23, 2019 17:31 — forked from marcan/bloom.py
Simple Bloom filter implementation in Python 3 (for use with the HIBP password list)
#!/usr/bin/python3
#
# Simple Bloom filter implementation in Python 3
# Copyright 2017 Hector Martin "marcan" <marcan@marcan.st>
# Licensed under the terms of the MIT license
#
# Written to be used with the Have I been pwned? password list:
# https://haveibeenpwned.com/passwords
#
# Download the pre-computed filter here (968MB, k=11, false positive p=0.0005):