Skip to content

Commit

Permalink
Fix syntax error in git_dumper.py script
Browse files Browse the repository at this point in the history
Corrected syntax error in the environment variable assignment
to resolve the unmatched '[' in the f-string.
  • Loading branch information
Cmbrlnd authored and arthaud committed Mar 17, 2024
1 parent 1df41e9 commit 2d6fa4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion git_dumper.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,15 @@ def fetch_git(url, directory, jobs, retry, timeout, http_headers, client_cert_p1
environment = os.environ.copy()
configured_proxy = socks.getdefaultproxy()
if configured_proxy is not None:
environment["ALL_PROXY"] = f"http.proxy={["http", "socks4h", "socks5h"][configured_proxy[0]]}" + f"://{configured_proxy[1]}:{configured_proxy[2]}"
proxy_types = ["http", "socks4h", "socks5h"]
environment["ALL_PROXY"] = f"http.proxy={proxy_types[configured_proxy[0]]}://{configured_proxy[1]}:{configured_proxy[2]}"

# check for directory listing
printf("[-] Testing %s/.git/ ", url)
response = session.get("%s/.git/" % url, allow_redirects=False)
printf("[%d]\n", response.status_code)


if (
response.status_code == 200
and is_html(response)
Expand Down

0 comments on commit 2d6fa4f

Please sign in to comment.