Slight tweak to port scanner

This commit is contained in:
L1ghtn1ng 2019-10-26 02:31:41 +01:00
parent d3981c9635
commit 63e8a47ba1

View file

@ -11,7 +11,7 @@ def __init__(self, host, ports):
self.lock = threading.BoundedSemaphore(value=self.threads)
def port_scanner(self, host, ports):
openports = []
openports: list = []
self.lock.acquire()
for port in ports:
try:
@ -26,7 +26,7 @@ def port_scanner(self, host, ports):
self.lock.release()
if(len(self.ports)) == 0:
print("No ports found on host: {0}".format(host))
print(f'No ports found on host: {host}')
return openports