# OSLisLim - Open Source License Limitation
**Technical solution to protect open source projects from commercial abuse**
OSLisLim is an innovative open source project protection tool that uses technical means to prevent open source projects from being maliciously packaged into commercial software for distribution.
## Core Features
- **Mandatory Dependency Mechanism**: Project cannot run after removing protection code
- **Intelligent Usage Tracking**: Automatically records function calls and usage data
- **Packaging Environment Detection**: Blocks PyInstaller and other packaging tools
- **Complete Encryption Protection**: Protection bundle as single-line encrypted text
- **Advanced Anti-Reverse Engineering**: Multi-layer security mechanisms
## Installation
```bash
pip install oslislim
```
## Quick Start
### Basic Usage
```python
from oslislim import decrypt_and_execute, protect_function
# Must call this (project won't run if removed)
decrypt_and_execute("protection.oslim")
@protect_function
def main():
print("Protected open source project")
return "Project execution complete"
if __name__ == "__main__":
result = main()
print(result)
```
### Generate Protection Bundle
```python
from oslislim import generate_protection_bundle
# Generate default protection bundle
generate_protection_bundle()
# Or with custom configuration
generate_protection_bundle(
output_file="my_protection.oslim",
config={
"project_name": "My Project",
"author": "Author Name"
}
)
```
## How It Works
### 1. Encrypted Protection Bundle
```
exec(__import__('oslislim.crypto_client',fromlist=['decrypt_bundle_code']).decrypt_bundle_code('OSL_encrypted_data...'))
```
### 2. Mandatory Dependency Mechanism
- Project must call `decrypt_and_execute("protection.oslim")`
- Removing this line makes the project non-functional
- Creates genuine technical dependency
### 3. Packaging Environment Detection
- Automatically detects PyInstaller, cx_Freeze, Nuitka, etc.
- Immediately refuses to run in packaging environments
- Effectively prevents commercial packaging and distribution
### 4. Intelligent Tracking System
- All functions decorated with `@protect_function` are automatically tracked
- Supports local tracking mode
- Anonymized user information processing for privacy protection
## Advanced Configuration
### Custom Tracking Function
```python
def custom_tracker(func_name, args, kwargs):
"""Custom tracking logic"""
import json
import os
from datetime import datetime
usage_data = {
"timestamp": datetime.now().isoformat(),
"function": func_name,
"args_count": len(args),
"user": os.getenv("USERNAME", "unknown")
}
# Save to custom location
with open("usage_log.json", "a") as f:
json.dump(usage_data, f)
f.write("\n")
# Use custom tracker
generate_protection_bundle(tracker_code=custom_tracker)
```
### Project Configuration Options
```python
config = {
"project_name": "Project Name",
"author": "Author Information",
"version": "1.0.0",
"protection_level": "high", # standard, high
"core_functions": ["main", "init", "process"],
"license_file": "LICENSE"
}
generate_protection_bundle(config=config)
```
## Security Features
### Anti-Debugging Protection
- Debugger environment detection
- Reverse engineering tool identification
- Virtual machine environment detection
- Process analysis tool detection
### Multi-Layer Encryption
1. **XOR Encryption**: Advanced XOR with multiple layers
2. **Bit Shift Obfuscation**: Byte shift processing
3. **Base64 Encoding**: Standard encoding
4. **Character Substitution**: Custom character mapping
### Environment Checks
- Python version verification
- Operating system detection
- Execution environment analysis
- File system checks
## Use Cases
### Open Source Project Protection
- **Prevent commercial abuse**: Block packaging of open source projects into commercial software
- **Maintain open source spirit**: Ensure projects are used in open source environments
- **Technical barriers**: Increase technical difficulty for malicious use
### Software License Management
- **Usage monitoring**: Understand actual software usage patterns
- **Function call statistics**: Analyze which functions are frequently used
- **User behavior analysis**: Collect anonymous usage data
### Intellectual Property Protection
- **Source code protection**: Core algorithms stored in encrypted form
- **Reverse engineering protection**: Multiple technical measures to prevent reverse engineering
- **Legal evidence**: Provide technical means as evidence for rights protection
## Important Notes
### Legal Use
- OSLisLim is only for protecting legitimate open source projects
- Must not be used for malware or illegal purposes
- Users must comply with relevant laws and regulations
### Technical Limitations
- Cannot prevent all forms of reverse engineering
- Advanced attackers may still bypass protection mechanisms
- Recommend combining with legal measures for comprehensive protection
### Performance Impact
- Protection mechanisms introduce slight performance overhead
- Encryption/decryption processes require additional computation time
- Recommend using protection on critical functions only
## Contributing
We welcome community contributions! Please feel free to submit issues and pull requests.
### Development Environment Setup
```bash
# Clone repository
git clone https://github.com/oslislim/oslislim.git
cd oslislim
# Install development dependencies
pip install -e ".[dev]"
# Run tests
python -m pytest tests/
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Links
- [PyPI Package](https://pypi.org/project/oslislim/)
- [GitHub Repository](https://github.com/alltobebetter/oslislim)
- [Issue Tracker](https://github.com/alltobebetter/oslislim/issues)
## Contact
- **Email**: oslislim@suwork.eu.org
- **GitHub**: [@alltobebetter](https://github.com/alltobebetter)
---
**OSLisLim - Making open source projects safer and the open source spirit purer**
Raw data
{
"_id": null,
"home_page": "https://github.com/alltobebetter/oslislim",
"name": "oslislim",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "license protection open-source anti-piracy packaging wheel",
"author": "OSLisLim Contributors",
"author_email": "oslislim@suwork.eu.org",
"download_url": null,
"platform": null,
"description": "# OSLisLim - Open Source License Limitation\r\n\r\n**Technical solution to protect open source projects from commercial abuse**\r\n\r\nOSLisLim is an innovative open source project protection tool that uses technical means to prevent open source projects from being maliciously packaged into commercial software for distribution.\r\n\r\n## Core Features\r\n\r\n- **Mandatory Dependency Mechanism**: Project cannot run after removing protection code\r\n- **Intelligent Usage Tracking**: Automatically records function calls and usage data\r\n- **Packaging Environment Detection**: Blocks PyInstaller and other packaging tools\r\n- **Complete Encryption Protection**: Protection bundle as single-line encrypted text\r\n- **Advanced Anti-Reverse Engineering**: Multi-layer security mechanisms\r\n\r\n## Installation\r\n\r\n```bash\r\npip install oslislim\r\n```\r\n\r\n## Quick Start\r\n\r\n### Basic Usage\r\n\r\n```python\r\nfrom oslislim import decrypt_and_execute, protect_function\r\n\r\n# Must call this (project won't run if removed)\r\ndecrypt_and_execute(\"protection.oslim\")\r\n\r\n@protect_function\r\ndef main():\r\n print(\"Protected open source project\")\r\n return \"Project execution complete\"\r\n\r\nif __name__ == \"__main__\":\r\n result = main()\r\n print(result)\r\n```\r\n\r\n### Generate Protection Bundle\r\n\r\n```python\r\nfrom oslislim import generate_protection_bundle\r\n\r\n# Generate default protection bundle\r\ngenerate_protection_bundle()\r\n\r\n# Or with custom configuration\r\ngenerate_protection_bundle(\r\n output_file=\"my_protection.oslim\",\r\n config={\r\n \"project_name\": \"My Project\",\r\n \"author\": \"Author Name\"\r\n }\r\n)\r\n```\r\n\r\n## How It Works\r\n\r\n### 1. Encrypted Protection Bundle\r\n```\r\nexec(__import__('oslislim.crypto_client',fromlist=['decrypt_bundle_code']).decrypt_bundle_code('OSL_encrypted_data...'))\r\n```\r\n\r\n### 2. Mandatory Dependency Mechanism\r\n- Project must call `decrypt_and_execute(\"protection.oslim\")`\r\n- Removing this line makes the project non-functional\r\n- Creates genuine technical dependency\r\n\r\n### 3. Packaging Environment Detection\r\n- Automatically detects PyInstaller, cx_Freeze, Nuitka, etc.\r\n- Immediately refuses to run in packaging environments\r\n- Effectively prevents commercial packaging and distribution\r\n\r\n### 4. Intelligent Tracking System\r\n- All functions decorated with `@protect_function` are automatically tracked\r\n- Supports local tracking mode\r\n- Anonymized user information processing for privacy protection\r\n\r\n## Advanced Configuration\r\n\r\n### Custom Tracking Function\r\n\r\n```python\r\ndef custom_tracker(func_name, args, kwargs):\r\n \"\"\"Custom tracking logic\"\"\"\r\n import json\r\n import os\r\n from datetime import datetime\r\n\r\n usage_data = {\r\n \"timestamp\": datetime.now().isoformat(),\r\n \"function\": func_name,\r\n \"args_count\": len(args),\r\n \"user\": os.getenv(\"USERNAME\", \"unknown\")\r\n }\r\n\r\n # Save to custom location\r\n with open(\"usage_log.json\", \"a\") as f:\r\n json.dump(usage_data, f)\r\n f.write(\"\\n\")\r\n\r\n# Use custom tracker\r\ngenerate_protection_bundle(tracker_code=custom_tracker)\r\n```\r\n\r\n### Project Configuration Options\r\n\r\n```python\r\nconfig = {\r\n \"project_name\": \"Project Name\",\r\n \"author\": \"Author Information\",\r\n \"version\": \"1.0.0\",\r\n \"protection_level\": \"high\", # standard, high\r\n \"core_functions\": [\"main\", \"init\", \"process\"],\r\n \"license_file\": \"LICENSE\"\r\n}\r\n\r\ngenerate_protection_bundle(config=config)\r\n```\r\n\r\n## Security Features\r\n\r\n### Anti-Debugging Protection\r\n- Debugger environment detection\r\n- Reverse engineering tool identification\r\n- Virtual machine environment detection\r\n- Process analysis tool detection\r\n\r\n### Multi-Layer Encryption\r\n1. **XOR Encryption**: Advanced XOR with multiple layers\r\n2. **Bit Shift Obfuscation**: Byte shift processing\r\n3. **Base64 Encoding**: Standard encoding\r\n4. **Character Substitution**: Custom character mapping\r\n\r\n### Environment Checks\r\n- Python version verification\r\n- Operating system detection\r\n- Execution environment analysis\r\n- File system checks\r\n\r\n## Use Cases\r\n\r\n### Open Source Project Protection\r\n- **Prevent commercial abuse**: Block packaging of open source projects into commercial software\r\n- **Maintain open source spirit**: Ensure projects are used in open source environments\r\n- **Technical barriers**: Increase technical difficulty for malicious use\r\n\r\n### Software License Management\r\n- **Usage monitoring**: Understand actual software usage patterns\r\n- **Function call statistics**: Analyze which functions are frequently used\r\n- **User behavior analysis**: Collect anonymous usage data\r\n\r\n### Intellectual Property Protection\r\n- **Source code protection**: Core algorithms stored in encrypted form\r\n- **Reverse engineering protection**: Multiple technical measures to prevent reverse engineering\r\n- **Legal evidence**: Provide technical means as evidence for rights protection\r\n## Important Notes\r\n\r\n### Legal Use\r\n- OSLisLim is only for protecting legitimate open source projects\r\n- Must not be used for malware or illegal purposes\r\n- Users must comply with relevant laws and regulations\r\n\r\n### Technical Limitations\r\n- Cannot prevent all forms of reverse engineering\r\n- Advanced attackers may still bypass protection mechanisms\r\n- Recommend combining with legal measures for comprehensive protection\r\n\r\n### Performance Impact\r\n- Protection mechanisms introduce slight performance overhead\r\n- Encryption/decryption processes require additional computation time\r\n- Recommend using protection on critical functions only\r\n\r\n## Contributing\r\n\r\nWe welcome community contributions! Please feel free to submit issues and pull requests.\r\n\r\n### Development Environment Setup\r\n\r\n```bash\r\n# Clone repository\r\ngit clone https://github.com/oslislim/oslislim.git\r\ncd oslislim\r\n\r\n# Install development dependencies\r\npip install -e \".[dev]\"\r\n\r\n# Run tests\r\npython -m pytest tests/\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Links\r\n\r\n- [PyPI Package](https://pypi.org/project/oslislim/)\r\n- [GitHub Repository](https://github.com/alltobebetter/oslislim)\r\n- [Issue Tracker](https://github.com/alltobebetter/oslislim/issues)\r\n\r\n## Contact\r\n\r\n- **Email**: oslislim@suwork.eu.org\r\n- **GitHub**: [@alltobebetter](https://github.com/alltobebetter)\r\n\r\n---\r\n\r\n**OSLisLim - Making open source projects safer and the open source spirit purer**\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Technical solution to protect open source projects from commercial abuse",
"version": "0.3.2",
"project_urls": {
"Homepage": "https://github.com/alltobebetter/oslislim"
},
"split_keywords": [
"license",
"protection",
"open-source",
"anti-piracy",
"packaging",
"wheel"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "784549bf095fb724c0f72bdbe888c15fd9c4e415a7ec8bde91482db4e74adb5f",
"md5": "3e1124aece4565e76c65aa14b485f049",
"sha256": "7529aa645faf87aa790fc6a1774560fcc8bfb5c2be4d313e4c56938639e58907"
},
"downloads": -1,
"filename": "oslislim-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e1124aece4565e76c65aa14b485f049",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 15819,
"upload_time": "2025-08-10T16:09:09",
"upload_time_iso_8601": "2025-08-10T16:09:09.241495Z",
"url": "https://files.pythonhosted.org/packages/78/45/49bf095fb724c0f72bdbe888c15fd9c4e415a7ec8bde91482db4e74adb5f/oslislim-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 16:09:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "alltobebetter",
"github_project": "oslislim",
"github_not_found": true,
"lcname": "oslislim"
}