MCPcopy Create free account
hub / github.com/Cryptogenic/PS5-IPV6-Kernel-Exploit / __init__

Method __init__

fakedns.py:282–292  ·  view source on GitHub ↗
(self, query, txt_record)

Source from the content-addressed store, hash-verified

280# Finished
281class TXT(DNSResponse):
282 def __init__(self, query, txt_record):
283 super(TXT, self).__init__(query)
284 self.type = b"\x00\x10"
285 self.data = txt_record.encode()
286 self.length = chr(len(txt_record) + 1).encode()
287 # Must be two bytes. This is the better, more python-3 way to calculate length. Swap to this later.
288 if len(self.length) < 2:
289 self.length = b"\x00" + self.length
290 # Then, we have to add the TXT record length field! We utilize the
291 # length field for this since it is already in the right spot
292 self.length += chr(len(txt_record)).encode()
293
294
295class MX(DNSResponse):

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected