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 syntax print command in hacktronian.py #34

Open
NetiSHTer22 opened this issue Dec 21, 2021 · 6 comments
Open

Error syntax print command in hacktronian.py #34

NetiSHTer22 opened this issue Dec 21, 2021 · 6 comments

Comments

@NetiSHTer22
Copy link

File "/usr/share/doc/hacktronian/hacktronian.py", line 82
print """
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(""")?

Check this...

@risyadfahlevi
Copy link

im also to same error
File "/usr/share/doc/hacktronian/hacktronian.py", line 82
print """
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(""")?

@Hustleboibam
Copy link

Hustleboibam commented Mar 21, 2022 via email

@SecurityJos
Copy link

solved it with running the older python version on the kali server if you run version 2.7.18 it works correctly
https://www.kali.org/docs/general-use/using-eol-python-versions/#pyenv

@MrAppAndCrap
Copy link

solved it with running the older python version on the kali server if you run version 2.7.18 it works correctly https://www.kali.org/docs/general-use/using-eol-python-versions/#pyenv

That doesn't seem to be working for me.

@SecurityJos
Copy link

what is the issue you run into on this moment is it the same with the print issue?

did you check the version of python you are running on this moment when you try to start it?
image

@punkrock4dadz
Copy link

If you have several versions of Python installed, /usr/bin/env will ensure the interpreter used is the first one on your environment's $PATH. The alternative would be to hard code something like #!/usr/bin/python.

In Unix, an executable file that's meant to be interpreted can indicate what interpreter to use by having a #! at the start of the first line, followed by the interpreter (and any flags it may need).

LINE ONE OF hacktronian.py:

#!/usr/bin/env python2.7.18

In computing, a shebang (also called a hashbang, hashpling, pound bang, or crunchbang) refers to the characters "#!" when they are the first two characters in an interpreter directive as the first line of a text file. In a Unix-like operating system, the program loader takes the presence of these two characters as an indication that the file is a script, and tries to execute that script using the interpreter specified by the rest of the first line in the file.

In summary, this needs to be executed by python 2.7.18 because of indents and unindented blocks.

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

6 participants