Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pylicensify

Latest version: v1.5.0

Overview

Last scanned
30 Nov 2026
Published
30 Nov 2026
PyPI package Publisher: darkcoder.mithun
7 Versions
516 Downloads

Scan summary

pylicensify was last scanned on 30 Nov 2026 at version 1.5.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 2 were published within 7 days (24–30 Nov 2026).
  • Findings: No rules fired in version 1.5.0.
  • Downloads: 516 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.5.0 LATEST 30 Nov 2026 No rules fired
1.4.1 24 Nov 2026 No rules fired
1.4.0 16 Nov 2026 No rules fired
1.3.0 16 Nov 2026 Not shown
1.2.1 14 Nov 2026 Not shown

No rules fired in 1.5.0

Findings

Findings for v1.5.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.5.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

pylicensify

License key validation for Python that a cracked build can't fake.

Verify software license keys at runtime with Ed25519-signed responses, bind them to devices (HWID), sell concurrent seats, and activate offline — in a few lines.

PyPI Python License

pip install pylicensify
from pylicensify import LicenseClient

client = LicenseClient(public_key="YOUR_PUBLIC_KEY")

if not client.validate("XXXX-XXXX-XXXX-XXXX"):
    raise SystemExit("Not licensed")

# your app starts here

Why not just ask your own server?

Because the usual approach breaks in about five minutes.

Most licensing code sends the key somewhere and trusts whatever comes back. So an attacker doesn't attack your key format or your crypto — they point your app at a server of their own that answers {"valid": true} to everything. One line in /etc/hosts, and every copy is licensed forever.

The check was never the hard part. Making the answer impossible to forge is.

Every response from the license server is signed with an Ed25519 private key that never leaves the server. Your app embeds only the public key and verifies the signature locally:

your app  ──── key + random nonce ───▶  license server
          ◀─── result + signature ────  (signed with the private key)
              │
              └─ verified against the public key baked into your build
                 wrong signature → SignatureError, not "licensed"

A fake server can return a valid-looking JSON body, but it cannot produce a signature that verifies. Redirect the app anywhere you like — it fails closed.

The nonce and timestamp are signed too, so a genuine "yes" captured off the wire can't be replayed back later.


Quick start

Get your public key from the dashboard → Integration. It's safe to embed in a distributed app; the private key never leaves the server.

from pylicensify import LicenseClient

client = LicenseClient(
    public_key="YOUR_PUBLIC_KEY",
    product_id="YOUR_PRODUCT_ID",   # see "Pin your product" below
)

result = client.validate("XXXX-XXXX-XXXX-XXXX")

if not result:
    print("Not licensed:", result.error)
    raise SystemExit(1)

print("Licensed")

validate() generates a nonce, verifies the Ed25519 signature, and rejects stale or replayed responses automatically. It returns a falsy ValidationResult when the key is refused, and raises SignatureError on tampering or NetworkError when the server is unreachable.

Prefer exceptions to truthiness checks? Pass raise_on_invalid=True and a refused key raises InvalidLicense instead of returning a falsy result.


What you get

Signed responses Ed25519 on validation, seats, heartbeats and update checks
Product pinning A key for one product will not unlock another
Device binding Lock a key to n machines by hardware id
Entitlements One key unlocks different tiers — signed, so they can't be flipped
Floating licenses Sell n concurrent seats instead of n installs
Offline activation Signed .lic files that verify with no network at all
Update checks Ship new builds only to customers with a live license

Pin your product

If your account sells more than one product, set product_id.

One Ed25519 keypair signs for your whole account, not per product. Without a pin, validate() returns the signed product_id but never checks it — so a key for your $10 utility verifies perfectly inside your $500 app. No tampering, no patched binary, no fake server: just a customer using a cheap key in the wrong place.

client = LicenseClient(
    public_key="YOUR_PUBLIC_KEY",
    product_id="YOUR_PRODUCT_ID",   # from the dashboard, on the product page
)

A response for any other product now raises ProductMismatch. It applies to validate(), lease(), session() and check_update(), and it takes a per-call override where you need one:

client.validate(key, expected_product_id="prod_other")

Offline files take the same argument:

verify_offline_license(PUBLIC_KEY, "license.lic", expected_product_id="YOUR_PRODUCT_ID")

ProductMismatch subclasses InvalidLicense, so existing handlers keep working. Leaving product_id unset preserves the old behaviour — nothing breaks on upgrade — but a single-product account is the only case where that is safe.


Entitlements (feature gating)

Attach flags to a key — {"pro": true, "seats": 5} — and they arrive inside the signed payload, so a patched client can't turn them on:

result = client.validate(key)

if result.feature("pro"):
    enable_pro_features()

seats = result.feature("seats", 1)   # second arg is the default

A key with no entitlements returns an empty result.features dict — set them per key when you generate it.

Upgrade to 1.0.4 or later. In 1.0.3 and earlier the client read the entitlements from an unsigned copy of the response, so they could be edited in transit while the signature still verified. 1.0.4 reads them from the signed payload. The license check itself was never affected — only entitlement values.


Device binding (HWID)

Each key can be limited to a number of machines. The SDK sends a stable per-installation device id automatically:

from pylicensify import get_hwid

client.validate(key)                       # uses get_hwid() for you
client.validate(key, hwid=my_own_id())     # or supply your own

The default id is the machine's MAC address where one is readable, otherwise a random id persisted to disk and reused on every run. That matters more than it sounds: a naive uuid.getnode() changes between runs on Android/Pydroid, VMs and containers, which would burn through a customer's device limit on a single machine.

The persisted id lives in a per-user data dir — %LOCALAPPDATA%\pylicensify on Windows, ~/.local/share/pylicensify elsewhere. Override the location with the PYLICENSIFY_HWID_DIR environment variable.


Floating (concurrent) licenses

For teams: cap how many copies run at the same time rather than how many are installed. The SDK checks out a seat, heartbeats in the background, and releases it on exit — including when the process dies, because the lease simply expires.

from pylicensify import LicenseClient, SeatUnavailable

client = LicenseClient(public_key="YOUR_PUBLIC_KEY", product_id="YOUR_PRODUCT_ID")

try:
    with client.session("XXXX-XXXX-XXXX-XXXX") as sess:
        print("Seat acquired:", sess.seats)   # {'used': 1, 'max': 5}
        while work_remaining():
            sess.ensure_active()              # raises SeatUnavailable if lost
            do_a_chunk_of_work()
except SeatUnavailable:
    print("All seats are in use — try again later.")

The seat can be lost while your code runs, and the SDK will not stop it for you — killing a customer's process mid-work is worse than letting it finish. Entering the context manager is a checkout, not a guard. Check sess.active, call sess.ensure_active() where stopping is safe, or pass a callback:

with client.session(key, on_lost=lambda why: log.warning("seat lost: %s", why)):
    ...

Lease and heartbeat responses are Ed25519-signed and verified exactly like validate() — a fake server can't hand out seats it has no right to, and a forged heartbeat counts as "seat lost" rather than "still held".

A genuine network blip still counts as held, so a brief outage won't kill a running app — but only until the last signed expiry runs out. An unreachable server never extends a seat; if it stays unreachable past that expiry the session gives up, because by then the server has handed the same seat to somebody else. Pulling the network cable is not a way to get an unlimited offline seat.

The lower-level lease(), heartbeat() and release() methods are available if you need to drive the lifecycle yourself.

Signed floating licenses need server 2026-08-27 or later. Against an older server, lease() raises SignatureError because the response carries no signature to check. Upgrade the server, or pin pylicensify<1.0.4.


Sign in with email (instead of a key)

Your customer doesn't have to type a key. sign_in() shows a code, opens the customer portal in the browser, and waits while the customer signs in with the email on their license and approves this computer. You get a token that works wherever a key does, only on this device. Turn on "Sign in with email" for the product on the dashboard's Products page first.

from pathlib import Path
from pylicensify import LicenseClient, SignedOut

client = LicenseClient(public_key="YOUR_PUBLIC_KEY", product_id="YOUR_PRODUCT_ID")
saved = Path.home() / ".myapp" / "signin"

if saved.exists():
    token = saved.read_text().strip()
else:
    token = client.sign_in(on_code=lambda s: print(f"Open {s.url} and enter {s.code}"))
    saved.parent.mkdir(parents=True, exist_ok=True)
    saved.write_text(token)

result = client.validate(token)      # also record_usage, get_variables, session, check_update
if result.signed_out:                # signed out in the portal or the dashboard
    saved.unlink()                   # forget it and sign in again

