From f4803b006ca99de28e248212ddb4d0bdf951e27b Mon Sep 17 00:00:00 2001 From: JonLuca DeCaro Date: Sat, 29 Dec 2018 13:42:46 +0100 Subject: [PATCH] Tighter requirements, brought back sslyze --- .pytest_cache/v/cache/lastfailed | 4 ++++ README.md | 1 + anubis/__init__.py | 2 +- anubis/cli.py | 3 ++- anubis/commands/target.py | 13 ++++++++++--- requirements.txt | 7 ++++--- setup.py | 8 +++----- 7 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 .pytest_cache/v/cache/lastfailed diff --git a/.pytest_cache/v/cache/lastfailed b/.pytest_cache/v/cache/lastfailed new file mode 100644 index 0000000..c96566c --- /dev/null +++ b/.pytest_cache/v/cache/lastfailed @@ -0,0 +1,4 @@ +{ + "tests/commands/test_target.py::TestScanners::test_netcraft": true, + "tests/commands/test_target.py::TestScanners::test_recursive": true +} \ No newline at end of file diff --git a/README.md b/README.md index 08226a1..eaae469 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ pip3 install . -p --ip outputs the resolved IPs for each subdomain, and a full list of unique ips -a --send-to-anubis-db send results to Anubis-DB -r --recursive recursively search over all subdomains + -s --ssl run an ssl scan and output cipher + chain info -w --overwrite-nmap-scan SCAN overwrite default nmap scan (default -nPn -sV -sC) -v --verbose print debug info and full request output -q --queue-workers NUM override number of queue workers (default: 10, max: 100) diff --git a/anubis/__init__.py b/anubis/__init__.py index 8969d49..61816e5 100644 --- a/anubis/__init__.py +++ b/anubis/__init__.py @@ -1 +1 @@ -__version__ = '0.9.1' +__version__ = '0.9.2' \ No newline at end of file diff --git a/anubis/cli.py b/anubis/cli.py index 10d928d..5c89352 100644 --- a/anubis/cli.py +++ b/anubis/cli.py @@ -1,6 +1,6 @@ """ Usage: - anubis -t TARGET [-o FILENAME] [-noipbarv] [-w SCAN] [-q NUM] + anubis -t TARGET [-o FILENAME] [-abinoprsv] [-w SCAN] [-q NUM] anubis -h anubis --version @@ -13,6 +13,7 @@ -p --ip outputs the resolved IPs for each subdomain, and a full list of unique ips -a --send-to-anubis-db send results to Anubis-DB -r --recursive recursively search over all subdomains + -s --ssl run an ssl scan and output cipher + chain info -w --overwrite-nmap-scan SCAN overwrite default nmap scan (default -nPn -sV -sC) -v --verbose print debug info and full request output -q --queue-workers NUM override number of queue workers (default: 10, max: 100) diff --git a/anubis/commands/target.py b/anubis/commands/target.py index 0f072e9..f81b25d 100644 --- a/anubis/commands/target.py +++ b/anubis/commands/target.py @@ -1,7 +1,8 @@ """The target command.""" +import sys + import re import socket -import sys import threading from urllib.parse import urlsplit @@ -14,6 +15,7 @@ from anubis.scanners.nmap import scan_host from anubis.scanners.recursive import recursive_search from anubis.scanners.shodan import search_shodan +from anubis.scanners.ssl import search_subject_alt_name, ssl_scan from anubis.scanners.virustotal import search_virustotal from anubis.scanners.zonetransfer import dns_zonetransfer from anubis.utils.ColorPrint import ColorPrint @@ -68,9 +70,10 @@ def run(self): # Default scans that run every time target = self.options["TARGET"][i] threads = [threading.Thread(target=dns_zonetransfer, args=(self, target)), - threading.Thread(target=subdomain_hackertarget, args=(self, target)), + threading.Thread(target=search_subject_alt_name, + args=(self, target)), threading.Thread(target=search_virustotal, args=(self, target)), # threading.Thread(target=search_pkey, args=(self, target)), @@ -80,11 +83,15 @@ def run(self): threading.Thread(target=search_dnsdumpster, args=(self, target)), threading.Thread(target=search_anubisdb, args=(self, target))] - + # Additional options - shodan.io scan if self.options["--additional-info"]: threads.append(threading.Thread(target=search_shodan, args=(self,))) + # Additional options - ssl + if self.options["--ssl"]: + threads.append(threading.Thread(target=ssl_scan, args=(self, target))) + # Additional options - nmap scan of dnssec script and a host/port scan if self.options["--with-nmap"]: threads.append( diff --git a/requirements.txt b/requirements.txt index 8626fd3..abe8d91 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@ setuptools python_nmap==0.6.1 -shodan==1.7.7 +shodan==1.9.0 docopt==0.6.2 -requests==2.18.4 +requests==2.21.0 censys==0.0.8 -dnspython==1.15.0 \ No newline at end of file +dnspython==1.15.0 +sslyze==2.0.3 \ No newline at end of file diff --git a/setup.py b/setup.py index d4b1a54..8554806 100644 --- a/setup.py +++ b/setup.py @@ -4,9 +4,8 @@ from os.path import abspath, dirname, join from subprocess import call -from setuptools import Command, find_packages, setup - from anubis import __version__ +from setuptools import Command, find_packages, setup this_dir = abspath(dirname(__file__)) with open(join(this_dir, 'README.md'), encoding='utf-8') as file: @@ -43,9 +42,8 @@ def run(self): 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], keywords='cli', packages=find_packages(exclude=['docs', 'tests*']), python_requires='>=3', - install_requires=['docopt', 'setuptools', - 'python_nmap==0.6.1', 'shodan', 'requests', 'censys', - 'dnspython==1.15.0'], + install_requires=['docopt', 'setuptools', 'python_nmap==0.6.1', 'shodan==1.9.0', + 'requests', 'censys==0.0.8', 'dnspython==1.15.0', 'sslyze==2.0.3'], extras_require={'test': ['coverage', 'pytest', 'pytest-cov'], }, entry_points={'console_scripts': ['anubis=anubis.cli:main', ], }, cmdclass={'test': RunTests},