guelfoweb/knock

"knockpy.py", line 53 problem

hridoydh opened this issue · 5 comments

root@kali:/home/kali/Desktop/knock/knockpy# python3 knockpy.py google.com
File "knockpy.py", line 53
print """


| |/ / | | """+version+"""
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""


| |/ / | | """+version+""")?

Traceback (most recent call last):
  File "/usr/bin/knockpy", line 33, in <module>
    sys.exit(load_entry_point('knockpy==4.1.1', 'console_scripts', 'knockpy')())
  File "/usr/bin/knockpy", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 779, in exec_module
  File "<frozen importlib._bootstrap_external>", line 916, in get_code
  File "<frozen importlib._bootstrap_external>", line 846, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/knockpy-4.1.1-py3.8.egg/knockpy/knockpy.py", line 53
    print """
  _  __                 _                
 | |/ /                | |   """+__version__+"""            
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""
  _  __                 _                
 | |/ /   

@ZeroDot1 I have the same error as you. Have you found a fix for it?

I also have the same error,
please let me know if u guys find any fix.

this problem is for all print statement in all python file.

This is probably caused by trying to run the (old) python2 version of the script using python3, as OP has done.

The latest release (5.0.0) works with python3.

Otherwise, you could manually run an older version using the command python or python2 on e.g. Kali instead of python3.