예제 #1
0
 def generate_simple_response(self, request):
     # echo the request, except for bytes 4-7, where we put our timestamp
     return (buffer(request, 0, 4) +
             (buffer(_s_ulong.pack(ms_time(self.epoch_time()))) +
              buffer(request, 8)))
예제 #2
0
파일: handshake.py 프로젝트: DxCx/twimp
 def generate_simple_response(self, request):
     # echo the request, except for bytes 4-7, where we put our timestamp
     return (buffer(request, 0, 4) +
             (buffer(_s_ulong.pack(ms_time(self.epoch_time()))) +
              buffer(request, 8)))
예제 #3
0
 def generate_base_request(self):
     return (
         _s_ts_ver.pack(ms_time(self.epoch_time()), *self.compat_version) +
         generate_random_bytes(self.packet_bytes - 8))
예제 #4
0
파일: handshake.py 프로젝트: DxCx/twimp
 def generate_base_request(self):
     return (_s_ts_ver.pack(ms_time(self.epoch_time()),
                            *self.compat_version) +
             generate_random_bytes(self.packet_bytes - 8))