-
Notifications
You must be signed in to change notification settings - Fork 0
/
Internet fixer.py
40 lines (39 loc) · 1.52 KB
/
Internet fixer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
import time
import requests
print("""
_________________________________________________
| |
| Fix INTERNET V.1.0 |
| |
| - Press "s" to start |
| - Press "q" to exit |
| |
_________________________________________________
""")
st = input("Enter operation: ").lower()
if st == "q":
exit(0)
elif st == "s":
try:
chc = requests.get("https://www.google.com", timeout=5)
print("You are already connected")
except requests.ConnectionError:
print("Starting internet fixer...")
time.sleep(0.5)
os.system("netsh int ip reset")
os.system("netsh winsock reset")
os.system("netsh winhttp reset proxy")
os.system("ipconfig/flushdns")
os.system("ipconfig/release")
os.system("ipconfig/renew")
try:
chc = requests.get("https://www.google.com", timeout=5)
print("You are already connected")
except requests.ConnectionError:
print("\nPlease reset your network.\nPlease wait, opening network settings.When it open please go to Network Reset and reset your network")
print("If you already did this step you should call your isp.")
time.sleep(3)
os.system("start ms-settings:network-status")
else:
print("Invalid input!")