From 391c4c6c5215004390562b3cd069973c0a0999a1 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Sun, 16 Jan 2022 23:40:35 +0100 Subject: [PATCH] Bugfix --- find_git_commit.py | 2 +- template.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/find_git_commit.py b/find_git_commit.py index 3559d71..b4c4802 100644 --- a/find_git_commit.py +++ b/find_git_commit.py @@ -133,7 +133,7 @@ def run(files, root_dir, git_dir): found_commit = find_newest_commit(git_dir, f, sha1hash, md5hash, commits) if found_commit: print(f"[+] Commit {found_commit} matches") - if latest_commit is None or commits[found_commit] < latest_ts: + if latest_commit is None or commits[found_commit] > latest_ts: latest_commit = found_commit latest_ts = commits[found_commit] else: diff --git a/template.py b/template.py index 085d52a..fe52f33 100755 --- a/template.py +++ b/template.py @@ -8,6 +8,7 @@ def generateTemplate(baseUrl): import os import sys import json +import time import base64 import requests import subprocess @@ -28,8 +29,14 @@ def request(method, uri, **kwargs): if "session" in kwargs: client = kwargs["session"] del kwargs["session"] + + if "allow_redirects" not in kwargs: + kwargs["allow_redirects"] = False + + if "verify" not in kwargs: + kwargs["verify"] = False - return client.request(method, BASE_URL + uri, verify=False, allow_redirects=False, **kwargs) + return client.request(method, BASE_URL + uri, **kwargs) if __name__ == "__main__": pass