-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b81b627
commit a77ca0b
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |
This file contains 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
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() |