2 ### greet HOST PORT CHALLENGE
3 ### Sends a TrIPE greeting packet to the server listening on HOST and PORT.
4 ### The payload is the base64-encoded CHALLENGE.
10 return (s + '='*((-len(s))%4)).decode('base64')
12 ai, chal = (lambda _, h, p, c:
13 (S.getaddrinfo(h, p, S.AF_UNSPEC, S.SOCK_DGRAM, S.IPPROTO_UDP,
14 S.AI_NUMERICHOST | S.AI_NUMERICSERV)[0],
16 sk = S.socket(ai[0], S.SOCK_DGRAM)