1
0
mirror of https://github.com/Z4nzu/hackingtool.git synced 2025-07-11 14:30:25 +02:00

Ignore a FileNotFoundError if we are already in the Brute_Force directory

Fixes: #356
This commit is contained in:
Christian Clauss
2023-07-18 09:14:24 +02:00
committed by GitHub
parent 9b900d8779
commit 84bd8407da

View File

@ -1,4 +1,5 @@
# coding=utf-8 # coding=utf-8
import contextlib
import os import os
import subprocess import subprocess
@ -48,7 +49,9 @@ class Faceshell(HackingTool):
def run(self): def run(self):
name = input("Enter Username >> ") name = input("Enter Username >> ")
wordlist = input("Enter Wordlist >> ") 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( subprocess.run(
["python3", "Brute_Force.py", "-f", f"{name}", "-l", f"{wordlist}"]) ["python3", "Brute_Force.py", "-f", f"{name}", "-l", f"{wordlist}"])