Git Product home page Git Product logo

simplelicensing's Introduction

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

  1. Server creates a table for license email, license, experation date, and ip
  2. Server generates a license key (XXXX-XXXX-XXXX)
  3. Server encrypts it using your Servers key (Generated on setup) and server gives you it
  4. You give client to buyer/user with license.dat file that contains the encrypted license
  5. Client connects to license server, sending its license.dat
  6. Server trys to decrypt liscense.dat and comapire with any in database
  7. If Server finds the key it check to see if the license is expiered and update last IP
  8. 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.

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

Packages Used

  • github.com/gorilla/mux
  • github.com/pelletier/go-toml
  • github.com/go-sql-driver/mysql

Other

Go is a amazing and powerful programming language. If you already haven't, check it out; https://golang.org/

Donations

Please Donate To Bitcoin Address: 1AEbR1utjaYu3SGtBKZCLJMRR5RS7Bp7eE

simplelicensing's People

Contributors

saturnsvoid avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.