Metadata-Version: 2.4
Name: xapp-protected
Version: 0.1.0
Summary: Protected XApp core module
Author: Mr Void
License: MIT
Project-URL: Homepage, https://github.com/ibrahimkhan008
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: Flask>=2.3.0
Requires-Dist: pycryptodome>=3.18.0
Requires-Dist: requests>=2.31.0
Requires-Dist: PyJWT>=2.8.0
Requires-Dist: protobuf>=4.23.0

# 🔥 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):
```bash
# 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:
```bash
# Install dependencies
pip3 install -r requirements.txt

# Run the tool
python3 run.py
```

### For Windows:
```cmd
# Install dependencies
pip install -r requirements.txt

# Run the tool
python run.py
```

## 🎯 Usage

1. **Start the server:**
   ```bash
   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:
```python
# 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:**
   ```bash
   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):
```bash
# Find your IP
ifconfig

# Access from browser
http://YOUR_IP:10170
```

### Port Forwarding:
```bash
# 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:
```bash
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](https://github.com/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
