knock icon indicating copy to clipboard operation
knock copied to clipboard

"knockpy.py", line 53 problem

Open hridoydh opened this issue 3 years ago • 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+""")?

hridoydh avatar Nov 21 '20 01:11 hridoydh

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 avatar Nov 24 '20 11:11 ZeroDot1

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

nedmarafawi avatar Nov 28 '20 21:11 nedmarafawi

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

Rataash99 avatar Dec 12 '20 22:12 Rataash99

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

velhalsandy avatar Jan 01 '21 11:01 velhalsandy

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.

johnsaigle avatar Mar 26 '21 14:03 johnsaigle