Skip to content

Commit

Permalink
fix: character issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo23x0 committed Mar 4, 2024
1 parent 0dc990b commit f623bee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/lokilogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from logging import handlers
import socket

__version__ = '0.51.0'
__version__ = '0.51.1'


# Logger Class -----------------------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions loki.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,15 +1342,16 @@ def script_stats_analysis(self, data):

# Check the characters
for char in c.most_common():
if char[0] in anomal_chars:
anomal_char_stats[char[0]] = char[1]
if char[0].isupper():
char_str = str(char[0])
if char_str in anomal_chars:
anomal_char_stats[char_str] = char[1]
if char_str.isupper():
char_stats["upper"] += char[1]
elif char[0].islower():
elif char_str.islower():
char_stats["lower"] += char[1]
elif char[0].isdigit():
elif char_str.isdigit():
char_stats["numbers"] += char[1]
elif char[0].isspace():
elif char_str.isspace():
char_stats["spaces"] += char[1]
else:
char_stats["symbols"] += char[1]
Expand Down

0 comments on commit f623bee

Please sign in to comment.