1
0
mirror of https://github.com/Z4nzu/hackingtool.git synced 2025-06-20 06:15:54 +02:00

Merge pull request #387 from cclauss/patch-3

Use Python os.makedirs() instead of os.makedir()
This commit is contained in:
Hardik Zinzuvadiya
2023-07-18 14:17:13 +05:30
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@ -102,8 +102,7 @@ if __name__ == "__main__":
with open(fpath) as f:
archive = f.readline()
if not os.path.exists(archive):
os.mkdir(archive)
os.mkdirs(archive, exist_ok=True)
os.chdir(archive)
AllTools().show_options()

View File

@ -1,4 +1,5 @@
# coding=utf-8
import contextlib
import os
import subprocess
@ -48,7 +49,9 @@ class Faceshell(HackingTool):
def run(self):
name = input("Enter Username >> ")
wordlist = input("Enter Wordlist >> ")
os.chdir("Brute_Force")
# Ignore a FileNotFoundError if we are already in the Brute_Force directory
with contextlib.suppress(FileNotFoundError):
os.chdir("Brute_Force")
subprocess.run(
["python3", "Brute_Force.py", "-f", f"{name}", "-l", f"{wordlist}"])