Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Source 

[GoLANG] SimpleLicense Go Based Licensing System

SimpleLicensing; https://github.com/SaturnsVoid/SimpleLicensing

A VERY BASIC Go Based Licensing System for Digital Rights Management

Included is a simple Server i built to handle the backend things, a database.sql file (you need to import into MySQL), the main package (License.go), and a example client show you how it could be used.

This is something i put together fast, but it works. Feel free to use it as you please.

How it Works

Server creates a table for license email, license, experation date, and ip
Server generates a license key (XXXX-XXXX-XXXX)
Server encrypts it using your Servers key (Generated on setup) and server gives you it
You give client to buyer/user with license.dat file that contains the encrypted license
Client connects to license server, sending its license.dat
Server trys to decrypt liscense.dat and comapire with any in database
If Server finds the key it check to see if the license is expiered and update last IP
If not expired client runs, else it will tell them its expiered and closes
NOTE: The client must have an internet connection to the license server!

Licensing.go
Licensing can be called at anytime in your program, Just import and select to settings for it. Its a simple one line command.
Code
Licensing.CheckLicense("{LICESNESSERVER}", {USESSL}, {SILENT})

{LICESNESSERVER} = http://127.0.0.1:8080
{USESSL} = true or false to use SSL (Your server will need this setting too).
{SILENT} = Show messages or not.

Server:
Ability to add new licenses to database
Config Setup Tool
Ability to remove liceses from database

Config.toml Format
https://pastebin.com/7wBaXcu1

Packages Used:
github.com/gorilla/mux
github.com/pelletier/go-toml
github.com/go-sql-driver/mysql

Go is a amazing and powerful programming language. If you already haven't, check it out; https://golang.org/
Go Programmer, Adept in CAD, Adept in 3D Printing, Need something made? PM me.
Nice project and glad to see something GO... will definitely check it out.
[Image: V9Gredc.png]
nice release i gonna take a look at it later :)
Developing GO software recently, this will be of much use and deserves some light, I'll try it out!
Thanks <3
Nice contribution, I like it, shame the server isn't in PHP so I don't have to buy a VPS 😭
(Sep 30, 2017 03:17 AM)Ken Thompson Wrote:  Nice contribution, I like it, shame the server isn't in PHP so I don't have to buy a VPS 😭

You have plenty of options when it comes to hosting Go applications. Heroku free tier is plenty enough. Loads of cheap VPS options


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Help] by geoshotAug 4, 2026 09:19 PM 0 110 Aug 4, 2026 09:19 PM
Last Post: geoshot
by regierJan 13, 2026 09:11 AM 4 432 Jan 13, 2026 09:11 AM
Last Post: PELock
by FuggSep 4, 2022 12:43 AM 14 520 Sep 4, 2022 12:43 AM
Last Post: Patience