def restore_system_resolver():
 global _resolver
 _resolver = None
 socket.getaddrinfo = _original_getaddrinfo
 socket.getnameinfo = _original_getnameinfo
 socket.getfqdn = _original_getfqdn
 socket.gethostbyname = _original_gethostbyname
 socket.gethostbyname_ex = _original_gethostbyname_ex
 socket.gethostbyaddr = _original_gethostbyaddr

def restore_system_resolver ( ) : global _resolver _resolver = None socket . getaddrinfo = _original_getaddrinfo socket . getnameinfo = _original_getnameinfo socket . getfqdn = _original_getfqdn socket . gethostbyname = _original_gethostbyname socket . gethostbyname_ex = _original_gethostbyname_ex socket . gethostbyaddr = _original_gethostbyaddr
undo the effects of override_system_resolver() .