PythonProtector 1.8
Library for protecting your python files
License: MIT
Requires Python: >=3.11
Keywords: keyauth,protection,protect,obfuscate,obfuscation,WMI,windows

# PythonProtector

![pyprotector](https://cdn.discordapp.com/attachments/1019356864548446269/1066498438386176102/image.png)

[![forthebadge made-with-python](http://ForTheBadge.com/images/badges/made-with-python.svg)](https://www.python.org/)

A modern, easy to use and feature-rich way to protect your Python Programs.

## Features

- Completely Configurable Module System 
- Completely Configurable On Detection System
- Encrypted Logging System With Remote Uploading
- Discord Webhook Support
- Clean, Optimized Code
- Constant Updates

## Installation

**Python 3.11 or higher is required**

Install The PyPi Version:

```sh
py -3 -m pip install -U PythonProtector
```

You may also install the development version:
```sh
pip install git+https://github.com/xFGhoul/PythonProtector.git
```

## Usage

Quick Example:
```py
from pathlib import Path
from threading import Thread

from pyprotector import PythonProtector

# -- Define Constants
LOGGING_PATH = (
    Path.home() / "AppData/Roaming/PythonProtector/logs/[Security].log"
)  # -- This can be any path

# -- Construct Class
security = PythonProtector(
    debug=True,
    modules=[
        "AntiProcess",
        "AntiVM",
        "Miscellaneous",
        "AntiDLL",
        "AntiAnalysis",
        "AntiDump"],
    logs_path=LOGGING_PATH,
    webhook_url="",
    on_detect=[
        "Report",
        "Exit",
        "Screenshot"],
)

# -- Main Code
if __name__ == "__main__":
    SecurityThread = Thread(
        name="Python Protector", target=security.start
    )  # -- Start Before Any Other Code Is Run
    SecurityThread.start()
    # Other Code
```

You can find more examples in the [examples](https://github.com/xFGhoul/PythonProtector/blob/dev/examples/) directory.

## Files and Explanations

`├──`[`.github`](https://github.com/xFGhoul/PythonProtector/blob/dev/.github) — GitHub configuration including CI/CD workflows<br>
`├──`[`.vscode`](https://github.com/xFGhoul/PythonProtector/blob/dev/.vscode) — VSCode Related Settings<br>
`├──`[`data`](https://github.com/xFGhoul/PythonProtector/blob/dev/data) — Data Files Needed By PythonProtector<br>
`├──`[`examples`](https://github.com/xFGhoul/PythonProtector/blob/dev/examples) — Examples Showing How To Use PythonProtector<br>
`├──`[`pyprotector`](https://github.com/xFGhoul/PythonProtector/blob/dev/pyprotector) — Source Code Of PythonProtector<br>
`├──`[`scripts`](https://github.com/xFGhoul/PythonProtector/blob/dev/scripts) — Scripts Used In The Development Process<br>

## Links

- [Documentation](http://ghouldev.me/PythonProtector/)
- [Official Discord Server](https://discord.gg/yMu9qjdrmp)

> Made With ❤️ By `ghoul#1337` and `Marci#0101`

## 1.0 - 2022-09-18

Release Initial Project

## 1.1 - 2022-12-28

So It's been kind of a while since we released a new update, I had some pretty big stuff going on irl, no time to code, just recently came back and decided to make some updates.

- Completely Configurable Module System - Users now have the choice of deciding what modules they use, currently there are only the main 4 me and marci provide, but we are open to pull requests and we will be adding more in the future, do check the repository or the example for more information.

- `should_exit` argument - gives users the ability to decide if the program should exit if one of the detections were raised.

- Overall Improvement/Refactoring - This update didn't bring everything me and marci are planning for, but this is just a couple, in the update I made to sure to cover some edge cases so you guys don't get confused

## 1.5 - 2023-01-05

I know this is a pretty quick release, and the jump from `1.1` to `1.5` but I felt it was only necessary with the amount of changes made.

### Major Changes:

- **Encrypted Logging** - Instead of logs that anybody can read, logs are now encrypted at runtime and are only decrypted if malicious activity is detected

- **AntiAnalysis** - Thanks to the work of Marci, a new module has been made!, this one comes with some pretty neat features, be sure to check it out

- **New On Detection System** / `on_detect` - Similarly to the new configurable module system, I've gone ahead and done the same with what happens when malicious activity is detected, check out the examples for how it's used

### Minor Changes

- **Updated Minimum Python Requirement To 3.11**

- **Refactoring and Misc Improvements**

## 1.6 - 2023-01-07

Minor bump for `setup.py` bug that didn't allow importing.

## 1.7 - 2023-01-25

### Major Changes

- **Live Documentation** - Docs are now public at http://ghouldev.me/PythonProtector

- **Event System** - Event System, see docs for more info

### Minor Changes

- **Miscellaneous Changes/Refactoring** - For A Better User Experience

## 1.8 0 2023-02-11

### Major Changes

- **Anti Dump** - New Anti Dump Module

### Minor Changes

- **Miscellaneous Changes/Refactoring** - For A Better User Experience
- **Bug Fixes** - Many Bug Fixes For Edge Cases