Closed Shuvo31 closed 3 years ago
@prince-7 @pwned-17 please check it
As i checked your last commit this issue already been resolved 2 months ago. In the last commit u guys already fixed distro via this process, import distro os_name = distro.linux_distribution()[0]
@adeyosemanputra Thanks for concern.
thank you @Shuvo31 . well done
Need to import distro
Need to define that"os_name = distro.linux_distribution()[0]"
from setuptools import find_packages from setuptools import setup import platform import subprocess import re import distro
os_name = distro.linux_distribution()[0] if not os_name: if 'amzn' in platform.uname()[2]: os_name = 'centos'
files_definition = [ ('/etc/securetea', ['securetea.conf']), ('', ['securetea.conf']), ('/etc/securetea/asp', [ 'securetea/lib/auto_server_patcher/configs/commands.json', 'securetea/lib/auto_server_patcher/configs/config.json' ]), ('/etc/securetea/log_monitor/server_log/payloads', [ 'securetea/lib/log_monitor/server_log/rules/payloads/bad_ua.txt', 'securetea/lib/log_monitor/server_log/rules/payloads/lfi.txt', 'securetea/lib/log_monitor/server_log/rules/payloads/port_scan_ua.txt', 'securetea/lib/log_monitor/server_log/rules/payloads/sqli.txt', 'securetea/lib/log_monitor/server_log/rules/payloads/web_shell.txt', 'securetea/lib/log_monitor/server_log/rules/payloads/xss.txt']), ('/etc/securetea/log_monitor/server_log/regex', [ 'securetea/lib/log_monitor/server_log/rules/regex/sqli.txt', 'securetea/lib/log_monitor/server_log/rules/regex/xss.txt']), ('/etc/securetea/log_monitor/system_log', [ 'securetea/lib/log_monitor/system_log/harmful_command.txt' ]), ('/etc/securetea/web_deface', [ 'securetea/lib/web_deface/config/path_map.json' ]), ('/etc/securetea/antivirus', [ 'securetea/lib/antivirus/config/config.json' ]) ]
dependency-name to command mapping dict
DEPENDENCY_COMMAND_MAP = { "libnetfilter-queue-dev": {"debian": "sudo apt-get install " "build-essential python-dev " "libnetfilter-queue-dev"}, "clamav": {"debian": "sudo apt-get install clamav"} }
def execute_command(command): """Execute the commnand passed & return the output.
def verify_installation(output): """Verify whether the installation is successful or not.
def install_dependency(dependency, command): """Install the dependency.
def check_dependency(): """Check for the dependencies in the system."""
categorize OS
check_dependency()
entry_points = { 'console_scripts': [ 'securetea=securetea.entry_points.securetea_core_ep:run_core', 'securetea-server=securetea.entry_points.server_ep:start_server_process', 'securetea-system=securetea.entry_points.system_ep:start_system_process', 'securetea-iot=securetea.entry_points.iot_ep:start_iot_process' ] }
server_requirements = [ "pathlib", "wget", "yara-python", "clamd", "beautifulsoup4", "lxml", "clamd" ]
system_requirements = [ "pathlib", "wget", "yara-python", "clamd", "beautifulsoup4", "lxml", "clamd" ]
iot_requirements = [ "shodan" ]
setup( name='securetea', version='2.2', packages=find_packages(exclude=[ "test", ".test", ".test.", "test." ]), data_files=files_definition, entry_points=entry_points, license='MIT', description='SecureTea', long_description=open('doc/en-US/user_guide_pypi.md').read(), long_description_content_type='text/markdown', url='https://github.com/OWASP/SecureTea-Project', author='OWASP SecureTea', author_email='rejah.rehim@owasp.org', install_requires=[ "requests", "requests_oauthlib", "py_cpuinfo", "psutil", "flask", "flask_cors", "pynput", "python-telegram-bot", "twilio", "boto3", "geocoder", "pyudev", "ipwhois", "future", "scapy", "wget", "bs4", "shodan", "NetfilterQueue" ], extras_require={ 'server': server_requirements, 'system': system_requirements, 'iot': iot_requirements }, python_requires='>=2.7', classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.6', 'Natural Language :: English', 'Topic :: Software Development :: Version Control :: Git', 'Topic :: Software Development :: Testing :: Unit', ], zip_safe=False )