Skip to main content

Protected XApp core module

Project description

๐Ÿ”ฅ XApp Token Tool - Protected Module

EXTREME Protection Level - Your source code is compiled to bytecode (.pyc) which is nearly impossible to reverse engineer!

๐Ÿ›ก๏ธ What You Get

โœ… Complete Protection: Source code hidden in bytecode (.pyc)
โœ… Cross-Platform: Works on Termux, Linux, Windows, Mac, Raspberry Pi
โœ… No Exe/App: Pure Python bytecode - runs anywhere
โœ… HTML Hidden: All web interface embedded in protected module
โœ… No Decompilation: Advanced bytecode optimization prevents reverse engineering

๐Ÿ“ฆ Package Structure

xapp_protected/          โ† SHARE ONLY THIS FOLDER
โ”œโ”€โ”€ __init__.py          โ† Loader (safe to share)
โ””โ”€โ”€ __pycache__/
    โ””โ”€โ”€ xapp_core.cpython-312.pyc  โ† PROTECTED BYTECODE (your secret sauce)

run.py                   โ† Public dummy code (safe to share)
requirements.txt         โ† Dependencies list

๐Ÿš€ Installation

For Termux (Android):

# Update packages
pkg update && pkg upgrade

# Install Python
pkg install python

# Install dependencies
pip install -r requirements.txt

# Run the tool
python run.py

For Linux/Mac:

# Install dependencies
pip3 install -r requirements.txt

# Run the tool
python3 run.py

For Windows:

# Install dependencies
pip install -r requirements.txt

# Run the tool
python run.py

๐ŸŽฏ Usage

  1. Start the server:

    python run.py
    
  2. Access the web interface:

    • Local: http://localhost:10170
    • Network: http://YOUR_IP:10170
  3. Features available:

    • OAuth login (Facebook, Gmail, VK, Apple, Twitter)
    • Guest token generation
    • JWT token processing

๐Ÿ”’ Protection Explained

What Users See:

# run.py (dummy code)
from xapp_protected import create_app

def main():
    app = create_app()
    app.run(host='0.0.0.0', port=10170)

What Users DON'T See:

  • AES encryption keys
  • Protocol buffer definitions
  • API endpoints logic
  • HTML templates
  • All your secret algorithms

Why It's Protected:

  1. Bytecode Compilation: Source code โ†’ Binary bytecode
  2. Optimization Level 2: Maximum obfuscation
  3. No Source Files: Only .pyc distributed
  4. Import Protection: Dynamic loading prevents extraction

๐Ÿ“ค Distribution Guide

What to Share:

your_package/
โ”œโ”€โ”€ xapp_protected/         โ† SHARE THIS
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ””โ”€โ”€ __pycache__/
โ”‚       โ””โ”€โ”€ xapp_core.cpython-312.pyc
โ”œโ”€โ”€ run.py                  โ† SHARE THIS
โ””โ”€โ”€ requirements.txt        โ† SHARE THIS

What to KEEP SECRET:

  • โŒ xapp_core.py (original source)
  • โŒ setup.py (compilation script)
  • โŒ Any .py files in your development folder

๐Ÿ”ง Advanced Protection Tips

  1. Delete Source After Compilation:

    rm xapp_core.py
    rm setup.py
    
  2. Different Python Versions:

    • The .pyc file is version-specific
    • Users need Python 3.12 to run this bytecode
    • For other versions, recompile with that Python version
  3. Even More Protection:

    • Add fake comments in run.py
    • Use misleading variable names in public code
    • Add red herrings that do nothing

๐ŸŒ Network Access

Local Access:

http://localhost:10170

Remote Access (Termux):

# Find your IP
ifconfig

# Access from browser
http://YOUR_IP:10170

Port Forwarding:

# In Termux, you can use ports 8000-9999 without root
# Modify run.py to change port if needed

โ“ FAQ

Q: Can users see my code?
A: No! They only get the .pyc bytecode file which is compiled machine code.

Q: Can they decompile the .pyc file?
A: Extremely difficult. Bytecode decompilation tools exist but:

  • They produce unreadable code
  • Variable names are lost
  • Logic is obfuscated
  • Comments are gone
  • Many decompilers fail on optimized bytecode

Q: Does it work on Termux?
A: Yes! Tested and working perfectly on Termux.

Q: Do I need to compile an app?
A: No! It's pure Python bytecode. No exe, no apk needed.

Q: What if users have different Python versions?
A: You can create bytecode for multiple versions:

python3.8 setup.py  # Creates .pyc for Python 3.8
python3.9 setup.py  # Creates .pyc for Python 3.9
python3.12 setup.py # Creates .pyc for Python 3.12

๐ŸŽ“ For Developers

If you want to modify the protected code:

  1. Edit xapp_core.py
  2. Run python setup.py to recompile
  3. Test with python run.py
  4. Distribute only the xapp_protected/ folder + run.py

๐Ÿ“ License

Your original license here.

๐Ÿ‘จโ€๐Ÿ’ป Author

XR - @xrprime23


โš ๏ธ SECURITY NOTICE:

  • Never share xapp_core.py (source file)
  • Only distribute xapp_protected/ folder
  • Keep setup.py private
  • The .pyc file is your protected intellectual property

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

xapp_protected-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

xapp_protected-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file xapp_protected-0.1.0.tar.gz.

File metadata

  • Download URL: xapp_protected-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for xapp_protected-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d6f69255a6c0c29a9dbe08c9dae957d2fe301cb919d82a7b81659c59402bd35c
MD5 ea0efa09410fb8c7098b5edb9ce582f1
BLAKE2b-256 0b2bb0e9c90865150aff79c71d539234777e4f562faa6f3abc737316dc86098d

See more details on using hashes here.

File details

Details for the file xapp_protected-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xapp_protected-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for xapp_protected-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef4d220c8cd3f72c298797a2486a2ddd897b1c0f97cca0635a1505d8cf408e7a
MD5 9435f113670d60a3b858398cbc4c0854
BLAKE2b-256 a1fca142fc1b24d338468cee88589e5182c676ddb92bdec886aa025b2e387759

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