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

Method _replace_self

fakedns.py:482–493  ·  view source on GitHub ↗
(self, ips)

Source from the content-addressed store, hash-verified

480
481 # replaces the self keyword, but could be expanded to any keyword replacement
482 def _replace_self(self, ips):
483 # Deal with the user putting "self" in a rule (helpful if you don't know your IP)
484 for ip in ips:
485 if ip.lower() == 'self':
486 try:
487 self_ip = socket.gethostbyname(socket.gethostname())
488 except socket.error:
489 print(">> Could not get your IP address from your " \
490 "DNS Server.")
491 self_ip = '127.0.0.1'
492 ips[ips.index(ip)] = self_ip
493 return ips
494
495
496 def __init__(self, file_):

Callers 1

__init__Method · 0.95

Calls 1

printFunction · 0.85

Tested by

no test coverage detected