Calls that raise do so with SignedOut (a kind of InvalidLicense) when the sign-in has ended. client.sign_out(token) ends it from your app. Waiting can end with SignInDenied (the customer declined) or SignInExpired (the code ran out after 10 minutes). For your own UI, start_sign_in() returns the code and URL, and .wait() (or .check() once) collects the token.

Usage-based licenses (credits)

Sell "100 exports", "5,000 AI requests a month" or any other metered unit. Give the key a credit limit in the dashboard (optionally refilled daily or monthly), then spend from it when the user does the metered thing:

from pylicensify import UsageExceeded

result = client.validate(key)            # activates this device first
print(result.usage)                      # <Usage 37/100 remaining=63>, or None for unmetered keys

try:
    left = client.record_usage(key, amount=1)
    run_export()
    print(left.remaining, "credits left")
except UsageExceeded as e:
    print("Out of credits:", e)          # e.usage has used / limit / resets_at
  • get_usage(key) reads the balance without spending.
  • Spending is atomic on the server: all amount credits are taken, or none.
  • The device must already be activated on the key, so a leaked key on its own can't drain someone's credits.
  • Answers are signed and verified like validate(), so a fake server can't hand out free credits.
  • record_usage() is never retried for you. If the network fails mid-call the credits may already be spent, so decide yourself whether to try again.
  • Your store or backend can top up a key after a purchase with an API key: POST /api/manage/licenses/{id}/usage and {"op": "add", "amount": 100}.

Needs pylicensify 1.3.0 or later.


Remote variables

Keep values out of your app binary and hand them only to licensed users: a config URL, a download link, an announcement, a feature switch. Set them in the dashboard under Remote Variables, for all products or one, optionally only for keys whose entitlements include a flag such as pro:

result = client.validate(key)                      # activates this device first
url = client.get_variable(key, "download_url")     # None if not set for this key
cfg = client.get_variables(key)                    # {"api_base": "...", "motd": "..."}

The server answers only for an active, unexpired key on an activated device, and the answer is signed and verified, so a leaked key alone can't read them and a fake server can't change them. Values are encrypted at rest. Needs pylicensify 1.4.0 or later.


Analytics: report your app version

Pass your own app's version and the dashboard's Analytics page shows which versions your customers run, alongside active devices, countries and OS:

client = LicenseClient(public_key="...", app_version="2.4.1")

Needs pylicensify 1.4.0 or later. Nothing else about the machine is sent.


Offline activation (air-gapped)

Check a signed .lic file with no internet at all, for air-gapped machines. Signature, product, expiry, device and operating system are all checked on the computer.

  1. Your app shows its device id, and the customer sends it to you.
  2. License keys → ⋯ → Offline license file: paste the device id, set how many days it lasts, download the .lic file.
  3. Send it to the customer. Your app reads it from disk.
from pylicensify import InvalidLicense, SignatureError, get_hwid, verify_offline_license

# 1. Show this to the customer. They send it to you, and you create the file
#    for that device: License keys -> ... -> Offline license file.
print("Device id:", get_hwid())

# 2. The customer saves the file next to your app. No network is used here.
try:
    lic = verify_offline_license(
        "YOUR_PUBLIC_KEY",
        "license.lic",
        expected_product_id="YOUR_PRODUCT_ID",   # your product
    )
except SignatureError:
    raise SystemExit("The license file is missing, damaged or was edited.")
except InvalidLicense as e:
    raise SystemExit("License file refused: %s" % e)   # expired, other device, OS or product

# 3. Use it. It never returns an invalid license: it raises instead.
features = lic.get("features") or {}
print("Licensed to:", lic.get("customer"), "Expires (unix time):", lic.get("expires_at") or "never")
if features.get("pro") is True:
    print("Pro features unlocked")
  • Revoking a key can’t reach a file you already sent, so give files a short life.
  • The expiry uses the computer’s own clock.
  • A blank device id makes a file that works on any computer.

It raises SignatureError if the file is missing, damaged or edited, and InvalidLicense if it has expired or belongs to another device, operating system or product.


Update checks

Serve new builds only to customers with a live license:

info = client.check_update("XXXX-XXXX-XXXX-XXXX", current_version="1.0.0")

if info["update_available"]:
    print("New version:", info["version"], info["notes"])
    # info["download_url"] only works while the key is active and unexpired

The answer is signed and verified — including "no update available", so a server in the middle can't quietly suppress a security release by claiming there's nothing to install.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases pylicensify

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229