Skip to content

Commit

Permalink
100 threads default
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Mar 25, 2018
1 parent 9d1138f commit fa2ebf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -23,7 +23,7 @@
findssh
=======
Platform-independent Python >= 3.5 script that finds SSH servers (or other services with open ports) on an IPv4 subnet, WITHOUT NMAP.
Launches numerous threads to scan IPv4 subnet in less than 5 seconds (with 100 threads, in less than 1 second), using Python standard library
Scans entire IPv4 subnet in less than 1 second using 100 threads via Python standard library
`concurrent.futures <https://docs.python.org/3/library/concurrent.futures.html>`_.

:author: Michael Hirsch, Ph.D.
Expand Down
3 changes: 2 additions & 1 deletion findssh.py
Expand Up @@ -115,9 +115,10 @@ def scanhosts(net:ip_network, port:int, service:str, timeout:float) -> list:

hosts = list(net.hosts())

with concurrent.futures.ThreadPoolExecutor() as executor:
with concurrent.futures.ThreadPoolExecutor(max_workers = 100) as executor:
servers = [h for h,s in zip(hosts, executor.map(isportopen, hosts, repeat(port), repeat(service))) if s]


return servers


Expand Down

0 comments on commit fa2ebf7

Please sign in to comment.