Super-basic testing-only RADIUS server (Python)

As part of my work for Barracuda Networks on the CloudGen Firewall, there were some authentication scenarios which were previously difficult to test easily due to setup time and complexity. The simple solution was to write some quick and dirty Python to implement the most basic form of the RADIUS protocol, including the State attribute in order to correctly pair two Access-Request packets.

The code is very simple, but required some understanding of the RADIUS protocol and its challenge->response nature.