Skip to content

Commit

Permalink
Merge pull request #223 Exegol v4.3.5
Browse files Browse the repository at this point in the history
Release 4.3.5
  • Loading branch information
Dramelac authored Aug 24, 2024
2 parents b7a3609 + 5cdf573 commit a8d74d4
Show file tree
Hide file tree
Showing 18 changed files with 226 additions and 147 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sub_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
python-version: "3.12"
- name: Install requirements
run: python -m pip install --user mypy types-requests types-PyYAML
run: python -m pip install --user mypy types-requests types-PyYAML types-tzlocal
- name: Run code analysis (package)
run: mypy ./exegol/ --ignore-missing-imports --check-untyped-defs --pretty # TODO add --disallow-untyped-defs
- name: Run code analysis (source)
Expand All @@ -42,6 +42,6 @@ jobs:
with:
python-version: "3.12"
- name: Install requirements
run: python -m pip install --user mypy types-requests types-PyYAML
run: python -m pip install --user mypy types-requests types-PyYAML types-tzlocal
- name: Check python compatibility for ${{ matrix.os }}/${{ matrix.version }}
run: mypy ./exegol.py --ignore-missing-imports --check-untyped-defs --python-version ${{ matrix.version }} --platform ${{ matrix.os }}
2 changes: 1 addition & 1 deletion exegol-resources
Submodule exegol-resources updated 53 files
+9 −0 linux/LaZagne/hook-sys.py
+14 −5 linux/LaZagne/laZagne.py
+0 −41 linux/LaZagne/laZagne.spec
+38 −0 linux/LaZagne/lazagne.spec
+4 −2 linux/LaZagne/lazagne/config/manage_modules.py
+2 −2 linux/LaZagne/lazagne/softwares/browsers/mozilla.py
+0 −9 linux/LaZagne/lazagne/softwares/mails/thunderbird.py
+11 −0 linux/LaZagne/lazagne/softwares/mails/thunderbird_mails.py
+ linux/ligolo-ng/agent_linux_amd64
+ linux/ligolo-ng/agent_linux_arm64
+175 −175 linux/linPEAS/linpeas.sh
+ linux/linPEAS/linpeas_darwin_amd64
+ linux/linPEAS/linpeas_darwin_arm64
+ linux/linPEAS/linpeas_linux_386
+ linux/linPEAS/linpeas_linux_amd64
+ linux/linPEAS/linpeas_linux_arm
+ linux/linPEAS/linpeas_linux_arm64
+9 −0 mac/LaZagne/hook-sys.py
+15 −3 mac/LaZagne/laZagne.py
+1 −0 mac/LaZagne/lazagne.spec
+11 −0 update-resources.sh
+1 −1 windows/Inveigh
+9 −0 windows/LaZagne/hook-sys.py
+14 −5 windows/LaZagne/laZagne.py
+ windows/LaZagne/lazagne.exe
+1 −1 windows/LaZagne/lazagne.spec
+15 −4 windows/LaZagne/lazagne/config/DPAPI/masterkey.py
+114 −0 windows/LaZagne/lazagne/config/crypto/md4.py
+1 −1 windows/LaZagne/lazagne/config/execute_cmd.py
+4 −2 windows/LaZagne/lazagne/config/manage_modules.py
+5 −0 windows/LaZagne/lazagne/softwares/browsers/chromium_browsers.py
+2 −0 windows/LaZagne/lazagne/softwares/browsers/firefox_browsers.py
+2 −2 windows/LaZagne/lazagne/softwares/browsers/mozilla.py
+0 −9 windows/LaZagne/lazagne/softwares/mails/thunderbird.py
+13 −0 windows/LaZagne/lazagne/softwares/mails/thunderbird_mails.py
+3,630 −3,627 windows/LaZagne/lazagne/softwares/memory/keethief.py
+22 −18 windows/LaZagne/lazagne/softwares/memory/memorydump.py
+55 −51 windows/LaZagne/lazagne/softwares/windows/ppypykatz.py
+1 −1 windows/PrivescCheck
+1 −1 windows/SharpCollection
+ windows/SysinternalsSuite/Procmon.exe
+ windows/SysinternalsSuite/Procmon64.exe
+ windows/SysinternalsSuite/Sysmon.exe
+ windows/SysinternalsSuite/Sysmon64.exe
+ windows/SysinternalsSuite/procexp.exe
+ windows/SysinternalsSuite/procexp64.exe
+ windows/ligolo-ng/agent.exe
+ windows/winPEAS/winPEASany.exe
+ windows/winPEAS/winPEASany_ofs.exe
+ windows/winPEAS/winPEASx64.exe
+ windows/winPEAS/winPEASx64_ofs.exe
+ windows/winPEAS/winPEASx86.exe
+ windows/winPEAS/winPEASx86_ofs.exe
2 changes: 1 addition & 1 deletion exegol/config/ConstantConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class ConstantConfig:
"""Constant parameters information"""
# Exegol Version
version: str = "4.3.4"
version: str = "4.3.5"

