INNER CODE UNIT · Python

join

tx00100xt/SeriousSamClassic · SamTFE/GameAgent/server.py:13

  def join(self):
    self.challenge = random.randint(0x00000000, 0x7FFFFFFF)
    self.port = self.addr[1] - 1
    sendto("\1" + struct.pack("i", self.challenge), addr)

  def challengeresponse(self, data):
    params = re.findall(";(\w+);([^;]*)", data)
    valid = False
    for param in params:
      key = param[0]
      val = param[1]
      if(key == "challenge"):
        if(val == str(self.challenge)):
          valid = True
        continue
      if(key == "product"):
        self.product = val
        continue

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…