mirror of
https://github.com/laramies/theHarvester.git
synced 2024-09-22 00:06:30 +08:00
Slight tweak to port scanner
This commit is contained in:
parent
d3981c9635
commit
63e8a47ba1
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue