Skip to content

Commit ef332d4

Browse files
committed
fix: bruteforce analysis output error
1 parent 48d23df commit ef332d4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

project/handlers.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,15 @@ def brute_freq_handler(args):
9292
# Write to the file,
9393
# If an output path specified
9494
if args.output:
95-
write_file(analyzed, args.output)
95+
s = ''
96+
found = False
97+
for i in analyzed:
98+
if analyzed[i] > 60:
99+
s += f'{round(analyzed[i], 1)}% : {i}\n'
100+
found = True
101+
if not found:
102+
s = f'No Matching Sentences Found For The Given Wordlist'
103+
write_file(s, args.output)
96104
else:
97105
found = False
98106
for i in analyzed:

0 commit comments

Comments
 (0)