This commit is contained in:
Michael Meidlinger 2024-04-04 06:47:15 +08:00 committed by GitHub
commit 7c09b7c73e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -512,6 +512,9 @@ def list_target_files(config):
# connect to the region & bucket # connect to the region & bucket
try: try:
if config['target_user'] == "" and config['target_pass'] == "":
s3 = boto3.client('s3', endpoint_url=f'https://{target.hostname}')
else:
s3 = boto3.client('s3', \ s3 = boto3.client('s3', \
endpoint_url=f'https://{target.hostname}', \ endpoint_url=f'https://{target.hostname}', \
aws_access_key_id=config['target_user'], \ aws_access_key_id=config['target_user'], \