Browse Source

premier commit

master
Elina 3 weeks ago
parent
commit
b71423a385
  1. 36
      InterfaceServeur.py

36
InterfaceServeur.py

@ -1,17 +1,39 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import tkinter as tk import tkinter as tk
from Interface import Interface import os
class InterfaceServeur(Interface): class InterfaceServeur(tk.Tk):
def __init__(self): def __init__(self):
Interface.__init__(self, "serveur")
self.n = 870567544966633301 tk.Tk.__init__(self)
self.e = 42205
self.d = 769020235650503533 self.title("Serveur sécurisé")
# à compléter 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 = InterfaceServeur()
It.mainloop() It.mainloop()

Loading…
Cancel
Save