retain trailing zeroes in Cloudflare challenge answers

This commit is contained in:
Mike Fährmann
2019-12-16 15:32:49 +01:00
parent 72b8fbfbad
commit f9e74320de

View File

@@ -104,8 +104,7 @@ def solve_js_challenge(page, netloc):
solution += len(netloc)
if ".toFixed(" in expr:
# trim solution to 10 decimal places
# and strip trailing zeros
solution = "{:.10f}".format(solution).rstrip("0")
solution = "{:.10f}".format(solution)
return solution