code: def attemptCrack(self, ctext: str) -> List[CrackResult]:
      logging.debug("Trying xortool cipher")
      # TODO handle different charsets
      # TODO allow more config over xortool
  
      logging.debug(f"{ctext}")
  
      # https://github.com/Ciphey/xortool/discussions/4
      # for docs on this function
      try:
          result = tool_main.api(str.encode(ctext))
      except:
          logging.debug("Xor failed.")
          return
  
      result = CrackResult(
          value=result[1]["Dexored"], key_info=result[0]["keys"]
      )
  
      return [result]
  
file_path: Ciphey/ciphey/basemods/Crackers/xortool.py
imports: from typing import Dict, List, Optional
  import logging
  from rich.logging import RichHandler
  from xortool_ciphey import tool_main
  from ciphey.iface import Config, Cracker, CrackInfo, CrackResult, ParamSpec, registry
label_desc: Use image node_id 3 for calling the XorTool obj's underlying member method code with example usage: obj.attemptCrack(ctext) and returns: list