Skip to content

Instantly share code, notes, and snippets.

View benmaddison's full-sized avatar

Ben Maddison benmaddison

View GitHub Profile
@benmaddison
benmaddison / .gitignore
Last active August 30, 2021 19:30
use rpkimancer to create a rpki repo with a loop in it
loopki/

Keybase proof

I hereby claim:

  • I am benmaddison on github.
  • I am benmaddison (https://keybase.io/benmaddison) on keybase.
  • I have a public key ASDSoB6BPHcbvkTIyO2GehtM-ReVN9QGtOz7MY9p4Auw0Ao

To claim this, I am signing this object:

@benmaddison
benmaddison / afrinic_irr_mirror_check.py
Last active August 3, 2018 10:52
afrinic irr mirroring check
#!/usr/bin/env python3
import asyncio
import re
import sys
import urllib.parse
RED = "\x1b[31m"
GREEN = "\x1b[32m"
@benmaddison
benmaddison / prefix_set_test.py
Created April 20, 2017 15:28
Test srcript for PrefixSet containment
from __future__ import unicode_literals
from rptk.modules.set import PrefixSet
def main():
errors = 0
p4, l4, m4, n4 = '10.0.0.0', 8, 16, 24
prefix4 = "%s/%d" % (p4, l4)
p6, l6, m6, n6 = '2001:db8::', 32, 40, 48
prefix6 = "%s/%d" % (p6, l6)
e_count = 2**(n4-l4+1) + 2**(n6-l6+1) - 2**(m4-l4) - 2**(m6-l6)