Draluy / chocoratage

Ecoute des mots cles lies au chocoblastage et verrouille la session des qu'un de ces mots est tape au clavier.
GNU General Public License v3.0
4 stars 2 forks source link

Chocoratage

Why ? / Pourquoi ?

English

If you leave your computer unattended without locking it, the odds are that someone is gonna send a message or an email to the whole company saying you'll bring breakfast for everyone the next day. And obviously you'll bring chocolate breads amongst other viennoiseries...That office prank is called a "chocoblast"! There's even a website dedicated to it.

The reason given for this is to improve security by giving developers the habit of locking their workstations. Though there are issues to this reasoning:

The appropriate behavior is this: attend to the colleagues workstation when they briefly leave their desk, the same way they will do it for us; lock the workstation, and warn the culprit in a gentle way. That's a more positive manner to address the issue.

In french, "to miss" is the verb "rater", hence we counter-attack the "chocoblastage" anglicism with this project: "chocoratage".

Français

Si vous laissez votre ordinateur sans surveillance et sans le verrouiller, il y a de fortes chances que quelqu'un envoie un message ou un e-mail à toute l'entreprise disant que vous apporterez le petit-déjeuner pour tout le monde le lendemain. Cela s'appelle un "chocoblast" !
Il y a même un site qui lui est dédié.

La raison invoquée pour cette pratique est d'améliorer la securité en donnant l'habitude aux développeurs de verrouiler leurs postes. Or, ce raisonnement est problématique:

Un comportement adapté est le suivant: surveiller le PC de nos collègues lorsqu'ils s'absentent momentanément, comme ils le feront pour nous; et verrouiller le poste qui doit l'être, en avertissant gentiment le fautif. C'est une manière plus positive de gérer le même problème.

Donc nous contre-attaquons le "chocoblastage" avec ce projet: "chocoratage".

How it works / Comment ça marche

English

Chocoratage is a Java 8 program. It comes with a list of french breakfast-related keywords & phrases. It detects your OS upon startup and listens to your keystrokes using a lightweight keylogger. Whenever anyone types a set of keys that looks like one of the forbidden phrases, it automatically locks your session. By default the program uses a Levenshtein algorithm for forbidden phrases matching. Another, more efficient normalization-based algorithm is available, for tough cases.
That will not make your computer 100% chocoblast-proof as your coleagues can become real creative when they're hungry, but it will save your skin a couple of times.

Français

Chocoratage est écrit en Java 8. It embarque une liste de mots-clés et bouts de phrases sur le thème du petit déjeuner. Il détecte votre OS au démarrage et écoute votre clavier à l'aide d'un keylogger très léger. Lorsque quelqu'un tape une suite de caractères approchante d'un des termes interdits, il vérouille automatiquement votre session.
Par défaut, le programme utilise un algo de Levenshtein pour la reconnaissance des termes interdits. Il dispose aussi d'un autre algorithme basé sur la nomalisation pour les cas difficiles.
Ca ne rendra pas votre ordinateur totalement imperméable au chocoblastage, vos collègues pouvant devenir créatifs quand ils ont faim, néanmoins cela vous sauvera bien la mise une ou deux fois.

Installation

English

Just download the uberjar, and run it using java -jar chocoratage.jar
You may use the .sh/.bat provided in the /scripts folder
That's all.

Obviously we can't run this program in a Docker. We could pass ENV vars to let the program infer which host the VM is running on, but we would be unable to grab the keyboard strokes or lock the host's session.

Français

Téléchargez le uberjar, et lancez-le simplement avec java -jar chocoratage.jar
Vous pouvez éventuellement utiliser le .bat ou .sh que vous trouverez dans /scripts. C'est tout.

Evidemment, il n'est pas possible de lancer ce programme dans un Docker. Même s'il est possible de lui passer des vars d'ENV pour lui permettre de détecter l'OS du host, il serait très difficile de capter le clavier et encore moins de vérouiller la session du host.

Command line switches / options de ligne de commande

Compatibility / Compatibilité

English

See the OS.md file for the list of OSes we tested on VMs or real hardware in 2020 and for which we enabled an efficient locking mechanism. The program supports most Linux distributions, Windows, OSX, and even FeeBSD and Solaris versions.

Français

Veuillez vous référer au fichier OS.md pour la listes des OS que nous avons testé sur des VMs ou du matériel en 2020, et pour lesquels nous avons câblé un vérouillage efficace. Le programme prend en charge quasi-totalité des distributions Linux, ainsi que Windows, OSX et même des versions de FreeBSD et Solaris

English
Français