This is python coding for Network commands
import tkinter as windowToolKitInterface
import os
def routeCommand():
result= os.system("route")
def netStatCommand():
result= os.system("netstat")
print(result)
def nbtStatCommand():
result = os.system("nbtstat ")
print(result)
def tracertCommand():
result = os.system("tracert ")
print(result)
def pathPingCommand():
result = os.system("pathping ")
print(result)
def ipconfigCommand():
result = os.system("ipconfig")
print(result)
myWindow = windowToolKitInterface.Tk()
myWindow.title("Networking program")
myWindow.configure(background='green')
myWindow.geometry("300x170")
myWindowFrame = windowToolKitInterface.Frame(myWindow)
myWindowFrame.pack()
routeButton = windowToolKitInterface.Button(myWindowFrame, text="route", fg="black",command=routeCommand)
netStatButton= windowToolKitInterface.Button(myWindowFrame, text="Netstat", fg = "black", command=netStatCommand)
nbtStatButton= windowToolKitInterface.Button(myWindowFrame, text="Nbtstat", fg = "black", command=nbtStatCommand)
tracertButton = windowToolKitInterface.Button(myWindowFrame, text="tracert", fg="black",command=tracertCommand)
pathpinButton = windowToolKitInterface.Button(myWindowFrame, text="pathping", fg="black",command=pathPingCommand)
ipconfigButton = windowToolKitInterface.Button(myWindowFrame, text="ipconfig", fg="black",command=ipconfigCommand)
routeButton.pack(), \
netStatButton.pack()
nbtStatButton.pack()
nbtStatButton.pack()
tracertButton.pack()
pathpinButton.pack()
ipconfigButton.pack()
myWindow.mainloop()
import tkinter as windowToolKitInterface
import os
def pingAddress():
myEntryString = str(myEntry.get())
result= os.system("ping " + myEntryString)
def routeCommand():
result = os.system("route")
def tracertCommand():
result = os.system("tracert ")
print(result)
def pathPingCommand():
result = os.system("pathping ")
print(result)
def ipconfigCommand():
result = os.system("ipconfig")
print(result)
if("result==0"):
print("success")
else:
print("failure")
myWindow = windowToolKitInterface.Tk()
myWindow.title("Network Programming")
myWindow.configure(background='magenta')
myWindow.geometry("300x200")
myWindowFrame = windowToolKitInterface.Frame(myWindow)
myLabel=windowToolKitInterface.Label(myWindow, text="Enter Address")
myEntry = windowToolKitInterface.Entry(myWindowFrame)
myPingButton = windowToolKitInterface.Button( myWindowFrame, text="Ping An Address", fg="black", command=pingAddress)
routeButton = windowToolKitInterface.Button(myWindowFrame, text="route", fg="black",command=routeCommand)
tracertButton = windowToolKitInterface.Button(myWindowFrame, text="tracert", fg="black",command=tracertCommand)
pathpinButton = windowToolKitInterface.Button(myWindowFrame, text="pathping", fg="black",command=pathPingCommand)
ipconfigButton = windowToolKitInterface.Button(myWindowFrame, text="ipconfig", fg="black",command=ipconfigCommand)
myLabel.pack()
myEntry.pack()
myPingButton.pack()
routeButton.pack()
tracertButton.pack()
pathpinButton.pack()
ipconfigButton.pack()
myWindowFrame.pack()
myWindow.mainloop()
blogs
Screen shot for five network command using pytharm