import hashlib import lib.serpent from lib.serpent import Serpent from lib.serpent import serpent_cbc_encrypt from lib.serpent import serpent_cbc_decrypt from commands import BROADCAST from commands import DIRECT from commands import IGNORE from lib.message import Message import base64 import binascii import time import struct import sys import hmac import random import os import pprint import logging pp = pprint.PrettyPrinter(indent=4) PACKET_SIZE = 496 MAX_SPEAKER_SIZE = 32 TS_ACCEPTABLE_SKEW = 60 * 15 BLACK_PACKET_FORMAT = "<448s48s" RED_PACKET_FORMAT = "<16sBBxB428s" RED_PACKET_LENGTH_WITH_PADDING = 448 MESSAGE_PACKET_FORMAT = "