Write up of building a license management system that works without Internet connection (air gapped networks to be precise) in Go.
Works exactly the same in other languages but interpreted one will be even easy to pirate (not that it matters) :)
https://www.screamingatmyscreen.com/offline-license-management/