# Exegol documentation link
documentation: str = "https://exegol.rtfd.io/"
Expand Down
7 changes: 5 additions & 2 deletions exegol/console/TUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from rich.prompt import Prompt
from rich.table import Table

from exegol.config.EnvInfo import EnvInfo
from exegol.console import ConsoleFormat
from exegol.console.ConsoleFormat import boolFormatter, getColor, richLen
from exegol.console.ExegolProgress import ExegolProgress
Expand All @@ -17,7 +18,6 @@
from exegol.model.ExegolContainerTemplate import ExegolContainerTemplate
from exegol.model.ExegolImage import ExegolImage
from exegol.model.SelectableInterface import SelectableInterface
from exegol.config.EnvInfo import EnvInfo
from exegol.utils.ExeLog import logger, console, ExeLog


Expand Down Expand Up @@ -437,7 +437,10 @@ def __buildContainerRecapTable(container: ExegolContainerTemplate):
recap.title = "[not italic]:white_medium_star: [/not italic][gold3][g]Container summary[/g][/gold3]"
# Header
recap.add_column(f"[bold blue]Name[/bold blue]{os.linesep}[bold blue]Image[/bold blue]", justify="right")
container_info_header = f"{container.getDisplayName()}{os.linesep}{container.image.getName()}"
container_status = container.getTextStatus()

container_info_header = (f"{container.getDisplayName()} {'(' + container_status + ')' if container_status else ''}{os.linesep}"
f"{container.image.getName()}")
if "N/A" not in container.image.getImageVersion():
container_info_header += f" - v.{container.image.getImageVersion()}"
if "Unknown" not in container.image.getStatus():
Expand Down
2 changes: 1 addition & 1 deletion exegol/console/cli/actions/ExegolParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,4 @@ class Version(Command):
"""Print current Exegol version"""

def __call__(self, *args, **kwargs):
return ExegolManager.print_version
return lambda: None
12 changes: 11 additions & 1 deletion exegol/manager/ExegolController.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging

