Skip to content

Commit

Permalink
usom control ip
Browse files Browse the repository at this point in the history
  • Loading branch information
ebubekirdgn committed Dec 20, 2021
1 parent b81b627 commit a77ca0b
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
12 changes: 12 additions & 0 deletions 23-Cyber_Securit_Module/log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
google.comDAMAGE --
Date :2021-12-20 22:23:44.581941
google.comDAMAGE --
Date :2021-12-20 22:24:05.374783
www.google.comNOT DAMAGE --
Date :2021-12-20 22:24:15.636642
www.google.comNOT DAMAGE --
Date :2021-12-20 22:24:16.739977
www.google.comNOT DAMAGE --
Date :2021-12-20 22:24:16.894553
www.google.comNOT DAMAGE --
Date :2021-12-20 22:24:17.041242
47 changes: 47 additions & 0 deletions 23-Cyber_Securit_Module/usom_control.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from tkinter import *
import datetime

def check_it():
file = open("usom.txt","r")
content =file.read()
file.close()
ip = entry1.get()
today = datetime.datetime.now()
if str(ip) in content:
file = open ("log.txt","a")
text = str(ip) + "DAMAGE -- \nDate :" + str(today) + "\n"
file.write(text)
file.close()

v.set("IP DAMAGED")

else:
file = open ("log.txt","a")
text = str(ip) + "NOT DAMAGE -- \nDate :" + str(today) + "\n"
file.write(text)
file.close()


v.set("IP NOT DAMAGED")

top = Tk()

top.title("USOM IP CONTROL")

B = Button(top,text="Check It",command=check_it)
B.place(x=50,y=50)
B.pack()

label1=Label(top,text="Enter the ip address to check : ")
label1.pack()

entry1 = Entry(top)
entry1.place(x=50,y=90)
entry1.pack()

v=StringVar()
entry2=Entry(top,textvariable=v)
entry2.place(x=50,y=100)
entry2.pack()

top.mainloop()

0 comments on commit a77ca0b

Please sign in to comment.