env/utils/openbsd/pf-martians/generate-tables.sh
Lucas 5db09725a3 martians: overhaul
- Use the XML files instead of the CSV
- Separate output in inbound and outbound tables
- Add script for producing all the outputs
2020-10-27 03:00:25 +00:00

18 lines
291 B
Bash

#!/bin/sh
script=iana-ip-special-registry-parser.py
process_xml()
{
v=$1
dir=$2
in=iana-ip$v-special-registry.xml
out=martians-$v-${dir%bound}.txt
python3 "$script" "$dir" <"$in" >"$out"
}
process_xml v4 inbound
process_xml v4 outbound
process_xml v6 inbound
process_xml v6 outbound