TCP-32764
TCP-32764 copied to clipboard
Error in print("probably not vulnerable (error: {0:s})".format(v))
$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__
What version of python are you using? (python3 -V
)
Python 3.10.6
(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))