Skip to content

Commit aa63fb1

Browse files
authored
Add files via upload
1 parent 24e76d9 commit aa63fb1

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

Scripts/Network Tools/DedSec's Network.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,14 +263,21 @@ def website_downloader(self):
263263

264264
# Directory Setup
265265
if self.is_termux:
266-
storage_path = "/sdcard/Download/Websites"
266+
primary_storage_path = "/storage/emulated/0/Download/Websites"
267+
fallback_storage_path = "/sdcard/Download/Websites"
268+
storage_path = primary_storage_path
269+
try:
270+
os.makedirs(storage_path, exist_ok=True)
271+
except Exception:
272+
storage_path = fallback_storage_path
273+
try:
274+
os.makedirs(storage_path, exist_ok=True)
275+
except Exception:
276+
storage_path = os.path.join(self.save_dir, "Websites")
277+
os.makedirs(storage_path, exist_ok=True)
267278
else:
268279
storage_path = os.path.join(os.path.expanduser("~"), "Downloads", "Websites")
269-
270-
if not os.path.exists(storage_path):
271-
try: os.makedirs(storage_path)
272-
except: storage_path = os.path.join(self.save_dir, "Websites")
273-
if not os.path.exists(storage_path): os.makedirs(storage_path)
280+
os.makedirs(storage_path, exist_ok=True)
274281

275282
url = input(f"{Fore.WHITE}Target URL: {Style.RESET_ALL}").strip()
276283
if not url.startswith('http'): url = 'http://' + url

0 commit comments

Comments
 (0)