Skip to content

Commit

Permalink
add the .md5 file extension before any URL parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
petiepooo committed Feb 23, 2021
1 parent a97393d commit d2988a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions idstools/scripts/rulecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ def __init__(self, args):
def check_checksum(self, tmp_filename, url):
try:
checksum_url = url + ".md5"
url_parts = url.split("?")
if len(url_parts) == 2:
checksum_url = ".md5?".join(url_parts)
local_checksum = hashlib.md5(
open(tmp_filename, "rb").read()).hexdigest().strip()
remote_checksum_buf = io.BytesIO()
Expand Down

0 comments on commit d2988a4

Please sign in to comment.