|
@@ -99,6 +99,18 @@ def sort_list():
|
|
|
print("-",[line])
|
|
|
if line:
|
|
|
b_scan.insert("end",line+"\n")
|
|
|
+ count_list()
|
|
|
+
|
|
|
+def count_list():
|
|
|
+ lines = b_scan.get("0.0","end")
|
|
|
+ lines = lines.split("\n")
|
|
|
+ lines = list(set(lines))
|
|
|
+ lines.sort()
|
|
|
+ i=0
|
|
|
+ for line in lines:
|
|
|
+ if line.strip():
|
|
|
+ i+=1
|
|
|
+ b_count["text"] = str(i)
|
|
|
|
|
|
def clean_ip(ip):
|
|
|
if "/" in ip:
|
|
@@ -142,6 +154,7 @@ def cmd(IP):
|
|
|
b_scan.insert("end",str(IP).ljust(50," ")+str(" OK <-- me ")+"\n")
|
|
|
else:
|
|
|
b_scan.insert("end",str(IP).ljust(50," ")+str(" OK")+"\n")
|
|
|
+ count_list()
|
|
|
|
|
|
|
|
|
ping_lock=0
|
|
@@ -180,12 +193,15 @@ btn_ping = Tkinter.Button(line_frame,text="start Ping",width=7,command=ping,font
|
|
|
btn_ping.pack(side="left",expand=0,fill="y")
|
|
|
|
|
|
#-------------------------------------------- line
|
|
|
-b_scan2 = Tkinter.Button(line_frame,text="sort",width=5,command=sort_list,font=font2)
|
|
|
+b_scan2 = Tkinter.Button(line_frame,text="sort",width=2,command=sort_list,font=font2)
|
|
|
b_scan2.pack(side="left",expand=0,fill="y")
|
|
|
#-------------------------------------------- line
|
|
|
-b_scan2 = Tkinter.Button(line_frame,text="clear",width=5,command=clear_list,font=font2)
|
|
|
+b_scan2 = Tkinter.Button(line_frame,text="clear",width=2,command=clear_list,font=font2)
|
|
|
b_scan2.pack(side="left",expand=0,fill="y")
|
|
|
#-------------------------------------------- line
|
|
|
+b_count = Tkinter.Button(line_frame,text="0",width=1,font=font2)
|
|
|
+b_count.pack(side="left",expand=0,fill="y")
|
|
|
+#-------------------------------------------- line
|
|
|
|
|
|
eframe10 = Tkinter.Frame(eframe1)
|
|
|
eframe10.pack(side="top",expand=1,fill="both")
|