Skip to content

Commit

Permalink
Merge pull request #890 from tlsfuzzer/newline-marvin
Browse files Browse the repository at this point in the history
marvin-ciphertext-generator: allow printing status with newlines
  • Loading branch information
tomato42 committed Dec 8, 2023
2 parents a2d1236 + 73aac7e commit dfe0344
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/marvin-ciphertext-generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def help_msg():
print(" Default 1")
print(" --status-delay num How long to wait between status line updates.")
print(" In seconds. Default: 2.0")
print(" --status-newline Use newline for separating lines in the status messages")
print(" --help this message")


Expand All @@ -57,6 +58,7 @@ def main():
pms_tls_version = None
probe_reuse = 1
status_delay = 2.0
carriage_return = None

argv = sys.argv[1:]
opts, args = getopt.getopt(argv,
Expand All @@ -68,6 +70,7 @@ def main():
"srv-cert=",
"pms-tls-version=",
"probe-reuse=",
"status-newline",
"status-delay="])
for opt, arg in opts:
if opt == '-o':
Expand All @@ -94,6 +97,8 @@ def main():
pms_tls_version = divmod(int_ver, 256)
elif opt == "--probe-reuse":
probe_reuse = int(arg)
elif opt == "--status-newline":
carriage_return = '\n'
elif opt == "--status-delay":
status_delay = float(arg)
elif opt == '--help':
Expand Down Expand Up @@ -135,6 +140,7 @@ def main():
status = [0, len(test_classes) * repetitions, Event()]
kwargs = dict()
kwargs['delay'] = status_delay
kwargs['end'] = carriage_return
progress = Thread(target=progress_report, args=(status,),
kwargs=kwargs)
progress.start()
Expand Down

0 comments on commit dfe0344

Please sign in to comment.