Last active
April 19, 2025 16:11
-
-
Save a904guy/4251ff3161ab0116077031608cd83736 to your computer and use it in GitHub Desktop.
Bypass VPN on Computer by Binding to NON VPN Route
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
# On Windows type `route print` to get a list. | |
# On Linux type `ip route` to get a list. | |
# On Mac type `netstat -r -n` to get a list. | |
s.bind(('192.168.0.1', 0)) # Replace with the IP of the route interface you want to use | |
s.connect(('example.com', 80)) | |
s.sendall(b'GET / HTTP/1.1\r\nHost: example.com\r\n\r\n') | |
response = s.recv(4096) | |
print(response.decode()) | |
s.close() | |
# Your VPN was ignored and an unadultered call was made to example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment