Proof of concept in perl - needs rewrite due size and unsupported language