Prepare package to release on pypi

For convenienc installation prepare setup.py to be able to install patator
using pip.

Also tell how to install in on Kali with deb package dependencies
pull/76/head
Pierre Verkest 7 years ago
parent ec605efaef
commit 7be8263038

21
.gitignore vendored

@ -0,0 +1,21 @@
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

@ -0,0 +1 @@
include *.md

@ -280,7 +280,62 @@ $ unzip_pass zipfile=challenge1.zip password=FILE0 0=rockyou.dic -x ignore:code!
10:54:31 patator INFO - To resume execution, pass --resume 166,164,165,166,155,158,148,158,155,154
```
## PyInstaller
## Install patator
### On Kali
* install Kali deb packages dependencies:
```bash
apt install \
git \
curl \
python-venv \
ike-scan \
unzip \
libxfreerdp-client1.1 \
python-dev \ # used to compile pycrypto
gcc \ # used to compile pycrypto
libsqlcipher-dev \ # used to compile pysqlcipher
libsqlite3-dev \ # used to compile pysqlcipher
libcurl4-openssl-dev \ # required by pycurl
libssl-dev \ # required by pycurl
openjdk-9-jre-headless \ # required to use keytool
ldap-utils # required to use ldapsearch
```
* create a virtual env using python 3:
```bash
python3 -m venv patatorvenv3
# activate venv
source patatorvenv3/bin/activate
```
* install patator
* from [pypi](https://pypi.python.org/pypi/patator)
(not possible at the moment, require a first release on python package index)
```bash
# pycurl compilation env setting
export PYCURL_SSL_LIBRARY=openssl
pip install patator
```
* from source code
```bash
# get the code
git clone https://github.com/lanjelot/patator
# install dependencies
cd patator/
# pycurl compilation env setting
pip install -r requirements.txt
# install in develop mode (useful when developing)
python setup.py develop
```
### Bundling on Windows 5.2.3790 x86
Install `python-2.7.9.msi` from [Python](https://www.python.org/downloads/windows/).

@ -127,7 +127,7 @@ INSTALL
--------------------------------------------------------------------------------------------------
paramiko | SSH | http://www.lag.net/paramiko/ | 1.7.7.1 |
--------------------------------------------------------------------------------------------------
pycurl | HTTP | http://pycurl.sourceforge.net/ | 7.19.3 |
pycurl | HTTP | http://pycurl.sourceforge.net/ | 7.43.0 |
--------------------------------------------------------------------------------------------------
libcurl | HTTP | https://curl.haxx.se/ | 7.21.0 |
--------------------------------------------------------------------------------------------------
@ -4765,7 +4765,7 @@ modules = [
dependencies = {
'paramiko': [('ssh_login',), 'http://www.lag.net/paramiko/', '1.7.7.1'],
'pycurl': [('http_fuzz',), 'http://pycurl.sourceforge.net/', '7.19.3'],
'pycurl': [('http_fuzz',), 'http://pycurl.sourceforge.net/', '7.43.0'],
'libcurl': [('http_fuzz',), 'https://curl.haxx.se/', '7.21.0'],
'ajpy': [('ajp_fuzz',), 'https://github.com/hypn0s/AJPy/', '0.0.1'],
'openldap': [('ldap_login',), 'http://www.openldap.org/', '2.4.24'],
@ -4787,7 +4787,7 @@ dependencies = {
# }}}
# main {{{
if __name__ == '__main__':
def main():
multiprocessing.freeze_support()
def show_usage():

@ -0,0 +1,20 @@
ajpy==0.0.1
cx_Oracle
dnspython==1.15.0
impacket==0.9.12
IPy==0.75
# multiprocessing is not working on python3.5
multiprocessing
# mysql-python doesn't appear very maintains anymore
# needs some patch to install with python3.5
# also may require install mysql on the machine?
# find a nice way to do
# mysql-python
paramiko==1.7.7.1
psycopg2
pycrypto
pycurl
pyopenssl
pysnmp==4.2.1
# pysqlcipher is not working on python3.5
pysqlcipher

@ -0,0 +1,94 @@
import io
from setuptools import setup, find_packages
def parse_requirements(file):
required = []
with open(file) as f:
for req in f.read().splitlines():
if not req.strip().startswith('#'):
required.append(req)
return required
def read(*args, **kwargs):
encoding = kwargs.get('encoding', 'utf-8')
sep = kwargs.get('sep', '\n')
buf = []
for filename in args:
with io.open(filename, encoding=encoding) as f:
buf.append(f.read())
return sep.join(buf)
requirements = parse_requirements('requirements.txt')
long_description = read('README.md', )
setup(
name="patator",
version="0.7-beta",
packages=find_packages(),
install_requires=requirements,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Intended Audience :: Information Technology',
'License :: OSI Approved :: GNU General Public License v2 (GPLv2)',
'Programming Language :: Python :: 3',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Topic :: Utilities',
'Topic :: Security',
],
# metadata for upload to PyPI
author="Sebastien Macke",
author_email="pastor@hsc.fr",
description="A multi-threaded brute-force tool",
long_description=long_description,
license="GPLv2",
keywords="pentest brute force penetration test security",
url="https://github.com/lanjelot/patator",
entry_points={
'console_scripts': [
'ftp_login=patator:main',
'ssh_login=patator:main',
'telnet_login=patator:main',
'smtp_login=patator:main',
'smtp_vrfy=patator:main',
'smtp_rcpt=patator:main',
'finger_lookup=patator:main',
'http_fuzz=patator:main',
'ajp_fuzz=patator:main',
'pop_login=patator:main',
'pop_passd=patator:main',
'imap_login=patator:main',
'ldap_login=patator:main',
'smb_login=patator:main',
'smb_lookupsid=patator:main',
'rlogin_login=patator:main',
'vmauthd_login=patator:main',
'mssql_login=patator:main',
'oracle_login=patator:main',
'mysql_login=patator:main',
'mysql_query=patator:main',
'rdp_login=patator:main',
'pgsql_login=patator:main',
'vnc_login=patator:main',
'dns_forward=patator:main',
'dns_reverse=patator:main',
'snmp_login=patator:main',
'ike_enum=patator:main',
'unzip_pass=patator:main',
'keystore_pass=patator:main',
'sqlcipher_pass=patator:main',
'umbraco_crack=patator:main',
'tcp_fuzz=patator:main',
'dummy_test=patator:main',
],
},
)
Loading…
Cancel
Save