Git Product home page Git Product logo

example-python-machine-activation's Introduction

Example Machine Activation

This is an example of a typical machine activation flow written in Python. You may of course choose to implement a different flow if required - this only serves as an example implementation.

Running the example

First up, configure a few environment variables:

# Your Keygen account ID. Find yours at https://app.keygen.sh/settings.
export KEYGEN_ACCOUNT_ID="YOUR_KEYGEN_ACCOUNT_ID"

You can either run each line above within your terminal session before starting the app, or you can add the above contents to your ~/.bashrc file and then run source ~/.bashrc after saving the file.

Next, install dependencies with pip:

python3 -m pip install -r requirements.txt

Activating a machine

To perform a machine activation, run the script and supply a license key:

python3 main.py some-license-key-here

The script will use a SHA256-HMAC of your device's machineid for the machine's fingerprint.

Questions?

Reach out at [email protected] if you have any questions or concerns!

example-python-machine-activation's People

Contributors

ezekg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

example-python-machine-activation's Issues

not activating

script will return
False license machine scope is required

A recommandation for calculating fingerprint

Well this is honestly not an issue

The problem i met is that one of my friends' desktop can get its mac address changed on a daily base automatically, i dont know why and how to stop it. So instead of using getnode from uuid module, i chose to use wmi module:

import wmi  # pip install WMI
s = wmi.WMI()
motherboardid = s.Win32_BaseBoard()[0].SerialNumber.strip().strip('.')
# then hashlib.sha256(motherboardid.encode('utf-8')).hexdigest()

I am here to check if it is safe enough and feasible.

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.