Skip to main content

Un serveur HTTP FastAPI pour récupérer les applications installées

Project description

Watchman HTTP Server

Watchman HTTP Server est un serveur FastAPI qui expose la liste des applications installées ainsi que des informations sur le système.

Installation

Installez le package via pip :

pip install watchman_http_server

Ou depuis le code source :

git clone https://github.com/votre-repo/watchman_http_server.git
cd watchman_http_server
pip install -e .

Utilisation

Lancer le serveur avec un port et une clé API spécifiés :

watchman-runserver --port 8000 --api-key "VOTRE_CLE_API"

Configuration

  • --port : Définit le port d'écoute du serveur (par défaut : 8001).
  • --api-key : Spécifie la clé API requise pour accéder aux endpoints.

Endpoints

GET /apps

Retourne la liste des applications installées et les informations du système.

Headers requis

WATCHMAN-API-KEY: VOTRE_CLE_API

Exemple de réponse

{
  "system_info": {
    "hostname": "mon-pc",
    "ip": "192.168.1.10",
    "mac": "A1:B2:C3:D4:E5:F6",
    "architecture": "x86_64",
    "os": "Windows 10"
  },
  "applications": [
    {
      "name": "Google Chrome",
      "version": "99.0.4844.84",
      "vendor": "Google LLC",
      "type": "application"
    }
  ]
}

Déploiement sur un réseau local

Pour rendre le serveur accessible sur un réseau local :

  1. Lancer le serveur avec 0.0.0.0 comme hôte :
    watchman-runserver --port 8000 --api-key "VOTRE_CLE_API"
    
  2. Assurez-vous que le port est ouvert dans le pare-feu :
    • Windows :
      netsh advfirewall firewall add rule name="Watchman" dir=in action=allow protocol=TCP localport=8000
      
    • Linux :
      sudo ufw allow 8000/tcp
      

Contributions

Les contributions sont les bienvenues ! Clonez le projet, créez une branche et proposez vos modifications via une pull request.

Licence

Ce projet est sous licence MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watchman_http_server-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watchman_http_server-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file watchman_http_server-0.1.0.tar.gz.

File metadata

  • Download URL: watchman_http_server-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for watchman_http_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1835775958c16ef5b5ca6fbfa06f915cb67e6d8058cf5fdf5a4ee92d09220433
MD5 2a7da3b63942eb270ee6ec3dbcf796c5
BLAKE2b-256 1d29aa80c44912ba2eece432c51c4b6687777171acb02f4b996f98c458a40c55

See more details on using hashes here.

File details

Details for the file watchman_http_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for watchman_http_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11705045d00364e614e9c9063fbe524d01e8045dcfab3ef0cb7cd937fecbe438
MD5 00edb7b0b83a4c878c9a58ba417100f7
BLAKE2b-256 7e4969054a48c6e4dfdd562fbd60222007b2b2c0844f01033685af762c9845a8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page