Skip to content

Instantly share code, notes, and snippets.

View marria05's full-sized avatar

Andy Marriott marria05

  • BBC
  • Manchester, UK
View GitHub Profile
@marria05
marria05 / mikrotik_aws_addresslists.py
Last active May 18, 2022 20:58
Create a Mikrotik address list from the AWS 'ip-ranges' API
#!/usr/bin/python3
# -*- coding: iso-8859-1 -*-
# Launch with AWS region name as the only command line argument ie. ./mikrotik_aws_addresslists.py eu-west-1
# A list of addresses, along with requisite terminal commands prepended to each line is spewed forth from stdout,
# which can be redirected to a file.
import signal
import json