Skip to content

Exploit-Inject/exploitlabs-demo-archive

Repository files navigation

Multi-Project Licensing System: How It Works

This workspace contains a Central License Manager Portal (license_manager_portal) and 8 client projects (e.g., Healthcare CMS, VortexMart, MobiMart, etc.).

By integrating them, you can now generate license keys from your central portal, sell them to clients, and have each client's site verify its activation automatically.


🔄 High-Level Workflow

Here is the simple step-by-step process of how you sell and manage licenses:

sequenceDiagram
    autonumber
    actor Developer as You (Developer)
    actor Client as Customer
    participant Portal as License Manager Portal
    participant Site as Client's Installed Site

    Developer->>Portal: 1. Register Product & Generate License Key
    Developer->>Client: 2. Sells License Key to Customer
    Client->>Site: 3. Paste key in Setup Wizard / Activation Page
    Site->>Portal: 4. cURL Request: "Is this key valid for my domain?"
    Portal-->>Site: 5. Response: "Yes, valid!" (locks key to client domain)
    Site-->>Client: 6. Activates and loads the website successfully
Loading

🛠️ The Licensing Components

1. The Central Server (license_manager_portal)

This is your admin control center.

  • Database: Keeps track of all registered products, keys, expiry dates, and the domains that activated them.
  • Verification API (verify.php): A secure API endpoint that client sites call to check if their key is active.
  • Reseller vs Single Domain vs Yearly:
    • Single Domain / Yearly: The first domain to use the key locks it. Future requests from other domains are rejected.
    • Reseller: Can be activated on unlimited client domains.
    • Yearly: Stops working automatically after the expiration date passes.

2. The Client Helper (LicenseVerifier.php)

Every client project now includes this helper. It handles the activation screen and validation checks:

  • Self-Activation Screen: If a client project does not have a license key configured, it intercepts the page load and displays a premium screen asking for the key. Once a valid key is entered, it writes define('LICENSE_KEY', '...'); directly into the project's config file automatically.
  • Session Caching (Performance): To make sure client websites load instantly (without a 100ms API lag on every click), the helper caches the verification status in the PHP Session.
    • First Visit / New Session: Calls the central server to verify the key.
    • Subsequent Clicks: Reads the validation status from the session (0ms delay).

🔌 How to Test and Sell a Key

Step 1: Create a Key in the Portal

  1. Open http://localhost/license_manager_portal/login.php in your browser.
  2. Log in (default developer credentials: Username: admin / Password: Admin@123).
  3. If not already registered, register the product under Scripts List using its unique slug (e.g. visa_agency, healthcare, vortexmart, fitness, etc.).
  4. Click Generate License Key, select the product, choose the license type, and click Create Key. Copy the generated key.

Step 2: Activate a Client Project

  • For projects with installation wizards (like Healthcare, VortexMart, MobiMart):

    1. Open the installation wizard in your browser (e.g., http://localhost/healthcare/install/index.php).
    2. Fill in the database details, admin details, and enter the copied license key.
    3. The installer will verify the key and complete setup.
  • For pre-installed projects (like GauKaRoti, Fitness, EX-House, visa_agency, Cleaning-service):

    1. Visit the project homepage in your browser (e.g., http://localhost/visa_agency/).
    2. You will be greeted by the activation UI.
    3. Paste the license key and click Activate Script. The helper will save it and reload the website.

🔒 Suspending or Expiring a License

If a client defaults on payment, or their subscription expires:

  1. Find their key in your License Manager Portal dashboard.
  2. Click Suspend or let the Expiry Date pass.
  3. The next time the client's session renews, the script will automatically lock them out and display a warning screen blocking access to their dashboard and database.

About

Centralized repository for storing and managing demo website projects created by Exploit-Labs team members. Used internally for client presentations, rapid deployment, design references, and project reuse across the agency.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors