Skip to content

Commit

Permalink
DC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek committed Sep 16, 2024
1 parent b56845c commit c79499a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions credsweeper/filters/value_discord_bot_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def run(self, line_data: LineData, target: AnalysisTarget) -> bool:
"""
with contextlib.suppress(Exception):
parts = line_data.value.split('.')
if int(Util.decode_base64(parts[0], padding_safe=True, urlsafe_detect=True)):
# . must be in value according regex
dot_separator_index = line_data.value.index('.')
id_part = line_data.value[:dot_separator_index]
if int(Util.decode_base64(id_part, padding_safe=True, urlsafe_detect=True)):
return False
return True

0 comments on commit c79499a

Please sign in to comment.