A consent-based local monitoring demo built with Python and Flask for educational testing, device diagnostics, optional screenshot capture, optional webcam capture, and simple dashboard export workflows.
This repository is for consent-based, authorized, educational use only.
- do not use it on devices you do not own or explicitly control
- do not collect screenshots, webcam images, or device data without clear permission
- do not present this project as a stealth or covert surveillance tool
This project demonstrates how a lightweight client-server monitoring workflow can be built for learning purposes: collect local device information with consent, send it to a Flask server, and inspect or export the captured data from a simple dashboard.
- Collects basic device information
- Fetches public IP with fallback handling
- Optional screenshot capture with explicit prompt
- Optional webcam capture with explicit prompt
- Sends collected data to a Flask endpoint
- Displays stored entries in a minimal dashboard
- Supports JSON export of stored records
- Python
- Flask
- Requests
- PyAutoGUI
- OpenCV
.
|-- client/
| `-- client.py
|-- server/
| `-- app.py
|-- requirements.txt
`-- README.md
- Python 3.10+
- A local environment with camera and screenshot permissions if you want to test capture flows
- Create a virtual environment.
python -m venv .venv
.venv\Scripts\activate- Install dependencies.
pip install -r requirements.txtOptional environment variables:
DESI_SPY_SERVER_URLfor the client upload endpointDESI_SPY_DATA_FILEfor custom server-side storage locationHOSTandPORTfor the Flask serverFLASK_DEBUG=1only for local debugging
Start the server:
cd server
python app.pyThen start the client:
cd client
python client.pyThe client will ask for permission before capturing a screenshot or webcam image.
- Best used on a local machine or trusted LAN for demo purposes
- Export collected data from the
/exportendpoint - Review what is collected before sharing any output
- Dashboard UI is intentionally simple
- Data is stored in a local JSON file, not a database
- Screenshot and webcam behavior depend on local device permissions
- This project is not positioned as a production monitoring platform
- explicit consent is required before optional media capture
- keep storage local unless you fully understand the privacy impact
- avoid collecting sensitive data in real-world scenarios
- document usage clearly if you demo this project to others
Suggested demo title:
Desi Spy Demo: Consent-Based Local Monitoring with Python and Flask
Suggested screenshot filenames:
docs/images/client-consent-prompts.pngdocs/images/flask-dashboard.pngdocs/images/export-workflow.png
Suggested Open Graph preview idea:
- A split layout showing the terminal-based client prompts and the lightweight dashboard with the title
Consent-Based Monitoring Demo
- Add a cleaner dashboard interface
- Improve storage handling and data review UX
- Add better testability around capture-free flows
- Keep safety messaging strong and visible
Contributions are welcome for clarity, safety, maintainability, and documentation improvements.
See CONTRIBUTING.md for details.
This repository is available under the MIT License.
Built by Nishant Kumar