I know, using Python, a webpage can be visited. But is it also possible to visit a webpage with a new IP address each time?
-
1What do you mean by new IP address? You have a new IP or the server has a new IP? – Joe Doherty Feb 12 '13 at 16:40
-
Use [tor](https://www.torproject.org/). – Anew Feb 12 '13 at 16:41
-
1There's no `ipspoof` module in the Python stdlib ATM. – Fred Foo Feb 12 '13 at 16:41
-
have a look at this answer http://stackoverflow.com/questions/1180878/spoofing-the-origination-ip-address-of-an-http-request ... is this for load balancer/stress testing? – Offbeatmammal Feb 12 '13 at 16:42
-
@JoeDoherty by new IP I meant **different** IP. – Preetika Sharma Feb 12 '13 at 16:44
-
@Anew Thank you for your recommendation. But if it can be done using Python, it would be better. – Preetika Sharma Feb 12 '13 at 16:45
2 Answers
You cannot change your IP via python.
Try installing TOR and then use Proxychains to pipe your script /requests via the TOR network, though the ip will be kinda random everytime
If your script is called getit.py
and you have TOR/Proxychains setup correctly then you can send anything through the TOR network. Eg.
Chrome:
proxychains google-chrome
getit.py:
proxychains python getit.py
or
proxychains getit.py
Everytime you run the script you will have a different ip. Well to be correct not everytime but proxychains will respect your TOR Config so, everytime is relevant to that.
Also not only everytime you run the script but also everytime the script tries to access a resource. Again related to TOR config.

- 16,223
- 11
- 86
- 117
-
Thank you. I have used Tor. But everything needs to be done manually. Can I make it happen using Python and Tor together? – Preetika Sharma Feb 12 '13 at 16:46
-
1
Do an online search for a listing of "Proxy services" from the internet. You can then loop through them as proxies in Python. There are companies that maintain open proxy networks , and across multiple continents , to help people get past GEO-IP restrictions.
You can also configure different servers you control on the internet to act as remote proxies for your needs.
Don't use TOR for this project, which has legitimate uses and needs... and has bad bandwidth already. There are rarely any legitimate uses for doing stuff like this.
There are also shady publishers of "Open Proxy" lists - basically a daily updated list of wrongly configured apache instances that can reroute requests. Those are often used by people trying to increase ad impressions / pagecounts or fake online voting contests. ( which are the two main things people want to do with open proxies and repeated 'new' visits )

- 15,111
- 10
- 48
- 72