From e369a0a568190142a0bc75f1d792c01ee11afbc6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Jun 2020 14:21:06 +0200 Subject: [PATCH 1/4] Add installation section --- README.md | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 016564f..aa5baff 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,24 @@ -# Description +# sshprank + +## Description A fast SSH mass-scanner, login cracker and banner grabber tool using the python-masscan and shodan module. -# Usage +## Installation + +Clone the repository, make sure that you have a Python installation, change +into the `sshprank` directory and install `sshprank`. +```bash +$ git clone git@github.com:noptrix/sshprank.git +$ cd sshprank +$ python3 setup.py install --user ``` + +## Usage + +```bash [ hacker@blackarch ~ ]$ sshprank -H __ __ __________/ /_ ____ _________ _____ / /__ @@ -97,22 +110,23 @@ examples $ sshprank -b hosts.txt > sshds2.txt ``` -# Author +## Author -noptrix +[noptrix](https://github.com/noptrix) -# Notes +## Notes - quick'n'dirty code - sshprank is already packaged and available for [BlackArch Linux](https://www.blackarch.org/) - My master-branches are always stable; dev-branches are created for current work. - All of my public stuff you find are officially announced and published via [nullsecurity.net](https://www.nullsecurity.net). -# License +## License Check docs/LICENSE. -# Disclaimer +## Disclaimer + We hereby emphasize, that the hacking related stuff found on [nullsecurity.net](http://nullsecurity.net/) are only for education purposes. We are not responsible for any damages. You are responsible for your own From 0419f4060068719e6b2bf0d35e7219e1e51888c7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Jun 2020 14:21:29 +0200 Subject: [PATCH 2/4] Add setup.py file --- setup.py | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c378428 --- /dev/null +++ b/setup.py @@ -0,0 +1,42 @@ +"""Set up sshprank.""" +import os + +from setuptools import find_packages, setup + +here = os.path.abspath(os.path.dirname(__file__)) + +with open(os.path.join(here, "README.md"), encoding="utf-8") as readme: + long_description = readme.read() + + +setup( + name="sshprank", + version="1.2.3", + description="SSH mass-scanner, login cracker and banner grabber tool", + long_description=long_description, + long_description_content_type='text/markdown', + url="https://github.com/noptrix/sshprank", + author="noptrix", + author_email="noptrix@nullsecurity.net", + maintainer="Fabian Affolter", + maintainer_email="fabian@affolter-engineering.ch", + license="MIT", + install_requires=["paramiko", "shodan", "shodan", "python-masscan", "click"], + packages=find_packages(), + zip_safe=True, + include_package_data=True, + entry_points={"console_scripts": [" sshprank=sshprank:main"]}, + keywords="ssh scanner login cracker", + classifiers=[ + "Development Status :: 3 - Alpha", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Utilities", + ], +) From fe499f5ea31c21b1f015b13fc3bcde8c764367c4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Jun 2020 14:24:02 +0200 Subject: [PATCH 3/4] Move argument --- sshprank.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sshprank.py b/sshprank.py index 241de55..a78b389 100755 --- a/sshprank.py +++ b/sshprank.py @@ -345,7 +345,7 @@ def portscan(): log('no sshds found or network unreachable', 'error') except Exception as err: log('\n') - log(f'unknown masscan error occured: str({err})', 'error') + log(f'unknown masscan error occurred: str({err})', 'error') return m @@ -633,7 +633,11 @@ def is_root(): return False -def main(cmdline): +def main(args=None): + + if args is None: + cmdline = sys.argv[1:] + sys.stderr.write(BANNER + '\n\n') check_argc(cmdline) parse_cmdline(cmdline) @@ -697,5 +701,5 @@ def main(cmdline): if not sys.warnoptions: warnings.simplefilter('ignore') - main(sys.argv[1:]) + main() From 99e16e99633c46188e93eb9bf596638051db9ab4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 1 Jul 2020 13:23:46 +0200 Subject: [PATCH 4/4] Update requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c378428..fba64ea 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ maintainer="Fabian Affolter", maintainer_email="fabian@affolter-engineering.ch", license="MIT", - install_requires=["paramiko", "shodan", "shodan", "python-masscan", "click"], + install_requires=["paramiko", "shodan", "python-masscan"], packages=find_packages(), zip_safe=True, include_package_data=True,