try:
import docker
import requests
Expand Down Expand Up @@ -69,8 +71,16 @@ def main():
logger.info("Exiting")
except git.exc.GitCommandError as git_error:
print_exception_banner()
# Printing git stderr as raw to avoid any Rich parsing error
logger.debug("Full git output:")
logger.raw(git_error, level=logging.DEBUG)
logger.empty_line()
error = git_error.stderr.strip().split(": ")[-1].strip("'")
logger.critical(f"A critical error occurred while running this git command: {' '.join(git_error.command)} => {error}")
logger.error("Git error received:")
# Printing git error as raw to avoid any Rich parsing error
logger.raw(error, level=logging.ERROR)
logger.empty_line()
logger.critical(f"A critical error occurred while running this git command: {' '.join(git_error.command)}")
except Exception:
print_exception_banner()
console.print_exception(show_locals=True, suppress=[docker, requests, git])
Expand Down
102 changes: 56 additions & 46 deletions exegol/manager/ExegolManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,13 @@ def __loadOrCreateContainer(cls,
# Return cache
return cls.__container
container_tag: Optional[str] = override_container if override_container is not None else ParametersManager().containertag
container_tags: Optional[Sequence[str]] = ParametersManager().multicontainertag
container_tags: Optional[List[str]] = None
if ParametersManager().multicontainertag:
container_tags = []
for tag in ParametersManager().multicontainertag:
# Prevent duplicate tag selection
if tag not in container_tags:
container_tags.append(tag)
try:
if container_tag is None and (container_tags is None or len(container_tags) == 0):
# Interactive container selection
Expand Down Expand Up @@ -438,51 +444,55 @@ def __interactiveSelection(cls,
@classmethod
def __prepareContainerConfig(cls):
"""Create Exegol configuration with user input"""
# Create default exegol config
config = ContainerConfig()
# Container configuration from user CLI options
if ParametersManager().X11:
config.enableGUI()
if ParametersManager().share_timezone:
config.enableSharedTimezone()
config.setNetworkMode(ParametersManager().host_network)
if ParametersManager().ports is not None:
for port in ParametersManager().ports:
config.addRawPort(port)
if ParametersManager().my_resources:
config.enableMyResources()
if ParametersManager().exegol_resources:
config.enableExegolResources()
if ParametersManager().log:
config.enableShellLogging(ParametersManager().log_method,
UserConfig().shell_logging_compress ^ ParametersManager().log_compress)
if ParametersManager().workspace_path:
if ParametersManager().mount_current_dir:
logger.warning(f'Workspace conflict detected (-cwd cannot be use with -w). Using: {ParametersManager().workspace_path}')
config.setWorkspaceShare(ParametersManager().workspace_path)
elif ParametersManager().mount_current_dir:
config.enableCwdShare()
if ParametersManager().privileged:
config.setPrivileged()
elif ParametersManager().capabilities is not None:
for cap in ParametersManager().capabilities:
config.addCapability(cap)
if ParametersManager().volumes is not None:
for volume in ParametersManager().volumes:
config.addRawVolume(volume)
if ParametersManager().devices is not None:
for device in ParametersManager().devices:
config.addUserDevice(device)
if ParametersManager().vpn is not None:
config.enableVPN()
if ParametersManager().envs is not None:
for env in ParametersManager().envs:
config.addRawEnv(env)
if UserConfig().desktop_default_enable ^ ParametersManager().desktop:
config.enableDesktop(ParametersManager().desktop_config)
if ParametersManager().comment:
config.addComment(ParametersManager().comment)
return config
try:
# Create default exegol config
config = ContainerConfig()
# Container configuration from user CLI options
if ParametersManager().X11:
config.enableGUI()
if ParametersManager().share_timezone:
config.enableSharedTimezone()
config.setNetworkMode(ParametersManager().host_network)
if ParametersManager().ports is not None:
for port in ParametersManager().ports:
config.addRawPort(port)
if ParametersManager().my_resources:
config.enableMyResources()
if ParametersManager().exegol_resources:
config.enableExegolResources()
if ParametersManager().log:
config.enableShellLogging(ParametersManager().log_method,
UserConfig().shell_logging_compress ^ ParametersManager().log_compress)
if ParametersManager().workspace_path:
if ParametersManager().mount_current_dir:
logger.warning(f'Workspace conflict detected (-cwd cannot be use with -w). Using: {ParametersManager().workspace_path}')
config.setWorkspaceShare(ParametersManager().workspace_path)
elif ParametersManager().mount_current_dir:
config.enableCwdShare()
if ParametersManager().privileged:
config.setPrivileged()
elif ParametersManager().capabilities is not None:
for cap in ParametersManager().capabilities:
config.addCapability(cap)
if ParametersManager().volumes is not None:
for volume in ParametersManager().volumes:
config.addRawVolume(volume)
if ParametersManager().devices is not None:
for device in ParametersManager().devices:
config.addUserDevice(device)
if ParametersManager().vpn is not None:
config.enableVPN()
if ParametersManager().envs is not None:
for env in ParametersManager().envs:
config.addRawEnv(env)
if UserConfig().desktop_default_enable ^ ParametersManager().desktop:
config.enableDesktop(ParametersManager().desktop_config)
if ParametersManager().comment:
config.addComment(ParametersManager().comment)
return config
except CancelOperation as e:
logger.critical(f"Unable to create a new container: {e}")
raise e

@classmethod
def __createContainer(cls, name: Optional[str]) -> ExegolContainer:
Expand Down
Loading

0 comments on commit a8d74d4

Please sign in to comment.