import hashlib import serpent from serpent import Serpent from serpent import serpent_cbc_encrypt from serpent import serpent_cbc_decrypt from commands import BROADCAST from commands import DIRECT from commands import IGNORE from 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 = "