My code while reading through the excellent book "Data Driven Security" by Jay Jacobs & Bob Rudis.