Skip to content

Commit c7608e3

Browse files
being the one who wrote and tested the google cloud client implementation of the pipeline part of the leakdown tester, I am removing the timeout property of the function to improve readability :)
1 parent 3798cca commit c7608e3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

LDT.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def csv_jsoner(path):
343343
### from any content source, and against any of the available API endpoints.
344344

345345
## Send POST request to unprotected URLs...
346-
def send_unprotected_post(pfp, fullMessage):
346+
def send_post(pfp, fullMessage):
347347
log.debug("\tRunning 'send_unprotected_post'...")
348348
header = {"Content-Type": "application/json"}
349349
response = requests.post(pfp, data=fullMessage, headers=header)
@@ -352,12 +352,9 @@ def send_unprotected_post(pfp, fullMessage):
352352

353353

354354
## Send POST request to IAP protected URLs...
355-
def send_iap_post(url, fullMessage, method="POST", **kwargs):
355+
def send_iap_post(url, fullMessage, method="POST"):
356356
log.debug("\tRunning 'send_iap_post'...")
357-
# Set the default timeout, if missing
358-
if "timeout" not in kwargs:
359-
kwargs["timeout"] = 90
360-
357+
361358
# Check if token valid, refresh expired token if not
362359
if oidcToken.valid != True:
363360
request = google.auth.transport.requests.Request()
@@ -380,7 +377,7 @@ def post_and_respond(fullMessage, requestID):
380377
log.debug("\tRunning 'post_and_respond'...")
381378
try:
382379
if args.target != "cloud":
383-
sentPost = send_unprotected_post(pfp, fullMessage)
380+
sentPost = send_post(pfp, fullMessage)
384381

385382
elif args.target == "cloud":
386383
sentPost = send_iap_post(pfp, fullMessage)

0 commit comments

Comments
 (0)