You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

39 lines
1.2 KiB

# -*- coding: utf-8 -*-
import tkinter as tk
import os
class InterfaceServeur(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.title("Serveur sécurisé")
self.geometry("400x300")
self.configure(bg="#1e1e2f")
titre = tk.Label(self,text="🐱 SERVEUR RSA 🐱",font=("Arial", 20, "bold"),bg="#1e1e2f",fg="white")
titre.pack(pady=20)
bouton1 = tk.Button(self,text="😺 Serveur Hello",font=("Arial", 12, "bold"),bg="#4CAF50",fg="white",width=20,height=2,command=self.hello)
bouton1.pack(pady=15)
bouton2 = tk.Button(self,text="✅ Finished",font=("Arial", 12, "bold"),bg="#2196F3",fg="white",width=20,height=2,command=self.finished)
bouton2.pack(pady=15)
self.label = tk.Label(self,text="En attente...",font=("Arial", 11),bg="#1e1e2f",fg="lightgray")
self.label.pack(pady=20)
def hello(self):
os.system('printf "\a"')
print("Miaou 🐱")
self.label.config(text="😺 HELLO reçu\n🔑 Clé publique envoyée")
def finished(self):
self.label.config(text="🔐 Clé reçue\n✅ Message Finished envoyé")
It = InterfaceServeur()
It.mainloop()