JohnHammond / katana

Katana - Automatic CTF Challenge Solver in Python3
Other
1.27k stars 182 forks source link

error when run katana --force -f "FLAG{.*?}" "RkxBR3t0aGlzX2lzX2FfYmFzZTY0X2ZsYWd9" #35

Open congaterori opened 3 years ago

congaterori commented 3 years ago

Traceback (most recent call last): File "/home/kali/katana/env/bin/katana", line 6, in from pkg_resources import load_entry_point File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3252, in def _initialize_master_working_set(): File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pytesseract' distribution was not found and is required by katana

eljeffeg commented 3 years ago

Appears to be in the requirements https://github.com/JohnHammond/katana/blob/master/requirements.txt Maybe run a pip install -r requirements.txt?

congaterori commented 3 years ago

WARNING: The script pybabel is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The scripts sphinx-apidoc, sphinx-autogen, sphinx-build and sphinx-quickstart are installed in '/home/kali/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script factordb is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script watchmedo is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script read_zbar is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script pytesseract is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script dulwich is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

WARNING: The script base58 is installed in '/home/kali/.local/bin' which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

congaterori commented 3 years ago

Traceback (most recent call last): File "/home/kali/katana/env/bin/katana", line 6, in from pkg_resources import load_entry_point File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3252, in def _initialize_master_working_set(): File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 583, in _build_master ws.require(requires) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'pytesseract' distribution was not found and is required by katana

Vào Th 4, 15 thg 9, 2021 vào lúc 04:04 ElJeffe @.***> đã viết:

Appears to be in the requirements https://github.com/JohnHammond/katana/blob/master/requirements.txt Maybe run a pip install -r requirements.txt?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JohnHammond/katana/issues/35#issuecomment-919511183, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALCRLE2FX5WVV734573ZXZ3UB62ETANCNFSM5CYDVSSQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

eljeffeg commented 3 years ago

Have you tried "Consider adding this directory to PATH"? Run export PATH=$PATH:/home/kali/.local/bin

congaterori commented 3 years ago

Have you tried "Consider adding this directory to PATH"? Run export PATH=$PATH:/home/kali/.local/bin

still have error

──(env)─(kali㉿kali)-[~/katana] └─$ katana --force -f "FLAG{.*?}" "RkxBR3t0aGlzX2lzX2FfYmFzZTY0X2ZsYWd9"

Traceback (most recent call last): File "/home/kali/katana/env/bin/katana", line 11, in load_entry_point('katana==2.0', 'console_scripts', 'katana')() File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 2852, in load_entry_point return ep.load() File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 2443, in load return self.resolve() File "/home/kali/katana/env/lib/python3.9/site-packages/pkg_resources/init.py", line 2449, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/kali/katana/env/lib/python3.9/site-packages/katana-2.0-py3.9.egg/katana/main.py", line 10, in from katana.repl import Repl, ReplMonitor File "/home/kali/katana/env/lib/python3.9/site-packages/katana-2.0-py3.9.egg/katana/repl/init.py", line 301, in class Repl(cmd2.Cmd): File "/home/kali/katana/env/lib/python3.9/site-packages/katana-2.0-py3.9.egg/katana/repl/init.py", line 587, in Repl monitor_remove_parser.add_argument( File "/home/kali/katana/env/lib/python3.9/site-packages/cmd2/argparse_custom.py", line 847, in _add_argument_wrapper new_arg = orig_actions_container_add_argument(self, *args, kwargs) File "/usr/lib/python3.9/argparse.py", line 1428, in add_argument action = action_class(kwargs) TypeError: init() got an unexpected keyword argument 'choices_method'

eljeffeg commented 3 years ago

That's a bug due to a dependency update. See issue #33. It can be resolved by downgrading cmd2 to 1.x.

pip uninstall cmd2
pip install cmd2=='1.0.1'

Or by applying the changes in PR https://github.com/JohnHammond/katana/pull/39 which is pending merge approval.

congaterori commented 3 years ago

That's a bug due to a dependency update. See issue #33. It can be resolved by downgrading cmd2 to 1.x.

pip uninstall cmd2
pip install cmd2=='1.0.1'

Or by applying the changes in PR #39 which is pending merge approval.

──(kali㉿kali)-[~/katana] └─$ python katana --force -f "FLAG{.*?}" "RkxBR3t0aGlzX2lzX2FfYmFzZTY0X2ZsYWd9" Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 165, in _run_module_as_main mod_name, loader, code, fname = _get_main_module_details(_Error) File "/usr/lib/python2.7/runpy.py", line 133, in _get_main_module_details return _get_module_details(main_name) File "/usr/lib/python2.7/runpy.py", line 119, in _get_module_details code = loader.get_code(mod_name) File "/usr/lib/python2.7/pkgutil.py", line 281, in get_code self.code = compile(source, self.filename, 'exec') File "/home/kali/katana/katana/main.py", line 169 repl.pwarning(f"{unit}: missing binary dependency: {dep}") ^ SyntaxError: invalid syntax

eljeffeg commented 3 years ago

Katana is a Python 3 application and likely not backward compatible with Python 2.7. Try python3 katana --force -f "FLAG{.*?}" "RkxBR3t0aGlzX2lzX2FfYmFzZTY0X2ZsYWd9". You may have to install the requirement modules in Python 3 if it doesn't have them as they're separate. See the readme as it's also good practice to use a venv.