-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
setup.py
54 lines (48 loc) · 1.74 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
"""
This file installs Freeway - making it available directly from the command line:
'sudo Freeway'
To uninstall Freeway run:
'sudo pip uninstall 3way'
"""
from setuptools import setup, find_packages
from setuptools.command.install import install
import os
import shutil
class PostInstallCommand(install):
"""Post-installation for installation."""
def run(self):
install.run(self)
main_dir = '/usr/local/share/3way'
if not os.path.exists(main_dir):
os.makedirs(main_dir)
source = 'FreewayTools/lists/ssid_list.txt'
destination = os.path.join(main_dir, "lists")
if not os.path.exists(destination):
os.makedirs(destination)
if not os.path.exists(os.path.join(destination, "ssid_list.txt")):
shutil.copy(source, os.path.join(destination, 'ssid_list.txt'))
source = 'templates'
destination = os.path.join(main_dir, source)
if not os.path.exists(destination):
os.makedirs(destination)
for template in ["google", "Valentines", "mrhacker", "mcd"]:
if not os.path.exists(os.path.join(destination, template)):
shutil.copytree(f"{source}/{template}", f"{destination}/{template}")
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name='3way',
version='1.4.0',
author='FLOCK4H',
url='https://github.com/FLOCK4H/Freeway',
description='Freeway for network pentesting',
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
packages=find_packages(),
install_requires=["scapy", "rich"],
scripts=['Freeway'],
cmdclass={
'install': PostInstallCommand,
}
)