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 in print("probably not vulnerable (error: {0:s})".format(v)) #109

Open
InfoLibre opened this issue Feb 5, 2023 · 3 comments
Open

Comments

@InfoLibre
Copy link

$python3 poc.py --get_credentials --ip $(ip route|grep -Eo 'default via ([0-9.]+)'|sed 's/default via //')
Traceback (most recent call last):
  File "/home/david/Bureau/poc.py", line 58, in <module>
    s.connect((args.ip, args.port))
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/david/Bureau/poc.py", line 60, in <module>
    print("probably not vulnerable (error: {0:s})".format(v))
TypeError: unsupported format string passed to TimeoutError.__format__
@dsoares
Copy link

dsoares commented Feb 6, 2023

What version of python are you using? (python3 -V)

@InfoLibre
Copy link
Author

Python 3.10.6

@dsoares
Copy link

dsoares commented Feb 8, 2023

(this is a code suggestion)
The code should use the preferred python way to format strings (since 3.6):

print(f"probably not vulnerable (error: {v})")

or just fix to:

print("probably` not vulnerable (error: {0})".format(v))

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