mirror of
https://github.com/Z4nzu/hackingtool
synced 2026-05-23 08:58:22 +00:00
Ignore a FileNotFoundError if we are already in the Brute_Force directory
Fixes: #356
This commit is contained in:
parent
9b900d8779
commit
84bd8407da
1 changed files with 4 additions and 1 deletions
|
|
@ -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}"])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue