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.
42 lines
1.3 KiB
42 lines
1.3 KiB
# -*- coding: utf-8 -*-
|
|
|
|
import tkinter as tk
|
|
from Interface import Interface
|
|
import os
|
|
|
|
|
|
class InterfaceServeur(tk.Tk):
|
|
|
|
def __init__(self):
|
|
Interface.__init__(self, "serveur")
|
|
self.n = 870567544966633301
|
|
self.e = 42205
|
|
self.d = 769020235650503533
|
|
|
|
self.title("Serveur sécurisé")
|
|
self.geometry("600x500")
|
|
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()
|
|
|
|
|