If you want to use sqlmap like this:
./sqlmap --proxy=http://127.0.0.1:8118 --check-tor -u "site.com"
where as behind http://127.0.0.1:8118 is an HTTP tor proxy (which actually works. I can verify that using curl.) you'll get a 400 Bad Request from check.torprojet.org on Port 443.
Easy setup of docker tor proxy:
docker run -d -p 8118:8118 -i sherzberg/tor-http-proxy
./sqlmap --proxy=http://127.0.0.1:8118 --check-tor -u "site.com"
Please visit check.torproject.org from your browser instance where proxy is set to http://127.0.0.1:8118. This doesn't appear to be a sqlmap's problem
Why are you not using --tor-port, --tor-type????
(e.g. --tor-port=8118 --tor-type=http)
I just used this example because in the end my proxy is on a different host which only seems to be supported when using --proxy.
As I said, curl works perfectly fine using a command like:
curl --proxy http://127.0.0.1:8118 "https://check.torproject.org/" | grep Congratulations
Different proxy while you are setting --proxy to 127.0.0.1?
Can I access that proxy if it is different host?
Different proxy while you are setting --proxy to 127.0.0.1?
what?
Can I access that proxy if it is different host?
No, you cannot. But with the docker example from the initial post you can easily reproduce it:
docker run --name tor_sqlmap -d -i sherzberg/tor-http-proxy
# optain containers ip address
docker inspect tor_sqlmap
# do the sqlmap stuff
./sqlmap.py --proxy=http://<IP_OF_DOCKER_CONTAINER>:8118 --check-tor -u "site.com"
You are using --proxy http://127.0.0.1:8118 while you say that the end my proxy is on a different host. This doesn't make any sense
Yeah, in the setup I'm trying to achieve .. there I'll be using a different host as the tor proxy. I started developing my setup using this very different host and it did not work - so I thought it's more convenient to debug this issue when having the proxy locally but still use --proxy instead of --tor. I don't see why this should be an issue
..
Does ./sqlmap.py --proxy http://127.0.0.1:8118 -u "http://testphp.vulnweb.com/artists.php?artist=1" --banner work?
Yes, it does work. Maybe it's just the --check-tor which is not working with --proxy ?
Could you reproduce the issue? (with the docker container?)
Reproduced and fixed. Thx.
Thanks :beers: