0

I am trying to get ip address from darknet onion url.

import subprocess import ipaddress for ip in ipaddress.IPv4Network('5.0.0.0/24'): subprocess.call(["tor-resolve", "-x", ip])

I am not getting correct thing, this is error also. who is there for helping me?

  • This will be helpful also? import requests session = requests.session() session.proxies = {'http': 'socks5h://127.0.0.1:9150 ', 'https': 'socks5h://127.0.0.1:9150 '} response = session.get("3g2upl4pq6kufc4m.onion ") – Jincowboy Mar 13 at 7:31
  • Can you please explain what you are trying to do because it doesn't seen to make any sense. You should never get an IP address from an onion service unless the person who set it up did a REALLY bad job. Onion services are anonymous just like the users that use them. – JSEvans Mar 13 at 13:35
  • Thanks @JSEvans, but can't "tor-resolve -x onion-url" will not working for me? – Jincowboy Mar 13 at 14:04
  • how can get contents of onion url using python? – Jincowboy Mar 13 at 14:09
  • Here's the man page: linux.die.net/man/1/tor-resolve. This tool is like nslookup but instead of using a local DNS server, it is doing the lookup over tor. If you do nslookup google.com, you will see the information that your DNS provider has and it will resolve the IP address. tor-resolve is similar but it works via tor. So if you do tor-resolve google.com, you should get the IP address but your DNS provider won't know that you're doing it because it is via Tor. If you run in against an onion service, it should not work because there is nothing to resolve. – JSEvans Mar 13 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.