findssh

Asyncio concurrent Python finds SSH servers (or other services with open ports) on an IPv4 subnet, WITHOUT NMAP

https://github.com/scivision/findssh

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.4%) to scientific vocabulary

Keywords

asyncio nmap port-scanner
Last synced: 6 months ago · JSON representation ·

Repository

Asyncio concurrent Python finds SSH servers (or other services with open ports) on an IPv4 subnet, WITHOUT NMAP

Basic Info
  • Host: GitHub
  • Owner: scivision
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 161 KB
Statistics
  • Stars: 38
  • Watchers: 6
  • Forks: 2
  • Open Issues: 0
  • Releases: 15
Topics
asyncio nmap port-scanner
Created over 10 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

Find SSH servers (without NMAP)

DOI ci PyPI Download stats

Platform-independently find SSH servers (or other services with open ports) on an IPv4 subnet in pure Python WITHOUT NMAP. Scan entire IPv4 subnet in less than 1 second using Python standard library asyncio coroutines and a single thread.

The default asyncio coroutine uses a single thread and is more than 10x faster than concurrent.futures.ThreadPoolExecutor.

Although speed advantages weren't seen in our testing, findssh works with PyPy as well.

sh pip install findssh

or from this repo:

```sh git clone https://github.com/scivision/findssh

pip install -e findssh ```

Usage

A canonical way to use FindSSH from other Python scripts is asyncio.


from command line:

sh python -m findssh

or use project script e.g. from pipx:

sh findssh

  • -s check the string from the server to attempt to verify the correct service has been found
  • -t timeout per server (seconds) useful for high latency connection
  • -b baseip (check other subnet besides your own)
  • -p network port to scan (default 22)

Benchmark

These tests used 500 ms timeout on WiFi.

Coroutine (single thread, fast, lean, recommended):

```ipython %timeit findssh.main()

522 ms ± 1.26 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) ```

Thread pool (100 thread max, slow, heavy):

```ipython %timeit findssh.threadpool.main()

1.39 s ± 213 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) ```

Trying to open too many threads via ThreadPoolExecutor can cause a system error like

OSError: [Errno 24] Too many open files

Thus in practical terms, using coroutines can be significantly faster than threads while using less system resources.

Owner

  • Login: scivision
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Hirsch
    given-names: Michael
    orcid: https://orcid.org/0000-0002-1637-6526
title: findssh
version: 1.5.0
doi: 10.5281/zenodo.3336467
date-released: 2020-10-01

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 4
  • Total pull requests: 1
  • Average time to close issues: 5 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.25
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sevku (2)
  • dreuter (1)
  • suprabathk (1)
Pull Request Authors
  • scivision (1)
Top Labels
Issue Labels
enhancement (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 210 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 19
  • Total maintainers: 1
pypi.org: findssh

find open servers on IPv4 subnet such as SSH

  • Versions: 19
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 210 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.6%
Average: 22.2%
Downloads: 35.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/publish-python-package.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
pyproject.toml pypi