Skip to content

Commit

Permalink
Update block-domain.py
Browse files Browse the repository at this point in the history
  • Loading branch information
OmShinde1513 committed Oct 26, 2023
1 parent 9d555f6 commit 3e9d4b1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions block-domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def block_domains(domains):

except Exception as e:
print(f"An error occurred: {e}")

def getdomain():
domain = inputfied.get()
domain = domain.strip()
Expand All @@ -42,4 +43,11 @@ def getdomain():
btk = CTkButton(master=app,text="submit",command=getdomain)
btk.pack(padx = 10,pady = 10)
scrollable.pack(padx = 10,pady = 10)
with open('/etc/hosts','r') as file:
data = [line for line in file if 'www.' in line]
print(data)

for i in data:
s=i.split()
label=CTkLabel(master=scrollable,text=s[1]).pack()
app.mainloop()

0 comments on commit 3e9d4b1

Please sign in to comment.