Hack Forums
Use Python to stay Anonymous [Source Code] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4)
+----- Forum: Hacking Tutorials (https://hackforums.net/forumdisplay.php?fid=47)
+----- Thread: Use Python to stay Anonymous [Source Code] (/showthread.php?tid=6250057)



Use Python to stay Anonymous [Source Code] - Aeon - Aug 24, 2023

Hey everyone Samy here again :)

In this quick tutorial I will show you how you can use Python to Hide your IP when connecting to websites, using the requests library.

First thing you want to do is import requests and make a variable for url, username, password (user:pass variables used for proxies that use authentication)
Then make a result variable equal to requests.get(url, proxies) this requests the url using the proxies variables above.
Then from there you can do anything with it such as print the result URL's text.

Python 3.11 Code here:
Code
import requests
url = 'https://youtube.com/'
username = 'proxyUsername'
password = 'proxyPassword'
proxy = f"http://{username}:{password}@proxyAddress:ProxyPort"
result = requests.get(url, proxies = {
    'http': proxy,
    'https': proxy
})
print(result.url)
MAKE SURE TO REPLACE "proxyUsername" & "proxyPassword" to your proxies info and "proxyAddress" "ProxyPort" to your proxies IP:PORT

Please leave a <3 if this helped you and leave a reply or DM on how I can make this tutorial / guide better in any way!


RE: Use Python to stay Anonymous [Source Code] - cover7 - Aug 24, 2023

What's the point of this actually?


RE: Use Python to stay Anonymous [Source Code] - Aeon - Aug 24, 2023

(Aug 24, 2023 08:00 PM)cover7 Wrote:  What's the point of this actually?

It has many uses it depends on how you implement it, this is just starter code to connect to a URL with a proxy.
You can for example use it to connect to twitter/youtube on different IP for bot accounts.


RE: Use Python to stay Anonymous [Source Code] - cover7 - Aug 24, 2023

Ah I see, you were showing a snippet of code for proxy usage to build upon.


RE: Use Python to stay Anonymous [Source Code] - Aeon - Aug 24, 2023

(Aug 24, 2023 08:08 PM)cover7 Wrote:  Ah I see, you were showing a snippet of code for proxy usage to build upon.

Yes indeed, also I am open for suggestions to make this starter tutorial better. I am going to build upon this post some day to make a better one with more code and ideas people will be able to build upon.


RE: Use Python to stay Anonymous [Source Code] - babaracus - Dec 26, 2023

yes what can this be used for it seems pretty pointless