torpyorg / torpy

Pure python Tor client implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

constructing a client socket on a client machine

davejakenic opened this issue · comments

I kindly ask for help in replacing the following lines suitably, such that the server will see an incorrect client's IP address. The following creates a client_socket of type socket (aka, can listen, recv, and send).

client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(ip_address_string_of_server,port_integer_of_server)

followings don't work:

attempt 1:

tor = TorClient()
circuit = tor.create_circuit(3)
client_socket = circuit.create_socket(ip_address_string_of_server,port_integer_of_server)

attempt 2:

tor = TorClient()
circuit = tor.create_circuit(3)
client_socket = circuit.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect(ip_address_string_of_server,port_integer_of_server)

I wish there was a documentation