Skip to content

Commit

Permalink
fix format string
Browse files Browse the repository at this point in the history
  • Loading branch information
hellman committed Jul 16, 2022
1 parent 0410f90 commit c01ec91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "xortool"
version = "1.0.0"
version = "1.0.2"
description = "A tool to analyze multi-byte xor cipher"
authors = ["hellman"]
license = "MIT"
Expand Down
5 changes: 3 additions & 2 deletions xortool/tool_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,10 @@ def produce_plaintexts(ciphertext, keys, key_char_used):
perc_mapping.close()

fmt = "Found {C_COUNT}{:d}{C_RESET} plaintexts with {C_COUNT}{:d}{C_RESET}%+ valid characters"
msg = fmt.format(count_valid, round(threshold_valid), **COLORS)
if PARAMETERS["known_plain"]:
fmt += " which contained '{}'".format(PARAMETERS["known_plain"].decode('ascii'))
print(fmt.format(count_valid, round(threshold_valid), **COLORS))
msg += " which contained '{}'".format(PARAMETERS["known_plain"].decode('ascii'))
print(msg)
print("See files {}, {}".format(fn_key_mapping, fn_perc_mapping))


Expand Down

0 comments on commit c01ec91

Please sign in to comment.