Skip to content

Commit

Permalink
Version 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ajb3296 authored Jun 22, 2020
1 parent e97ccc5 commit c7111c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Adaway_for_Windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def downloadhost():
data = host.read()
host.close()

# 필요없는 파일 제거
# Remove unnecessary file
os.remove("hosts/%s" %i)

file.write("%s\n\n" %data)
Expand Down Expand Up @@ -88,15 +88,15 @@ async def downloadhost():
QBBBBBBBBQBBBQBBBD
iBBBBBBBBQBQBBB:
""" %version)
'''

# Chack admin permission
if ctypes.windll.shell32.IsUserAnAdmin():
pass
else:
print("This program requires administrator privileges.\nPress Enter to run the program again with administrator privileges.")
os.system("pause")
exit()
'''

while True:
# Select language if setting file does not exist
if not os.path.exists("setting.xml"):
Expand Down Expand Up @@ -139,7 +139,6 @@ async def downloadhost():

else:


# Reading language pack
file = open("language/%s.xml" %language, "r", encoding = 'UTF-8')
languagecode = file.read()
Expand Down Expand Up @@ -230,7 +229,7 @@ async def downloadhost():
break
urls.append(l)
f.close()

# Make hosts folder
try:
shutil.rmtree('hosts')
Expand All @@ -242,7 +241,7 @@ async def downloadhost():
try:
file = open("hosts/hosts", "w", encoding = 'UTF-8')
except:
exit()
print(temp_host_error)
file.write("# Adaway for Windows")
file.close()

Expand Down Expand Up @@ -298,6 +297,7 @@ async def downloadhost():

# Check for updates
if choose == "1":
os.system("cls")
break

# Install hosts file
Expand Down

0 comments on commit c7111c4

Please sign in to comment.