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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -