2020-03-02 00:51:33 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
from distutils.dir_util import copy_tree
|
2020-04-19 02:31:11 +00:00
|
|
|
import sys
|
|
|
|
|
2020-04-21 20:35:02 +00:00
|
|
|
# check version the python install
|
2020-04-19 02:31:11 +00:00
|
|
|
if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
|
|
|
|
print("[!] Wifipumpkin3 requires Python 3.7 or higher!")
|
2020-04-21 20:35:02 +00:00
|
|
|
print(
|
|
|
|
"[*] You are using Python {}.{}.".format(
|
|
|
|
sys.version_info.major, sys.version_info.minor
|
|
|
|
)
|
|
|
|
)
|
2020-04-19 02:31:11 +00:00
|
|
|
sys.exit(1)
|
2020-03-02 00:51:33 +00:00
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
|
2020-03-02 00:51:33 +00:00
|
|
|
def version(version_file):
|
2020-04-12 23:26:30 +00:00
|
|
|
with open(version_file, "r") as f:
|
2020-03-02 00:51:33 +00:00
|
|
|
version_file_content = f.read()
|
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
version_match = re.search(
|
|
|
|
r"__version__\s*=\s*[\"\']([^\"\']+)", version_file_content
|
|
|
|
)
|
2020-03-02 00:51:33 +00:00
|
|
|
if version_match:
|
|
|
|
return version_match.groups()[0]
|
|
|
|
|
|
|
|
return None
|
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
|
|
|
|
with open("requirements.txt") as fp:
|
2020-03-02 00:51:33 +00:00
|
|
|
required = [line.strip() for line in fp if line.strip() != ""]
|
|
|
|
|
2020-04-06 12:37:54 +00:00
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
folders = ["config", "logs", "helps", "scripts", "exceptions"]
|
|
|
|
|
|
|
|
|
2020-03-02 00:51:33 +00:00
|
|
|
def create_user_dir_config():
|
|
|
|
user_config_dir = os.path.expanduser("~") + "/.config/wifipumpkin3"
|
|
|
|
if not os.path.isdir(user_config_dir):
|
|
|
|
os.makedirs(user_config_dir, exist_ok=True)
|
2020-04-15 00:58:19 +00:00
|
|
|
# force copy all files `config` to user_config_dir
|
|
|
|
for folder in folders:
|
|
|
|
copy_tree(folder, user_config_dir + "/{}".format(folder))
|
2020-03-02 00:51:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
# create dir config
|
|
|
|
create_user_dir_config()
|
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
VERSION_FILE = "wifipumpkin3/_version.py"
|
2020-03-02 00:51:33 +00:00
|
|
|
wifipumpkin3_version = version(VERSION_FILE)
|
|
|
|
|
2020-04-12 23:26:30 +00:00
|
|
|
setup(
|
|
|
|
name="wifipumpkin3",
|
|
|
|
version=wifipumpkin3_version,
|
2020-06-16 18:54:18 +00:00
|
|
|
description="Powerful framework for rogue access point attack.",
|
2020-04-12 23:26:30 +00:00
|
|
|
author="Marcos Bomfim (mh4x0f) - P0cL4bs Team",
|
|
|
|
author_email="mh4root@gmail.com",
|
|
|
|
url="https://github.com/P0cL4bs/wifipumpkin3",
|
|
|
|
license="apache 2.0",
|
|
|
|
long_description=open("README.md").read(),
|
|
|
|
install_requires=required,
|
2020-04-24 22:01:40 +00:00
|
|
|
scripts=["bin/sslstrip3", "bin/captiveflask"],
|
2020-04-12 23:26:30 +00:00
|
|
|
include_package_data=True,
|
|
|
|
packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),
|
|
|
|
python_requires=">=3.7",
|
|
|
|
classifiers=[
|
|
|
|
"Programming Language :: Python :: 3.7",
|
|
|
|
"Development Status :: 5 - Production/Stable",
|
2020-06-16 18:54:18 +00:00
|
|
|
"License :: OSI Approved :: Apache Software License",
|
2020-04-12 23:26:30 +00:00
|
|
|
"Natural Language :: English",
|
|
|
|
"Operating System :: POSIX :: Linux",
|
|
|
|
"Environment :: Console",
|
|
|
|
],
|
2020-04-24 22:01:40 +00:00
|
|
|
entry_points={"console_scripts": ["wifipumpkin3=wifipumpkin3.__main__:main",],},
|
2020-04-12 23:26:30 +00:00
|
|
|
)
|