class FullscreenWindow: def __init__(self): self.tk = Tk() self.tk.configure(background='black') self.topFrame = Frame(self.tk, background='black') self.bottomFrame = Frame(self.tk, background='black') self.topFrame.pack(side=TOP, fill=BOTH, expand=YES) self.bottomFrame.pack(side=BOTTOM, fill=BOTH, expand=YES) self.state = False self.tk.bind("<Return>", self.toggle_fullscreen) self.tk.bind("<Escape>", self.end_fullscreen) # weather self.weather = Weather(self.topFrame) self.weather.place(x=0, y=5, anchor=NW, width=700, height=400) # Date self.date = Date(self.topFrame) self.date.place(x=1015, y=10, anchor=NE, width=350, height=90) # Day self.day = Day(self.topFrame) self.day.place(x=860, y=10, anchor=NE, width=300, height=90) # clock self.clock = Clock(self.topFrame) self.clock.place(x=940, y=60, anchor=NE, width=250, height=90) #Seconds self.sec = Sec(self.topFrame) self.sec.place(x=1015, y=60, anchor=NE, width=80, height=85) # news self.news = News(self.bottomFrame) self.news.pack(side=LEFT, anchor=S, padx=0, pady=10) # Facial rec #self.FacialRecognition = News(self.bottomFrame) #self.FacialRecognition.pack(side=LEFT, anchor=N, padx=100, pady=60) # calender self.calender = Calendar(self.topFrame) self.calender.place(x=1015, y=150, width=250, anchor=NE) # calender Time self.calenderTime = CalendarTime(self.topFrame) self.calenderTime.place(x=850, y=172, width=250, anchor=NE) #Traffic self.traffic = Traffic(self.topFrame) #Launch self.launch = Launch(self.topFrame) #crypto name self.crypto = Crypto(self.topFrame) self.crypto.pack(side=TOP, anchor=NE) #Crypto Time self.cryptoPrice = CryptoPrice(self.topFrame) self.cryptoPrice.pack(side=TOP, anchor=NE) #camera s = FacialRec() def toggle_fullscreen(self, event=None): self.state = not self.state # Just toggling the boolean self.tk.attributes("-fullscreen", self.state) return "break" def end_fullscreen(self, event=None): self.state = False self.tk.attributes("-fullscreen", False) return "break"
def sendLogin(self): loginHash = Crypto.getLoginHash(self.password, self.randomKey) self.send( "<msg t='sys'><body action='login' r='0'><login z='w1'>" "<nick><![CDATA[" + self.username + "]]></nick>" "<pword><![CDATA[" + loginHash + "]]></pword>" "</login></body></msg>" );
def sendLogin(self): passwordHash = Crypto.encryptPassword(self.loginKey + self.randomKey) + self.loginKey self.send( "<msg t='sys'><body action='login' r='0'><login z='w1'>" "<nick><![CDATA[" + self.rawPlayerString + "]]></nick>" "<pword><![CDATA[" + passwordHash + "#" + self.confirmationHash + "]]></pword>" "</login></body></msg>" )
import socket from Crypto import Crypto from sys import exit # global message # global key crypto = Crypto() print("Socket programming with Encryption and decryption") # def check_for_digit(text): # # for letter in text: # # if letter.isdigit(): # # # print("Cannot contain digits") # # return True # # else: # # return False # return any(char.isdigit() for char in text) def get_input_message(*choice): global message global key message = '' print( "The following cryptography functions are available to choose from. Please select a choice" ) print("1. Caesar Cipher \n \ 2. Decimation Cipher \n \
def init(cls, password): cls.TRANSACTIONID = 0 cls._crypt = Crypto(str(password).strip())