Skip to content

Commit

Permalink
Merge pull request #387 from cclauss/patch-3
Browse files Browse the repository at this point in the history
Use Python os.makedirs() instead of os.makedir()
  • Loading branch information
Z4nzu committed Jul 18, 2023
2 parents 64a4603 + 84bd840 commit c9deb21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions hackingtool.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ def show_info(self):

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()

Expand Down
5 changes: 4 additions & 1 deletion tools/others/socialmedia.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding=utf-8
import contextlib
import os
import subprocess

Expand Down Expand Up @@ -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}"])

Expand Down

0 comments on commit c9deb21

Please sign in to comment.