Untitled
unknown
plain_text
19 days ago
2.2 kB
3
Indexable
import socket def decrypt_message(ciphertext, shift=3): plaintext = "" for char in ciphertext: if char.isalpha(): shifted = ord(char) - shift if char.islower(): if shifted < ord('a'): shifted += 26 else: if shifted < ord('A'): shifted += 26 plaintext += chr(shifted) else: plaintext += char return plaintext def start_server(): server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) host = "127.0.0.1" port = 12345
Editor is loading...
Leave a Comment