secator 0.8.0__py3-none-any.whl → 0.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of secator might be problematic. Click here for more details.
- secator/cli.py +13 -1
- secator/installer.py +24 -17
- secator/tasks/msfconsole.py +2 -3
- secator/tasks/nmap.py +1 -1
- secator/tasks/searchsploit.py +1 -1
- {secator-0.8.0.dist-info → secator-0.8.1.dist-info}/METADATA +1 -1
- {secator-0.8.0.dist-info → secator-0.8.1.dist-info}/RECORD +10 -10
- {secator-0.8.0.dist-info → secator-0.8.1.dist-info}/WHEEL +0 -0
- {secator-0.8.0.dist-info → secator-0.8.1.dist-info}/entry_points.txt +0 -0
- {secator-0.8.0.dist-info → secator-0.8.1.dist-info}/licenses/LICENSE +0 -0
secator/cli.py
CHANGED
|
@@ -19,7 +19,7 @@ from rich.table import Table
|
|
|
19
19
|
from secator.config import CONFIG, ROOT_FOLDER, Config, default_config, config_path
|
|
20
20
|
from secator.decorators import OrderedGroup, register_runner
|
|
21
21
|
from secator.definitions import ADDONS_ENABLED, ASCII, DEV_PACKAGE, OPT_NOT_SUPPORTED, VERSION, STATE_COLORS
|
|
22
|
-
from secator.installer import ToolInstaller, fmt_health_table_row, get_health_table, get_version_info
|
|
22
|
+
from secator.installer import ToolInstaller, fmt_health_table_row, get_health_table, get_version_info, get_distro_config
|
|
23
23
|
from secator.output_types import FINDING_TYPES, Info, Error
|
|
24
24
|
from secator.report import Report
|
|
25
25
|
from secator.rich import console
|
|
@@ -1095,6 +1095,18 @@ def install_tools(cmds):
|
|
|
1095
1095
|
if not status.is_ok():
|
|
1096
1096
|
return_code = 1
|
|
1097
1097
|
console.print()
|
|
1098
|
+
distro = get_distro_config()
|
|
1099
|
+
cleanup_cmds = [
|
|
1100
|
+
'go clean -cache',
|
|
1101
|
+
'go clean -modcache',
|
|
1102
|
+
'pip cache purge',
|
|
1103
|
+
'gem cleanup --user-install',
|
|
1104
|
+
'gem clean --user-install',
|
|
1105
|
+
]
|
|
1106
|
+
if distro.pm_finalizer:
|
|
1107
|
+
cleanup_cmds.append(f'sudo {distro.pm_finalizer}')
|
|
1108
|
+
cmd = ' && '.join(cleanup_cmds)
|
|
1109
|
+
Command.execute(cmd, cls_attributes={'shell': True}, quiet=False)
|
|
1098
1110
|
sys.exit(return_code)
|
|
1099
1111
|
|
|
1100
1112
|
|
secator/installer.py
CHANGED
|
@@ -42,9 +42,10 @@ class InstallerStatus(Enum):
|
|
|
42
42
|
|
|
43
43
|
@dataclass
|
|
44
44
|
class Distribution:
|
|
45
|
-
pm_install_command: str
|
|
46
|
-
pm_name: str
|
|
47
45
|
name: str
|
|
46
|
+
pm_name: str
|
|
47
|
+
pm_installer: str
|
|
48
|
+
pm_finalizer: str
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
class ToolInstaller:
|
|
@@ -119,7 +120,7 @@ class PackageInstaller:
|
|
|
119
120
|
"""
|
|
120
121
|
# Init status
|
|
121
122
|
distribution = get_distro_config()
|
|
122
|
-
if distribution.
|
|
123
|
+
if not distribution.pm_installer:
|
|
123
124
|
return InstallerStatus.UNKNOWN_DISTRIBUTION
|
|
124
125
|
|
|
125
126
|
console.print(
|
|
@@ -133,7 +134,7 @@ class PackageInstaller:
|
|
|
133
134
|
break
|
|
134
135
|
|
|
135
136
|
# Installer cmd
|
|
136
|
-
cmd = distribution.
|
|
137
|
+
cmd = distribution.pm_installer
|
|
137
138
|
if getpass.getuser() != 'root':
|
|
138
139
|
cmd = f'sudo {cmd}'
|
|
139
140
|
|
|
@@ -479,7 +480,8 @@ def get_distro_config():
|
|
|
479
480
|
package_manager_variable = os.environ.get('SECATOR_PACKAGE_MANAGER')
|
|
480
481
|
if package_manager_variable:
|
|
481
482
|
return package_manager_variable
|
|
482
|
-
|
|
483
|
+
installer = None
|
|
484
|
+
finalizer = None
|
|
483
485
|
system = platform.system()
|
|
484
486
|
distrib = system
|
|
485
487
|
|
|
@@ -487,32 +489,37 @@ def get_distro_config():
|
|
|
487
489
|
distrib = distro.id()
|
|
488
490
|
|
|
489
491
|
if distrib in ["ubuntu", "debian", "linuxmint", "popos", "kali"]:
|
|
490
|
-
|
|
492
|
+
installer = "apt install -y --no-install-recommends"
|
|
493
|
+
finalizer = "rm -rf /var/lib/apt/lists/*"
|
|
491
494
|
elif distrib in ["arch", "manjaro", "endeavouros"]:
|
|
492
|
-
|
|
495
|
+
installer = "pacman -S --noconfirm --needed"
|
|
493
496
|
elif distrib in ["alpine"]:
|
|
494
|
-
|
|
497
|
+
installer = "apk add --no-cache"
|
|
495
498
|
elif distrib in ["fedora"]:
|
|
496
|
-
|
|
499
|
+
installer = "dnf install -y"
|
|
500
|
+
finalizer = "dnf clean all"
|
|
497
501
|
elif distrib in ["centos", "rhel", "rocky", "alma"]:
|
|
498
|
-
|
|
502
|
+
installer = "yum -y"
|
|
503
|
+
finalizer = "yum clean all"
|
|
499
504
|
elif distrib in ["opensuse", "sles"]:
|
|
500
|
-
|
|
505
|
+
installer = "zypper -n"
|
|
506
|
+
finalizer = "zypper clean --all"
|
|
501
507
|
|
|
502
508
|
elif system == "Darwin": # macOS
|
|
503
|
-
|
|
509
|
+
installer = "brew install"
|
|
504
510
|
|
|
505
511
|
elif system == "Windows":
|
|
506
512
|
if shutil.which("winget"):
|
|
507
|
-
|
|
513
|
+
installer = "winget install --disable-interactivity"
|
|
508
514
|
elif shutil.which("choco"):
|
|
509
|
-
|
|
515
|
+
installer = "choco install -y --no-progress"
|
|
510
516
|
else:
|
|
511
|
-
|
|
517
|
+
installer = "scoop" # Alternative package manager for Windows
|
|
512
518
|
|
|
513
|
-
manager =
|
|
519
|
+
manager = installer.split(' ')[0]
|
|
514
520
|
config = Distribution(
|
|
515
|
-
|
|
521
|
+
pm_installer=installer,
|
|
522
|
+
pm_finalizer=finalizer,
|
|
516
523
|
pm_name=manager,
|
|
517
524
|
name=distrib
|
|
518
525
|
)
|
secator/tasks/msfconsole.py
CHANGED
|
@@ -49,12 +49,11 @@ class msfconsole(VulnMulti):
|
|
|
49
49
|
'yum|zypper': ['postgresql-devel'],
|
|
50
50
|
}
|
|
51
51
|
install_cmd = (
|
|
52
|
-
f'git clone https://github.com/rapid7/metasploit-framework.git {CONFIG.dirs.share}/metasploit-framework || true && '
|
|
52
|
+
f'git clone --depth 1 --single-branch https://github.com/rapid7/metasploit-framework.git {CONFIG.dirs.share}/metasploit-framework || true && ' # noqa: E501
|
|
53
53
|
f'cd {CONFIG.dirs.share}/metasploit-framework && '
|
|
54
54
|
f'gem install bundler --user-install -n {CONFIG.dirs.bin} && '
|
|
55
|
-
f'gem install xmlrpc --user-install -n {CONFIG.dirs.bin} && '
|
|
56
55
|
f'bundle config set --local path "{CONFIG.dirs.share}" && '
|
|
57
|
-
'bundle
|
|
56
|
+
'bundle lock --normalize-platforms &&'
|
|
58
57
|
'bundle install && '
|
|
59
58
|
f'ln -sf $HOME/.local/share/metasploit-framework/msfconsole {CONFIG.dirs.bin}/msfconsole'
|
|
60
59
|
)
|
secator/tasks/nmap.py
CHANGED
|
@@ -68,7 +68,7 @@ class nmap(VulnMulti):
|
|
|
68
68
|
'apk': ['nmap', 'nmap-scripts'],
|
|
69
69
|
}
|
|
70
70
|
install_cmd = (
|
|
71
|
-
'sudo git clone https://github.com/scipag/vulscan /opt/scipag_vulscan || true && '
|
|
71
|
+
'sudo git clone --depth 1 --single-branch https://github.com/scipag/vulscan /opt/scipag_vulscan || true && '
|
|
72
72
|
'sudo ln -s /opt/scipag_vulscan /usr/share/nmap/scripts/vulscan || true'
|
|
73
73
|
)
|
|
74
74
|
proxychains = True
|
secator/tasks/searchsploit.py
CHANGED
|
@@ -42,7 +42,7 @@ class searchsploit(Command):
|
|
|
42
42
|
'apk': ['ncurses']
|
|
43
43
|
}
|
|
44
44
|
install_cmd = (
|
|
45
|
-
f'git clone https://gitlab.com/exploit-database/exploitdb.git {CONFIG.dirs.share}/exploitdb || true && '
|
|
45
|
+
f'git clone --depth 1 --single-branch https://gitlab.com/exploit-database/exploitdb.git {CONFIG.dirs.share}/exploitdb || true && ' # noqa: E501
|
|
46
46
|
f'ln -sf $HOME/.local/share/exploitdb/searchsploit {CONFIG.dirs.bin}/searchsploit'
|
|
47
47
|
)
|
|
48
48
|
proxychains = False
|
|
@@ -2,11 +2,11 @@ secator/.gitignore,sha256=da8MUc3hdb6Mo0WjZu2upn5uZMbXcBGvhdhTQ1L89HI,3093
|
|
|
2
2
|
secator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
secator/celery.py,sha256=Ry-JYJzN9F4LFHOn4IXpSFgCzpM99esKiQRJh_TkHp8,9578
|
|
4
4
|
secator/celery_utils.py,sha256=iIuCn_3YkPXCtpnbaYqpppU2TARzSDyTIYHkrRyt54s,7725
|
|
5
|
-
secator/cli.py,sha256=
|
|
5
|
+
secator/cli.py,sha256=I_0KnLtWPPVBkLRnkGeEsehdJWBQ90R53CBVjVbPmeA,44388
|
|
6
6
|
secator/config.py,sha256=6wm2EErW1DuhrdKSuIEUvc2b3yBxJWyZKnocr7lIeZw,19267
|
|
7
7
|
secator/decorators.py,sha256=tjH7WodxJEBIf2CCbegmvOe8H9DKSFh4iPLEhDNGPCA,13784
|
|
8
8
|
secator/definitions.py,sha256=gFtLT9fjNtX_1qkiCjNfQyCvYq07IhScsQzX4o20_SE,3084
|
|
9
|
-
secator/installer.py,sha256=
|
|
9
|
+
secator/installer.py,sha256=vMkK6ciVtnKCxTQOnHy33jtc0g8_FvkiEu37W1Wf0TA,16579
|
|
10
10
|
secator/report.py,sha256=qJkEdCFttDBXIwUNUzZqFU_sG8l0PvyTSTogZVBv1Rs,3628
|
|
11
11
|
secator/rich.py,sha256=3ugCkgai7UNylQGUuOVAd7ghYWDSc73aSomrfKgKVxo,3290
|
|
12
12
|
secator/template.py,sha256=Qy4RjcmlifeSA8CleWUBb9fluxuYHzxgEH0H-8qs8R4,4323
|
|
@@ -100,16 +100,16 @@ secator/tasks/httpx.py,sha256=5oI8vK7w94nsQlKs9Ve4yZsCmogbsiB5PqGarR3eIIM,5854
|
|
|
100
100
|
secator/tasks/katana.py,sha256=yy07wReBubmjbvpmsx1nmAuKij7M8As8JovQU7_cSrM,5210
|
|
101
101
|
secator/tasks/maigret.py,sha256=6anhBzB4lEM90Lk23cAD_ku7I_ghTpj0W0i3h6HARD8,2088
|
|
102
102
|
secator/tasks/mapcidr.py,sha256=zYIlbjJadQY_g2X8hS5vK_789O_XfI2mkIH-Cs8y6hk,944
|
|
103
|
-
secator/tasks/msfconsole.py,sha256=
|
|
103
|
+
secator/tasks/msfconsole.py,sha256=Z6RXt_AzGyo_uuC2YWe2-v5GYGWxEwsxeUcddshYINg,6399
|
|
104
104
|
secator/tasks/naabu.py,sha256=zbaLY4CHcmCjOmRnB8c5unMv4_wyLLyCbas-vRm44DU,2047
|
|
105
|
-
secator/tasks/nmap.py,sha256=
|
|
105
|
+
secator/tasks/nmap.py,sha256=Zu24sJHnlOf3NXLj3Ohi07-x7m-5Ajr5ULpNsUF-QT0,12546
|
|
106
106
|
secator/tasks/nuclei.py,sha256=8VRl3C7_wTHr3n3zA2E9rDJTMWXFeU6fRM71txiGQHo,4235
|
|
107
|
-
secator/tasks/searchsploit.py,sha256=
|
|
107
|
+
secator/tasks/searchsploit.py,sha256=gvtLZbL2hzAZ07Cf0cSj2Qs0GvWK94XyHvoPFsetXu8,3321
|
|
108
108
|
secator/tasks/subfinder.py,sha256=C6W5NnXT92OUB1aSS9IYseqdI3wDMAz70TOEl8X-o3U,1213
|
|
109
109
|
secator/tasks/wpscan.py,sha256=LGw1DmomP4U83n3V6nyuPhXTd4t99dgrym7oL54JqHE,5495
|
|
110
110
|
secator/workflows/__init__.py,sha256=ivpZHiYYlj4JqlXLRmB9cmAPUGdk8QcUrCRL34hIqEA,665
|
|
111
|
-
secator-0.8.
|
|
112
|
-
secator-0.8.
|
|
113
|
-
secator-0.8.
|
|
114
|
-
secator-0.8.
|
|
115
|
-
secator-0.8.
|
|
111
|
+
secator-0.8.1.dist-info/METADATA,sha256=0YOH6BCwG2d6Ay7_PePVtpUMZ9NdJ5pWVqQXxG50mXs,14791
|
|
112
|
+
secator-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
113
|
+
secator-0.8.1.dist-info/entry_points.txt,sha256=lPgsqqUXWgiuGSfKy-se5gHdQlAXIwS_A46NYq7Acic,44
|
|
114
|
+
secator-0.8.1.dist-info/licenses/LICENSE,sha256=19W5Jsy4WTctNkqmZIqLRV1gTDOp01S3LDj9iSgWaJ0,2867
|
|
115
|
+
secator-0.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|