From 9964b41677965aa4f995ba331de1043be15ef5df Mon Sep 17 00:00:00 2001 From: saw-your-packet <38787278+saw-your-packet@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:02:34 +0300 Subject: [PATCH] fix: replaced relative path for bash scripts --- setup.py | 2 +- src/cloudshovel/utils/digger.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index c97259c..ad665c6 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="cloudshovel", - version="1.0.0", + version="1.0.1", author="Eduard Agavriloae", author_email="eduard.agavriloae@hacktodef.com", description="A tool for digging secrets in public AMIs", diff --git a/src/cloudshovel/utils/digger.py b/src/cloudshovel/utils/digger.py index 68a0555..9628adb 100644 --- a/src/cloudshovel/utils/digger.py +++ b/src/cloudshovel/utils/digger.py @@ -1,7 +1,6 @@ import json import time -import concurrent -import boto3 +from pathlib import Path from datetime import datetime from botocore.exceptions import ClientError from colorama import init, Fore, Style @@ -115,7 +114,9 @@ def upload_script_to_bucket(script_name): log_warning(f'Script {script_name} not found in bucket {s3_bucket_name}. Uploading...') - f = open(f'src/cloudshovel/utils/bash_scripts/{script_name}') + base_path = Path(__file__).parent + + f = open(f'{base_path}\\bash_scripts\\{script_name}') script = f.read() f.close()