Skip to main content

jerry-rigged license system with UUID check (preventing more than one installation) and expiration date

Project description

jerry-rigged license system with UUID check (preventing more than one installation) and expiration date

Tested against Python 3.9.16 (Anaconda) - Windows 10

jerry-rigged???

From https://www.urbandictionary.com/define.php?term=jerry-rig jerry-rig - To put together in a way that works, but is contrary to the "norm" or specific directions (instructions)

The serial number system can be cracked easily (which one can't?), but it should be secure enough for any average user.

pip install jerryrigserialgen - if you want to generate serial numbers

pip install jerryrigserialver - if you want to verify serial numbers (client)

from jerryrigserialgen import Serialgenerator, serialgenconfig

# transfer.sh seems to be offline (https://github.com/dutchcoders/transfer.sh/issues/556), that's why i added this:
serialgenconfig.transfershdomain = 'https://temp.sh'

# Generates serial numbers
# pip install jerryrigserialgen
seri = Serialgenerator(
    product="myproduct",  # Name of the product
    savefolder="c:\\mynicefolder\\new",  # just for the record - files are not needed
    hardcodedpasswort_transfer="topsecret",  # for transfer.sh - must be hard-coded in the app the client uses
    hardcodedpasswort_url="5248614597016233",  # 16 digits to encrypt the URL - must be hard-coded in the app the client uses
    addinformationtoserial=(
        "info1",
        "info2",
    ),  # extra information you want to transmit to the app the client uses
    licensedays=17,  # duration of the license - from today on
    subtract_from_time=0,  # for debugging - to create expired licenses
)
serialnumber, debuginfo = seri.upload()
print(serialnumber) # This is the serial number you are going to give to your client, like: 566978376a4b356956775955427a4779636e533856705a59534d314369387735526e59744230396f6c6771795256675a31365a756947344753616d3757536d5961704f736a362f63506871724a792f3845664d4845773d3d475ac18a6927938b4ede1613058f253e


# output
# File written to: c:\mynicefolder\new\2023_03_23_09_23_18_28484401.cfg
# 566978376a4b356956775955427a4779636e533856705a59534d314369387735526e59744230396f6c6771795256675a31365a756947344753616d3757536d5961704f736a362f63506871724a792f3845664d4845773d3d475ac18a6927938b4ede1613058f253e

##########################################################################

# Check serial numbers - client's PC

# pip install jerryrigserialver
from jerryrigserialver import check_serial

isvalid, daysleft, duration_of_license, product, otherinfos = check_serial(
    hardcodedpasswort_transfer="topsecret",
    # hardcodedpasswort_transfer for transfer.sh - must be hard-coded
    hardcodedpasswort_url="5248614597016233",  # 16 digits to encrypt the url - must be hard-coded
    serialnumber=serialnumber,
    notvalidanymore=f"The license you're using is not valid anymore. It expired %d day[s] ago",
    stillvalid=f"The license you're using is valid for %d more day[s].",
    serialusedanotherpc="The license has been used on another PC",
)
print(isvalid, daysleft, duration_of_license, product, otherinfos)


# The license you're using is valid for 17 more day[s].
# True 17 17 myproduct ['info1', 'info2']

# Compile the code of your app using PyInstaller or some other tool

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jerryrigserialgen-0.12.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jerryrigserialgen-0.12-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file jerryrigserialgen-0.12.tar.gz.

File metadata

  • Download URL: jerryrigserialgen-0.12.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for jerryrigserialgen-0.12.tar.gz
Algorithm Hash digest
SHA256 b2e70606559ec704ff0f25002b81ca0f8c5b47b013e18148e036d0bec10b17be
MD5 0a82f61603157f96bf90cf3498d259f0
BLAKE2b-256 caf4f761e677fb83ba802451181aa8dfcff024875a9c9d9d062425076fb1748c

See more details on using hashes here.

File details

Details for the file jerryrigserialgen-0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for jerryrigserialgen-0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 324228dd640ffe2b81a1268ca1a8333b4965e7db03e42fe6dfd5e2c02f5f4221
MD5 1d12bc9b21e4c768e384528311feb042
BLAKE2b-256 73187a209560308ca6f53fcd41dbde6d45cb07245648cfe49dbbe813a68562c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page