From 9fad880616d1136279bb77ed41378d5f3f0cf912 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 21 Apr 2021 14:25:59 -0700 Subject: [PATCH 1/3] Added .gitignore to protect .venv virtualenv --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d17dae --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.venv From 4248ac31bec432a29882111893bd01efe2b24898 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 21 Apr 2021 14:27:40 -0700 Subject: [PATCH 2/3] Modified script to use virtualenv --- requirements.txt | 4 ++++ script.sh | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..169b8f5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +py-term==0.6 +pyfiglet==0.8.post1 +rarfile==4.0 +termcolor==1.1.0 diff --git a/script.sh b/script.sh index 416abce..a26b556 100644 --- a/script.sh +++ b/script.sh @@ -10,14 +10,12 @@ DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" - sudo apt-get install qpdf -y sudo apt-get install unrar -y -sudo apt-get install python3.7 -y +sudo apt-get install python3.7 -y sudo apt-get install python3-pip -y pip3 --version -pip3 install zipfile -pip3 install rarfile -pip3 install pyfiglet -pip3 install py-term -pip3 install termcolor - +python -m venv .venv +source .venv/bin/activate +pip install pip --upgrade +pip install -r requirements.txt cd /vagrant/ From 0e8f2727a9262a7bed840dbfc58e8070352cc932 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 21 Apr 2021 22:28:09 -0700 Subject: [PATCH 3/3] -m and -x should be int for comparison to succeed --- Zydra.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Zydra.py b/Zydra.py index 830b48e..761395a 100644 --- a/Zydra.py +++ b/Zydra.py @@ -584,7 +584,7 @@ def banner(self): # sudo wget http://www.figlet.org/fonts/epic.flf -O /usr/share/figlet/epic.flf bannerfont = "epic" if os.path.exists('/usr/share/figlet/epic.flf') else "banner" banner = pyfiglet.figlet_format("ZYDRA", font=bannerfont).replace("\n", "\n\t\t", 7) - + cprint("\r\n\t" + "@" * 61, "blue", end="") cprint("\n\t\t" + banner + "\t\tAuthor : Hamed Hosseini", "blue", attrs=['bold']) cprint("\t" + "@" * 61 + "\n", "blue") @@ -623,8 +623,8 @@ def main(self): parser.add_option("-d", dest="dictfile", type='string', help="Specifies dictionary file") parser.add_option("-f", dest="file", type='string', help="Specifies the file") parser.add_option("-b", dest="chartype", type='string', help="Specifies the character type") - parser.add_option("-m", dest="minlength", type='string', help="Specifies minimum length of password") - parser.add_option("-x", dest="maxlength", type='string', help="Specifies maximum length of password") + parser.add_option("-m", dest="minlength", type='int', help="Specifies minimum length of password") + parser.add_option("-x", dest="maxlength", type='int', help="Specifies maximum length of password") (options, args) = parser.parse_args() try: