1 changed files with 29 additions and 7 deletions
@ -1,17 +1,39 @@ |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
import tkinter as tk |
|||
from Interface import Interface |
|||
import os |
|||
|
|||
|
|||
class InterfaceServeur(Interface): |
|||
class InterfaceServeur(tk.Tk): |
|||
|
|||
def __init__(self): |
|||
Interface.__init__(self, "serveur") |
|||
self.n = 870567544966633301 |
|||
self.e = 42205 |
|||
self.d = 769020235650503533 |
|||
# à compléter |
|||
|
|||
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() |
|||
|
|||
|
|||
Loading…
Reference in new issue