copied semi-working spoof_handshake.py