ThePorgs / Exegol

Fully featured and community-driven hacking environment
https://exegol.readthedocs.io/
GNU General Public License v3.0
1.95k stars 191 forks source link

2 errors appear when i create a container #233

Closed Chelsiesokeng closed 3 weeks ago

Chelsiesokeng commented 1 month ago

Describe the bug

──────────────────── Traceback (most recent call last) ──────────────────────╮ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolManager.py:397 in __loadOrCreateContainer │ │ │ │ 394 │ │ │ │ │ │ │ │ raise NotImplemented │ │ 395 │ │ │ │ else: │ │ 396 │ │ │ │ │ assert container_tag is not None │ │ ❱ 397 │ │ │ │ │ cls.__container = DockerUtils().getContainer(conta │ │ 398 │ │ except (ObjectNotFound, IndexError): │ │ 399 │ │ │ # ObjectNotFound is raised when the container_tag provided │ │ 400 │ │ │ # IndexError is raise when no container exist (raised from │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ cls = <class │ │ │ │ 'exegol.manager.ExegolManager.ExegolManager'> │ │ │ │ container_tag = 'ADGoad' │ │ │ │ container_tags = None │ │ │ │ multiple = False │ │ │ │ must_exist = False │ │ │ │ override_container = None │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ut │ │ ils/DockerUtils.py:186 in getContainer │ │ │ │ 183 │ │ │ │ lowered_tag = tag.lower() │ │ 184 │ │ │ │ if lowered_tag != tag: │ │ 185 │ │ │ │ │ return self.getContainer(lowered_tag) │ │ ❱ 186 │ │ │ raise ObjectNotFound │ │ 187 │ │ # Filter results with exact name matching │ │ 188 │ │ for c in container: │ │ 189 │ │ │ if c.name == f"exegol-{tag}": │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ container = [] │ │ │ │ self = <exegol.utils.DockerUtils.DockerUtils object at │ │ │ │ 0x7ff1e5710710> │ │ │ │ tag = 'ADGoad' │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ ObjectNotFound

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolController.py:68 in main │ │ │ │ 65 │ │ # Set logger verbosity depending on user input │ │ 66 │ │ ExeLog.setVerbosity(ParametersManager().verbosity, ParametersMa │ │ 67 │ │ # Start Main controller & Executing action selected by user CLI │ │ ❱ 68 │ │ ExegolController.call_action() │ │ 69 │ except KeyboardInterrupt: │ │ 70 │ │ logger.empty_line() │ │ 71 │ │ logger.info("Exiting") │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolController.py:48 in call_action │ │ │ │ 45 │ │ │ # Fetch main operation function │ │ 46 │ │ │ main_action = cls.action() │ │ 47 │ │ │ # Execute main function │ │ ❱ 48 │ │ │ main_action() │ │ 49 │ │ else: │ │ 50 │ │ │ # TODO review required parameters │ │ 51 │ │ │ logger.error(f"These parameters are mandatory but missing: │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ cls = <class │ │ │ │ 'exegol.manager.ExegolController.ExegolController'> │ │ │ │ main_action = <bound method ExegolManager.start of <class │ │ │ │ 'exegol.manager.ExegolManager.ExegolManager'>> │ │ │ │ missing_params = [] │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolManager.py:75 in start │ │ │ │ 72 │ │ cls.__interactive_mode = not bool(ParametersManager().containe │ │ 73 │ │ if not cls.interactive_mode: │ │ 74 │ │ │ logger.info("Arguments supplied with the command, skipping │ │ ❱ 75 │ │ container = cls.loadOrCreateContainer() │ │ 76 │ │ assert container is not None and type(container) is ExegolCont │ │ 77 │ │ if not container.isNew(): │ │ 78 │ │ │ # Check and warn user if some parameters don't apply to th │ │ │ │ ╭────────────────────────── locals ──────────────────────────╮ │ │ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │ │ │ ╰────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolManager.py:405 in loadOrCreateContainer │ │ │ │ 402 │ │ │ if must_exist: │ │ 403 │ │ │ │ logger.warning(f"The container named '{container_tag}' │ │ 404 │ │ │ │ return [] if multiple else None │ │ ❱ 405 │ │ │ return cls.createContainer(container_tag) │ │ 406 │ │ assert cls.container is not None │ │ 407 │ │ return cast(Union[Optional[ExegolContainer], List[ExegolContai │ │ 408 │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ cls = <class │ │ │ │ 'exegol.manager.ExegolManager.ExegolManager'> │ │ │ │ container_tag = 'ADGoad' │ │ │ │ container_tags = None │ │ │ │ multiple = False │ │ │ │ must_exist = False │ │ │ │ override_container = None │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │ │ nager/ExegolManager.py:526 in createContainer │ │ │ │ 523 │ │ │ │ │ │ "read CLI options with [green]exegol start -h[ │ │ 524 │ │ │ │ 525 │ │ container = DockerUtils().createContainer(model) │ │ ❱ 526 │ │ container.postCreateSetup() │ │ 527 │ │ return container │ │ 528 │ │ │ 529 │ @classmethod │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │ │ │ │ config = <exegol.model.ContainerConfig.ContainerConfig object at │ │ │ │ 0x7ff1e3e2ee50> │ │ │ │ container = <exegol.model.ExegolContainer.ExegolContainer object at │ │ │ │ 0x7ff1e3e31890> │ │ │ │ image = full (3.1.5/3.1.5 amd64) - 57.6GB - ([orange3]Outdated │ │ │ │ (v.3.1.5)[/orange3], [bright_black]N/A[/bright_black]) │ │ │ │ model = <exegol.model.ExegolContainerTemplate.ExegolContainerTempla… │ │ │ │ object at 0x7ff1e3e307d0> │ │ │ │ name = 'ADGoad' │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │ │ del/ExegolContainer.py:316 in postCreateSetup │ │ │ │ 313 │ │ │ if self.container.status.lower() == "created": │ │ 314 │ │ │ │ self.start_container() │ │ 315 │ │ │ try: │ │ ❱ 316 │ │ │ │ self.updatePasswd() │ │ 317 │ │ │ except APIError as e: │ │ 318 │ │ │ │ if "is not running" in e.explanation: │ │ 319 │ │ │ │ │ logger.critical("An unexpected error occurred. Exe │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ is_temporary = False │ │ │ │ self = <exegol.model.ExegolContainer.ExegolContainer object at │ │ │ │ 0x7ff1e3e31890> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │ │ del/ExegolContainer.py:355 in __updatePasswd │ │ │ │ 352 │ │ """ │ │ 353 │ │ if self.config.getPasswd() is not None: │ │ 354 │ │ │ logger.debug(f"Updating the {self.config.getUsername()} pa │ │ ❱ 355 │ │ │ self.exec(f"echo '{self.config.getUsername()}:{self.config │ │ 356 │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ self = <exegol.model.ExegolContainer.ExegolContainer object at │ │ │ │ 0x7ff1e3e31890> │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │ │ del/ExegolContainer.py:193 in exec │ │ │ │ 190 │ │ │ │ # stream[0] : exit code │ │ 191 │ │ │ │ # stream[1] : text stream │ │ 192 │ │ │ │ for log in stream[1]: │ │ ❱ 193 │ │ │ │ │ logger.raw(log.decode("utf-8")) │ │ 194 │ │ │ │ if not quiet: │ │ 195 │ │ │ │ │ logger.success("End of the command") │ │ 196 │ │ │ except KeyboardInterrupt: │ │ │ │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │ │ │ as_daemon = True │ │ │ │ command = "echo 'root:f2eNFMe0vKEaFsQjp7o834tTTRcAwf' | chpasswd" │ │ │ │ exec_payload = 'zsh -c \'autoload -Uz compinit; compinit; source │ │ │ │ ~/.zshrc; eval "$CMD"\'' │ │ │ │ is_tmp = False │ │ │ │ log = '\n' │ │ │ │ quiet = True │ │ │ │ self = <exegol.model.ExegolContainer.ExegolContainer object at │ │ │ │ 0x7ff1e3e31890> │ │ │ │ str_cmd = "echo 'root:f2eNFMe0vKEaFsQjp7o834tTTRcAwf' | chpasswd" │ │ │ │ stream = ExecResult(exit_code=0, output='\n') │ │ │ ╰──────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'str' object has no attribute 'decode'

Steps To Reproduce

1.exegol start ADAttack full

Exegol Wrapper Version

gol is currently in version v4.3.6
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[D] Pip installation: On ✔                                                      
[D] Git source installation: Off 🪓                                             
[D] Host OS: Linux (Kernel)                                                     
[D] Arch: amd64                                                                 
[D] Raw arch: x86_64                                                            
[D] Docker desktop: Off 🪓                                                      
[D] Shell type: Linux                                                           
[D] Last wrapper update check: 20/10/2024

Host OS

Linux

Configuration of the concerned container

Container summary                                        
┌──────────────────┬───────────────────────────────────────┐
│             Name │ ADGoad                                │
│            Image │ full - v.3.1.5 (Outdated)             │
├──────────────────┼───────────────────────────────────────┤
│      Credentials │ root : f2eNFMe0vKEaFsQjp7o834tTTRcAwf │
│   Remote Desktop │ Off 🪓                                │
│      Console GUI │ On ✔ (X11)                            │
│          Network │ host                                  │
│         Timezone │ On ✔                                  │
│ Exegol resources │ On ✔ (/opt/resources)                 │
│     My resources │ On ✔ (/opt/my-resources)              │
│    Shell logging │ Off 🪓                                │
│       Privileged │ Off ✔                                 │
│        Workspace │ Dedicated (/workspace)                │
└──────────────────┴───────────────────────────────────────┘

Execution logs in debug mode

[*] Exegol is currently in version v4.3.6
[*] Exegol Discord serv.: https://discord.gg/cXThyp7D6P
[*] Exegol documentation: https://exegol.rtfd.io/
[D] Pip installation: On ✔                                                      
[D] Git source installation: Off 🪓                                             
[D] Host OS: Linux (Kernel)                                                     
[D] Arch: amd64                                                                 
[D] Raw arch: x86_64                                                            
[D] Docker desktop: Off 🪓                                                      
[D] Shell type: Linux                                                           
[D] Last wrapper update check: 20/10/2024                                       

[*] Starting exegol                                                             
[*] Arguments supplied with the command, skipping interactive mode              
[D] Attribute not found in parameters: multicontainertag                        
[V] Configuring new exegol container                                            
[D] Attribute not found in parameters: multiimagetag                            
[D] Current 'full' image is version specific but no version tag were found!     
[D] └── full    → (remote)                                                      
[V] Config: Enabling display sharing                                            
[V] Config: Enabling host timezones                                             
[V] Volume was successfully added for /etc/timezone                             
[V] Volume was successfully added for /etc/localtime                            
[V] Config: Enabling my-resources volume                                        
[V] Updating the permissions of /home/parrot/.exegol/my-resources (and          
sub-folders) to allow file sharing between the container and the host user      
[D] Adding setgid permission recursively on directories from                    
/home/parrot/.exegol/my-resources                                               
[D] Loading git at /home/parrot/.exegol/exegol-resources                        
[D] Repo path: /home/parrot/.exegol/exegol-resources/.git                       
[D] Git repository successfully loaded                                          
[V] Config: Enabling exegol resources volume                                    

⭐ Container summary                                                            
┌──────────────────┬───────────────────────────────────────────────────────────┐
│             Name │ ADGoad1                                                   │
│            Image │ full - v.3.1.5 (Outdated) (amd64)                         │
├──────────────────┼───────────────────────────────────────────────────────────┤
│      Credentials │ root : oax0adLTxw0vl5qcy0aTIp79jHcwTE                     │
│   Remote Desktop │ Off 🪓                                                    │
│      Console GUI │ On ✔ (X11)                                                │
│          Network │ host                                                      │
│         Timezone │ On ✔                                                      │
│ Exegol resources │ On ✔ (/opt/resources)                                     │
│     My resources │ On ✔ (/opt/my-resources)                                  │
│    Shell logging │ Off 🪓                                                    │
│       Privileged │ Off ✔                                                     │
│        Workspace │ Dedicated (/workspace)                                    │
│             Envs │ DISPLAY=:0                                                │
│                  │ _JAVA_AWT_WM_NONREPARENTING=1                             │
│                  │ QT_X11_NO_MITSHM=1                                        │
│          Volumes │ (RO)                                                      │
│                  │ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/sit… │
│                  │ ➡ /.exegol/spawn.sh                                       │
│                  │ (RW) /tmp/.X11-unix ➡ /tmp/.X11-unix                      │
│                  │ (RO) /etc/timezone ➡ /etc/timezone                        │
│                  │ (RO) /etc/localtime ➡ /etc/localtime                      │
│                  │ (RW) /home/parrot/.exegol/my-resources ➡                  │
│                  │ /opt/my-resources                                         │
│                  │ (RW) /home/parrot/.exegol/exegol-resources ➡              │
│                  │ /opt/resources                                            │
└──────────────────┴───────────────────────────────────────────────────────────┘

[*] Creating new exegol container                                               
[V] Updating the permissions of /home/parrot/.exegol/workspaces/ADGoad1 (and    
sub-folders) to allow file sharing between the container and the host user      
[D] Adding setgid permission recursively on directories from                    
/home/parrot/.exegol/workspaces/ADGoad1                                         
[D] ADGoad1 - full                                                              
Privileged: False                                                               
Capabilities: []                                                                
Sysctls: {}                                                                     
X: True                                                                         
TTY: True                                                                       
Network host: host                                                              
Ports: {}                                                                       
Share timezone: True                                                            
Common resources: True                                                          
Envs (3): DISPLAY                                                               
_JAVA_AWT_WM_NONREPARENTING                                                     
QT_X11_NO_MITSHM                                                                
Labels (0):                                                                     
Shares (7): {'Target': '/.exegol/spawn.sh', 'Source':                           
'/home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/utils
/imgsync/spawn.sh', 'Type': 'bind', 'ReadOnly': True}                           
{'Target': '/tmp/.X11-unix', 'Source': '/tmp/.X11-unix', 'Type': 'bind',        
'ReadOnly': False}                                                              
{'Target': '/etc/timezone', 'Source': '/etc/timezone', 'Type': 'bind',          
'ReadOnly': True}                                                               
{'Target': '/etc/localtime', 'Source': '/etc/localtime', 'Type': 'bind',        
'ReadOnly': True}                                                               
{'Target': '/opt/my-resources', 'Source': '/home/parrot/.exegol/my-resources',  
'Type': 'bind', 'ReadOnly': False}                                              
{'Target': '/opt/resources', 'Source': '/home/parrot/.exegol/exegol-resources', 
'Type': 'bind', 'ReadOnly': False}                                              
{'Target': '/workspace', 'Source': '/home/parrot/.exegol/workspaces/ADGoad1',   
'Type': 'bind', 'ReadOnly': False}                                              
Devices (0):                                                                    
VPN: N/A                                                                        
[D] Entrypoint: ['/bin/bash', '/.exegol/entrypoint.sh']                         
[D] Cmd: ['load_setups', 'endless']                                             
[+] Exegol container successfully created !                                     
[D] Loading container: exegol-ADGoad1                                           
[D] └── Parsing envs : DISPLAY=:0                                               
[D] └── Parsing envs : _JAVA_AWT_WM_NONREPARENTING=1                            
[D] └── Parsing envs :                                                          
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin               
[D] └── Parsing envs : TERM=xterm                                               
[D] └── Parsing envs : container=podman                                         
[D] └── Parsing envs : QT_X11_NO_MITSHM=1                                       
[D] └── Parsing envs : EXEGOL_RANDOMIZE_SERVICE_PORTS=true                      
[D] └── Parsing envs : HOSTNAME=exegol-ADGoad1                                  
[D] └── Parsing label : org.exegol.app                                          
[D] └── Parsing label : org.exegol.build_date                                   
[D] └── Parsing label : org.exegol.metadata.creation_date                       
[D] └── Parsing label : org.exegol.metadata.passwd                              
[D] └── Parsing label : org.exegol.src_repository                               
[D] └── Parsing label : org.exegol.tag                                          
[D] └── Parsing label : org.exegol.version                                      
[D] └── Capabilities : []                                                       
[D] └── Load devices : []                                                       
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/tmp/.X11-unix',            
'Destination': '/tmp/.X11-unix', 'Mode': '', 'RW': True, 'Propagation':         
'rprivate'}                                                                     
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/timezone',             
'Destination': '/etc/timezone', 'Mode': '', 'RW': False, 'Propagation':         
'rprivate'}                                                                     
[D] └── Parsing mount : {'Type': 'bind', 'Source': '/etc/localtime',            
'Destination': '/etc/localtime', 'Mode': '', 'RW': False, 'Propagation':        
'rprivate'}                                                                     
[D] └── Parsing mount : {'Type': 'bind', 'Source':                              
'/home/parrot/.exegol/my-resources', 'Destination': '/opt/my-resources', 'Mode':
'', 'RW': True, 'Propagation': 'rprivate'}                                      
[D] └── Parsing mount : {'Type': 'bind', 'Source':                              
'/home/parrot/.exegol/exegol-resources', 'Destination': '/opt/resources',       
'Mode': '', 'RW': True, 'Propagation': 'rprivate'}                              
[D] └── Parsing mount : {'Type': 'bind', 'Source':                              
'/home/parrot/.exegol/workspaces/ADGoad1', 'Destination': '/workspace', 'Mode': 
'', 'RW': True, 'Propagation': 'rprivate'}                                      
[D] └── Loading workspace volume source :                                       
/home/parrot/.exegol/workspaces/ADGoad1                                         
[D] └── Private workspace detected                                              
[D] └── Parsing mount : {'Type': 'bind', 'Source':                              
'/home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/utils
/imgsync/spawn.sh', 'Destination': '/.exegol/spawn.sh', 'Mode': '', 'RW': False,
'Propagation': 'rprivate'}                                                      
[D] Adding xhost ACL to local:root                                              
[D] Entrypoint script path:                                                     
/home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/utils/
imgsync/entrypoint.sh                                                           
[D] Container log stream timed-out                                              
[D] Updating the root password inside the container                             
[-] It seems that something unexpected happened ...                             
[-] To draw our attention to the problem and allow us to fix it, you can share  
your error with us (by copying and pasting it with this syntax:  <error> ```)
by creating a GitHub issue at this address:                                     
https://github.com/ThePorgs/Exegol/issues                                       
[+] Thank you for your collaboration!                                           
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolManager.py:397 in __loadOrCreateContainer                        │
│                                                                              │
│   394 │   │   │   │   │   │   │   │   raise NotImplemented                   │
│   395 │   │   │   │   else:                                                  │
│   396 │   │   │   │   │   assert container_tag is not None                   │
│ ❱ 397 │   │   │   │   │   cls.__container = DockerUtils().getContainer(conta │
│   398 │   │   except (ObjectNotFound, IndexError):                           │
│   399 │   │   │   # ObjectNotFound is raised when the container_tag provided │
│   400 │   │   │   # IndexError is raise when no container exist (raised from │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │                cls = <class                                              │ │
│ │                      'exegol.manager.ExegolManager.ExegolManager'>       │ │
│ │      container_tag = 'ADGoad1'                                           │ │
│ │     container_tags = None                                                │ │
│ │           multiple = False                                               │ │
│ │         must_exist = False                                               │ │
│ │ override_container = None                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ut │
│ ils/DockerUtils.py:186 in getContainer                                       │
│                                                                              │
│   183 │   │   │   │   lowered_tag = tag.lower()                              │
│   184 │   │   │   │   if lowered_tag != tag:                                 │
│   185 │   │   │   │   │   return self.getContainer(lowered_tag)              │
│ ❱ 186 │   │   │   raise ObjectNotFound                                       │
│   187 │   │   # Filter results with exact name matching                      │
│   188 │   │   for c in container:                                            │
│   189 │   │   │   if c.name == f"exegol-{tag}":                              │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ container = []                                                           │ │
│ │      self = <exegol.utils.DockerUtils.DockerUtils object at              │ │
│ │             0x7fc8ee37f190>                                              │ │
│ │       tag = 'ADGoad1'                                                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
ObjectNotFound

During handling of the above exception, another exception occurred:

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolController.py:68 in main                                         │
│                                                                              │
│   65 │   │   # Set logger verbosity depending on user input                  │
│   66 │   │   ExeLog.setVerbosity(ParametersManager().verbosity, ParametersMa │
│   67 │   │   # Start Main controller & Executing action selected by user CLI │
│ ❱ 68 │   │   ExegolController.call_action()                                  │
│   69 │   except KeyboardInterrupt:                                           │
│   70 │   │   logger.empty_line()                                             │
│   71 │   │   logger.info("Exiting")                                          │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolController.py:48 in call_action                                  │
│                                                                              │
│   45 │   │   │   # Fetch main operation function                             │
│   46 │   │   │   main_action = cls.__action()                                │
│   47 │   │   │   # Execute main function                                     │
│ ❱ 48 │   │   │   main_action()                                               │
│   49 │   │   else:                                                           │
│   50 │   │   │   # TODO review required parameters                           │
│   51 │   │   │   logger.error(f"These parameters are mandatory but missing:  │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │            cls = <class                                                  │ │
│ │                  'exegol.manager.ExegolController.ExegolController'>     │ │
│ │    main_action = <bound method ExegolManager.start of <class             │ │
│ │                  'exegol.manager.ExegolManager.ExegolManager'>>          │ │
│ │ missing_params = []                                                      │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolManager.py:75 in start                                           │
│                                                                              │
│    72 │   │   cls.__interactive_mode = not bool(ParametersManager().containe │
│    73 │   │   if not cls.__interactive_mode:                                 │
│    74 │   │   │   logger.info("Arguments supplied with the command, skipping │
│ ❱  75 │   │   container = cls.__loadOrCreateContainer()                      │
│    76 │   │   assert container is not None and type(container) is ExegolCont │
│    77 │   │   if not container.isNew():                                      │
│    78 │   │   │   # Check and warn user if some parameters don't apply to th │
│                                                                              │
│ ╭────────────────────────── locals ──────────────────────────╮               │
│ │ cls = <class 'exegol.manager.ExegolManager.ExegolManager'> │               │
│ ╰────────────────────────────────────────────────────────────╯               │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolManager.py:405 in __loadOrCreateContainer                        │
│                                                                              │
│   402 │   │   │   if must_exist:                                             │
│   403 │   │   │   │   logger.warning(f"The container named '{container_tag}' │
│   404 │   │   │   │   return [] if multiple else None                        │
│ ❱ 405 │   │   │   return cls.__createContainer(container_tag)                │
│   406 │   │   assert cls.__container is not None                             │
│   407 │   │   return cast(Union[Optional[ExegolContainer], List[ExegolContai │
│   408                                                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │                cls = <class                                              │ │
│ │                      'exegol.manager.ExegolManager.ExegolManager'>       │ │
│ │      container_tag = 'ADGoad1'                                           │ │
│ │     container_tags = None                                                │ │
│ │           multiple = False                                               │ │
│ │         must_exist = False                                               │ │
│ │ override_container = None                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/ma │
│ nager/ExegolManager.py:526 in __createContainer                              │
│                                                                              │
│   523 │   │   │   │   │   │   "read CLI options with [green]exegol start -h[ │
│   524 │   │                                                                  │
│   525 │   │   container = DockerUtils().createContainer(model)               │
│ ❱ 526 │   │   container.postCreateSetup()                                    │
│   527 │   │   return container                                               │
│   528 │                                                                      │
│   529 │   @classmethod                                                       │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │       cls = <class 'exegol.manager.ExegolManager.ExegolManager'>         │ │
│ │    config = <exegol.model.ContainerConfig.ContainerConfig object at      │ │
│ │             0x7fc8ecf40c10>                                              │ │
│ │ container = <exegol.model.ExegolContainer.ExegolContainer object at      │ │
│ │             0x7fc8ecf23950>                                              │ │
│ │     image = full (3.1.5/3.1.5 amd64) - 57.6GB - ([orange3]Outdated       │ │
│ │             (v.3.1.5)[/orange3], [bright_black]N/A[/bright_black])       │ │
│ │     model = <exegol.model.ExegolContainerTemplate.ExegolContainerTempla… │ │
│ │             object at 0x7fc8ecf41550>                                    │ │
│ │      name = 'ADGoad1'                                                    │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │
│ del/ExegolContainer.py:316 in postCreateSetup                                │
│                                                                              │
│   313 │   │   │   if self.__container.status.lower() == "created":           │
│   314 │   │   │   │   self.__start_container()                               │
│   315 │   │   │   try:                                                       │
│ ❱ 316 │   │   │   │   self.__updatePasswd()                                  │
│   317 │   │   │   except APIError as e:                                      │
│   318 │   │   │   │   if "is not running" in e.explanation:                  │
│   319 │   │   │   │   │   logger.critical("An unexpected error occurred. Exe │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ is_temporary = False                                                     │ │
│ │         self = <exegol.model.ExegolContainer.ExegolContainer object at   │ │
│ │                0x7fc8ecf23950>                                           │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │
│ del/ExegolContainer.py:355 in __updatePasswd                                 │
│                                                                              │
│   352 │   │   """                                                            │
│   353 │   │   if self.config.getPasswd() is not None:                        │
│   354 │   │   │   logger.debug(f"Updating the {self.config.getUsername()} pa │
│ ❱ 355 │   │   │   self.exec(f"echo '{self.config.getUsername()}:{self.config │
│   356                                                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ self = <exegol.model.ExegolContainer.ExegolContainer object at           │ │
│ │        0x7fc8ecf23950>                                                   │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/parrot/.local/pipx/venvs/exegol/lib/python3.11/site-packages/exegol/mo │
│ del/ExegolContainer.py:193 in exec                                           │
│                                                                              │
│   190 │   │   │   │   # stream[0] : exit code                                │
│   191 │   │   │   │   # stream[1] : text stream                              │
│   192 │   │   │   │   for log in stream[1]:                                  │
│ ❱ 193 │   │   │   │   │   logger.raw(log.decode("utf-8"))                    │
│   194 │   │   │   │   if not quiet:                                          │
│   195 │   │   │   │   │   logger.success("End of the command")               │
│   196 │   │   │   except KeyboardInterrupt:                                  │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │    as_daemon = True                                                      │ │
│ │      command = "echo 'root:oax0adLTxw0vl5qcy0aTIp79jHcwTE' | chpasswd"   │ │
│ │ exec_payload = 'zsh -c \'autoload -Uz compinit; compinit; source         │ │
│ │                ~/.zshrc; eval "$CMD"\''                                  │ │
│ │       is_tmp = False                                                     │ │
│ │          log = '\n'                                                      │ │
│ │        quiet = True                                                      │ │
│ │         self = <exegol.model.ExegolContainer.ExegolContainer object at   │ │
│ │                0x7fc8ecf23950>                                           │ │
│ │      str_cmd = "echo 'root:oax0adLTxw0vl5qcy0aTIp79jHcwTE' | chpasswd"   │ │
│ │       stream = ExecResult(exit_code=0, output='\n')                      │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'str' object has no attribute 'decode'

Exception

No response

Anything else?

after this error, a container is create but i have this error when i use command like ping and nmap zsh: operation not permitted:

Dramelac commented 3 weeks ago

Hello I've fix the bug following the error AttributeError: 'str' object has no attribute 'decode' in the new wrapper release. I'm gonna close this ticket for this error but feel free to open a new one or reach us on discord for help if you have any more problem.