diff --git a/tests/main.py b/tests/main.py index def5544..6e9ffe6 100644 --- a/tests/main.py +++ b/tests/main.py @@ -1,29 +1,35 @@ -import netutils +import netutil -test = PortCheck("google.com", 443) -test2 = PortCheck("google.com", 25) +print(f"Version: {netutil.__version__}") -facebook = PortCheck("facebook.com", 443) -website = PortCheck("claytonerrington.com", 443) +google = netutil.PortCheck("google.com", 443) +google2 = netutil.PortCheck("google.com", 123) + +facebook = netutil.PortCheck("facebook.com", 443) +website = netutil.PortCheck("claytonerrington.com", 443) + +local = netutil.PortCheck("127.0.0.1", 85) # Getting basic Information -print(f"Your hostname is: {host_name}") -print(f"Your local IP is: {host_ip}") +print(f"Your hostname is: {netutil.host_name}") +print(f"Your local IP is: {netutil.host_ip}") # Different testing -print(f"Testing {test.domain}:{test.port}... ") -if(test.isOpen()): - print(f" {test.domain}:{test.port} is Open!") + +print(f"Testing {google.domain}... ") +if(google.isOpen()): + print(f" {google.domain}:{google.port} is Open!") else: - print(f" {test.domain}:{test.port} is Closed!") + print(f" {google.domain}:{google.port} is Closed!") -print(f"Testing {test2.domain}:{test2.port}... ") -if(test2.isOpen()): - print(f" {test2.domain}:{test2.port} is Open!") + +print(f"Testing {google2.domain}:{google2.port}... ") +if(google2.isOpen()): + print(f" {google2.domain}:{google2.port} is Open!") else: - print(f" {test2.domain}:{test2.port} is Closed!") + print(f" {google2.domain}:{google2.port} is Closed!") print(f"Testing {facebook.domain}:{facebook.port}... {facebook.isOpen()}") print(f"Testing {website.domain}:{website.port}... {website.isOpen()}") - +print(local.isOpen()) \ No newline at end of file