Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
congaterori opened this issue Aug 25, 2021 · 8 comments

Comments

@congaterori
Copy link

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
Copy link
Contributor

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

@congaterori
Copy link
Author

congaterori commented Sep 16, 2021 via email

@congaterori
Copy link
Author

congaterori commented Sep 16, 2021 via email

@eljeffeg
Copy link
Contributor

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

@congaterori
Copy link
Author

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
Copy link
Contributor

eljeffeg commented Sep 16, 2021

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.

@congaterori
Copy link
Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants