python - Use sockets to connect and download webpage of hidden service -
socks.setdefaultproxy(socks.proxy_type_socks4, "127.0.0.1", 9150, true) socket = socks.socksocket() socket.connect(('onionlink.onion', 80)) message = 'get / http/1.0\r\n\r\n' socket.sendall(str.encode(message)) reply = socket.recv(4069) print (reply)
this code works response empty... terminal prints this:
b''
is there wrong? how can print source of hidden service?
solved. needed add http://
message = 'get / http/1.0\r\n\r\n'
so is: message = 'get http://onionlink.onion http/1.0\r\n\r\n'
Comments
Post a Comment