I 줄기를 이용하여 토르 세션에서 새로운 IP를 얻으려고하고 크게 this answer에 의해 '영감'는 다음과 같은 기능을 통해 파이썬 새로운 IP를 얻을 수 없습니다줄기 - 토르
def get_new_IP():
socket.socket = old_socket
with Controller.from_port(port=SOCKS_PORT) as controller:
controller.authenticate()
controller.signal(Signal.NEWNYM)
socket.socket = socks.socksocket
그러나 오류 'IncorrectSocketType : 제어 소켓을 사용할 수 없습니다'암호가 지정되지 않았거나 초기 연결이 설정되어 있기 때문에 약간의 손실이있는 controller.authenticate()
에 의해 발생합니다.
tor 프로세스를 시작할 때 'CookieAuthentication': str(1)
, as suggested here을 구성 설정에 추가하려고 시도했지만 작동하지 않습니다.
어떻게 초기 연결이 작동하며 다시 연결하려고하면 인증을받을 수없는 이유는 무엇입니까?