Add Gimaweb TOTP tool

parent eb5cada0
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Gimaweb
Comment=Aller sur gimaweb et générer un code TOTP
Exec=/opt/primtux-eole/gimaweb.sh
Icon=administration
Terminal=false
Type=Application
StartupNotify=false
Categories=Network;RemoteAccess;
Name[fr_FR]=Demande Batiment
#!/bin/bash
if [ -z "$(which oathtool)" ]
then
apt-get update
apt-get -y install oathtool
fi
file="/home/direction/Documents/Partages_Serveur/CONFIDENTIEL_DIRECTION/.gimaweb_secret.totp"
secret=$(cat $file)
if [ -z "$secret" ]
then
secret=$(zenity --title "Connexion Gimaweb" --text "Veuillez entrer la clé secrete indiquée par auth.lametro.fr" --entry)
echo $secret > $file
else
firefox https://gimaweb-demandes.lametro.fr &
fi
code=$(oathtool --totp --base32 $secret)
zenity --info --text "Votre code temporaire est : $code" --title "Votre code TOTP"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment