|
|
@ -1,12 +1,13 @@ |
|
|
|
from tkinter import * |
|
|
|
|
|
|
|
def adresse_reseau(): |
|
|
|
ip_address = IP_entree.get() |
|
|
|
mask_mask = Mask_entree.get() |
|
|
|
# Calculate the network address by performing an AND operation between the IP address and subnet mask |
|
|
|
Adresse_reseau = '.'.join(str(int(ip_part) & int(mask_part)) for ip_part, mask_part in zip(ip_address.split('.'), mask_mask.split('.'))) |
|
|
|
# Display the network address |
|
|
|
network_label.config(text='Network Address: ' + Adresse_reseau) |
|
|
|
def adresse_reseau(IP,Mask): |
|
|
|
IP = IP_entree.get() |
|
|
|
Mask = Mask_entree.get() |
|
|
|
Ip = IP.split |
|
|
|
mask = Mask.split |
|
|
|
s = '.' |
|
|
|
Adresse_reseau = s.join(Ip & mask) |
|
|
|
print(Adresse_reseau) |
|
|
|
|
|
|
|
fenetre= Tk() #créé la fenetre principale |
|
|
|
|
|
|
|