forked from wifiphisher/wifiphisher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
102 lines (89 loc) · 4.53 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/usr/bin/env python
"""
This module tries to install all the required software.
"""
from __future__ import print_function
import sys
import os
from setuptools import setup, find_packages, Command
import wifiphisher.common.constants as constants
class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
def get_dnsmasq():
"""
Try to install dnsmasq on host machine if not present
:return: None
:rtype: None
"""
if not os.path.isfile("/usr/sbin/dnsmasq"):
install = raw_input(("[" + constants.T + "*" + constants.W + "] dnsmasq not found " +
"in /usr/sbin/dnsmasq, " + "install now? [y/n] "))
if install == "y":
if os.path.isfile("/usr/bin/pacman"):
os.system("pacman -S dnsmasq")
elif os.path.isfile("/usr/bin/yum"):
os.system("yum install dnsmasq")
else:
os.system("apt-get -y install dnsmasq")
else:
sys.exit(("[" + constants.R + "-" + constants.W + "] dnsmasq " +
"not found in /usr/sbin/dnsmasq"))
if not os.path.isfile("/usr/sbin/dnsmasq"):
dnsmasq_message = ("\n[" + constants.R + "-" + constants.W +
"] Unable to install the \'dnsmasq\' package!\n" + "[" + constants.T +
"*" + constants.W + "] This process requires a persistent internet " +
"connection!\nPlease follow the link below to configure your " +
"sources.list\n" + constants.B + "http://docs.kali.org/general-use/" +
"kali-linux-sources-list-repositories\n" + constants.W + "[" +
constants.G + "+" + constants.W + "] Run apt-get update for changes " +
"to take effect.\n" + "[" + constants.G + "+" + constants.W + "] " +
"Rerun the script to install dnsmasq.\n[" + constants.R + "!" +
constants.W + "] Closing")
sys.exit(dnsmasq_message)
# setup settings
NAME = "wifiphisher"
AUTHOR = "sophron"
AUTHOR_EMAIL = "[email protected]"
URL = "https://github.com/wifiphisher/wifiphisher"
DESCRIPTION = "Automated phishing attacks against Wi-Fi networks"
LICENSE = "GPL"
KEYWORDS = ["wifiphisher", "evil", "twin", "phishing"]
PACKAGES = find_packages(exclude=["docs", "tests"])
INCLUDE_PACKAGE_DATA = True
VERSION = "1.4"
CLASSIFIERS = ["Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Natural Language :: English", "Operating System :: Unix",
"Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 2 :: Only", "Topic :: Security",
"Topic :: System :: Networking", "Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology"]
ENTRY_POINTS = {"console_scripts": ["wifiphisher = wifiphisher.pywifiphisher:run"]}
# WORKAROUND: Download tornado 4.5.3 instead of latest so travis won't complain
INSTALL_REQUIRES = ["PyRIC", "tornado==4.5.3",
"pbkdf2", "roguehostapd", "scapy"]
CMDCLASS = {"clean": CleanCommand,}
# run setup
setup(name=NAME, author=AUTHOR, author_email=AUTHOR_EMAIL, description=DESCRIPTION,
license=LICENSE, keywords=KEYWORDS, packages=PACKAGES,
include_package_data=INCLUDE_PACKAGE_DATA, version=VERSION, entry_points=ENTRY_POINTS,
install_requires=INSTALL_REQUIRES, classifiers=CLASSIFIERS, url=URL, cmdclass=CMDCLASS)
get_dnsmasq()
print()
print(" _ __ _ _ _ _ ")
print(" (_)/ _(_) | | (_) | | ")
print(" ((.)) __ ___| |_ _ _ __ | |__ _ ___| |__ ___ _ __ ")
print(r" | \ \ /\ / / | _| | '_ \| '_ \| / __| '_ \ / _ \ '__|")
print(r" /_\ \ V V /| | | | | |_) | | | | \__ \ | | | __/ | ")
print(r" /___\ \_/\_/ |_|_| |_| .__/|_| |_|_|___/_| |_|\___|_| ")
print(r" / \ | | ")
print(" |_| ")
print(" ")