Metadata-Version: 2.1
Name: openchaver-client
Version: 0.1.0
Summary: An open source alternative to WebChaver.
Home-page: https://github.com/dickermoshe/OpenChaver
Author: Moshe Dicker
Author-email: mail@openchaver.com
License: GNU General Public License v3.0
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: alembic (==1.8.1)
Requires-Dist: banal (==1.0.6)
Requires-Dist: certifi (==2022.9.24)
Requires-Dist: charset-normalizer (==2.1.1)
Requires-Dist: click (==8.1.3)
Requires-Dist: colorama (==0.4.5)
Requires-Dist: coloredlogs (==15.0.1)
Requires-Dist: dataset (==1.5.2)
Requires-Dist: Flask (==2.2.2)
Requires-Dist: flatbuffers (==22.9.24)
Requires-Dist: greenlet (==1.1.3.post0)
Requires-Dist: humanfriendly (==10.0)
Requires-Dist: idna (==3.4)
Requires-Dist: itsdangerous (==2.1.2)
Requires-Dist: Jinja2 (==3.1.2)
Requires-Dist: Mako (==1.2.3)
Requires-Dist: MarkupSafe (==2.1.1)
Requires-Dist: mpmath (==1.2.1)
Requires-Dist: mss (==6.1.0)
Requires-Dist: numpy (==1.23.4)
Requires-Dist: onnxruntime (==1.12.1)
Requires-Dist: opencv-python (==4.6.0.66)
Requires-Dist: oschmod (==0.3.12)
Requires-Dist: packaging (==21.3)
Requires-Dist: Pillow (==9.2.0)
Requires-Dist: protobuf (==4.21.7)
Requires-Dist: psutil (==5.9.2)
Requires-Dist: pynput (==1.7.6)
Requires-Dist: pyparsing (==3.0.9)
Requires-Dist: pyreadline3 (==3.4.1)
Requires-Dist: pywin32 (==304)
Requires-Dist: requests (==2.28.1)
Requires-Dist: six (==1.16.0)
Requires-Dist: SQLAlchemy (==1.4.41)
Requires-Dist: sympy (==1.11.1)
Requires-Dist: urllib3 (==1.26.12)
Requires-Dist: Werkzeug (==2.2.2)
Requires-Dist: marshmallow (==3.18.0)

# OpenChaver  

```
# Run the services
python openchaver.py

OR

# Build an Executable
python -m nuitka .\openchaver.py --standalone --onefile --enable-plugin=numpy --include-data-dir=`"${pwd}\openchaver\nsfw_model`"=nsfw_model
```

The working services are:
- [x] `scheduler` - Sends events to the `screenshot` service.
- [x] `screenshot` - Takes screenshots of the active window. Sends the screenshot to the `storage` service.
- [x] `storage` - Stores the screenshots in the `sqlite` database.
- [x] Add a `idle` service that will pause the `screenshot` service if the user is idle.
- [x] ~~Add a `keystroke` service that will send events to the `screenshot` service if NSFW text is detected.~~ (Window Defender treats this as a virus. Any workarounds will be unstable.)


TODO:
- [ ] Create the uninstallation script that will uninstall the application.
- [ ] Create the configuration script that will configure the application.
- [ ] Add a `upload` service to upload the screenshots to the remote server.
- [ ] Create the remote backend server that will send reports and alerts to the chaver. -> [openchaver-server](https://github.com/dickermoshe/OpenChaver-Server)
- [ ] Create the installation script that will install the application.
- [ ] Create the update script that will update the application.
- [ ] Create the documentation for the application.
- [ ] Create the tests for the application.
- [ ] Create the watchdog for the application.


As you can see, there is a lot to do. If you want to help, please contact me.


## Breakdown

```
db.py - The database module. It contains the `db` class that is used by the models to store and retrieve data from the database.

detect.py - The detection module. This contains a bunch of functions that are ran as threads. Look at service.py to see how they are used.

dog.py - the watchdog module.

models.py - The models module. This contains the `ConfigurationModel` and `ScreenshotModel` models that are used to store and retrieve data from the database.

nsfw.py - The NSFW module. This contains the `OpenNsfw` and `NudeNet` that is used to detect NSFW content in images.

profanity.py - The profanity module. This checks for not nice words in the text.

server.py - The server module. For the main openchaver site to communicate with the client application.

service.py - The service module.  This does the following:
    1. It creates the `scheduler` service that will send events to the `screenshot` service.
    
    2. It creates the `screenshot` service that will take screenshots of the active window.
    
    3. It creates the `idle` service that will pause the `screenshot` service if the user is idle.

    4. It creates the `upload` service that will upload the screenshots to the backend server.

    5. It creates the `watchdog` service that will check the status of the application and send alerts to the chaver if evasive action is detected.

window.py - The window module. This contains the `Window` class that is used to get the active window and take screenshots of it.
```
