diff --git a/README.md b/README.md index 578e246..4db62f6 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Parked domains are websites that look real, but aren't valid attack surface. The Download required packages on pip: ``` -sudo pip3 install -r requirements.txt +sudo pip3 install git+https://github.com/BishopFox/eyeballer.git ``` Or if you want GPU support: @@ -75,18 +75,34 @@ NOTE: For best results, make sure you screenshot your websites in a native 1.6x To eyeball some screenshots, just run the "predict" mode: +### CLI ``` -eyeballer.py --weights YOUR_WEIGHTS.h5 predict YOUR_FILE.png +eyeballer --weights YOUR_WEIGHTS.h5 predict YOUR_FILE.png ``` Or for a whole directory of files: ``` -eyeballer.py --weights YOUR_WEIGHTS.h5 predict PATH_TO/YOUR_FILES/ +eyeballer --weights YOUR_WEIGHTS.h5 predict PATH_TO/YOUR_FILES/ ``` Eyeballer will spit the results back to you in human readable format (a `results.html` file so you can browse it easily) and machine readable format (a `results.csv` file). +### Python +For using eyeballer right from Python code, use the following snippet: +``` +from eyeballer.model import EyeballModel +model = EyeballModel(weights_file=weights_file_path) +model.predict(image_path) +# Result: +# [{'filename': '/...', +# 'custom404': ..., +# 'login': ..., +# 'webapp': ..., +# 'oldlooking': ..., +# 'parked': ...}] +``` + ## Performance Eyeballer's performance is measured against an evaluation dataset, which is 20% of the overall screenshots chosen at random. Since these screenshots are never used in training, they can be an effective way to see how well the model is performing. Here are the latest results: diff --git a/eyeballer.py b/eyeballer/cli.py similarity index 100% rename from eyeballer.py rename to eyeballer/cli.py diff --git a/requirements.txt b/requirements.txt index c6c761d..d6e1198 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1 @@ -Augmentor -click -matplotlib -numpy -pandas -pillow -sklearn -tensorflow -jinja2 -progressbar2 +-e . diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..5cd21b6 --- /dev/null +++ b/setup.py @@ -0,0 +1,41 @@ +import setuptools + +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + +setuptools.setup( + name="eyeballer", + version="1.0.0", + author="Dan Petro", + description="Eyeballer is meant for large-scope network penetration tests where you need to find \"interesting\" targets from a huge set of web-based hosts.", + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/BishopFox/eyeballer", + project_urls={ + "Bug Tracker": "https://github.com/BishopFox/eyeballer/issues", + }, + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Operating System :: OS Independent", + ], + install_requires=[ + 'Augmentor', + 'click', + 'matplotlib', + 'numpy', + 'pandas', + 'pillow', + 'sklearn', + 'tensorflow', + 'jinja2', + 'progressbar2' + ], + packages=setuptools.find_packages(), + entry_points = { + 'console_scripts': [ + 'eyeballer = eyeballer.cli:cli' + ], + }, + python_requires=">=3.6", +) \ No newline at end of file