Skip to content

Commit 791fabd

Browse files
authored
Merge pull request #8 from butterflyx/master
fix missing figlet font
2 parents 60ed021 + 0c1c717 commit 791fabd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ zipfile, rarfile, crypt, pyfiglet, py-term(for term module) and so on.
1818
you can use pip3 for install them
1919
example: <br />```$ pip3 install py-term```
2020
<br />**notice**: rar,zip and pdf files must have an extension, shadow files does not need an extension.
21+
* Install figlet font "epic" if it does not exists on your system:
22+
<br/> ```sudo wget http://www.figlet.org/fonts/epic.flf -O /usr/share/figlet/epic.flf```
2123
## Disclaimer
2224
This tool is only for testing and academic purposes Do not use it for illegal purposes!
2325
## Features

Zydra.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,11 @@ def make_chars(self, char_type):
580580
def banner(self):
581581
term.clear()
582582
term.pos(1, 1)
583-
banner = pyfiglet.figlet_format("ZYDRA", font="epic").replace("\n", "\n\t\t", 7)
583+
# check if font "epic" exists on this system
584+
# sudo wget http://www.figlet.org/fonts/epic.flf -O /usr/share/figlet/epic.flf
585+
bannerfont = "epic" if os.path.exists('/usr/share/figlet/epic.flf') else "banner"
586+
banner = pyfiglet.figlet_format("ZYDRA", font=bannerfont).replace("\n", "\n\t\t", 7)
587+
584588
cprint("\r\n\t" + "@" * 61, "blue", end="")
585589
cprint("\n\t\t" + banner + "\t\tAuthor : Hamed Hosseini", "blue", attrs=['bold'])
586590
cprint("\t" + "@" * 61 + "\n", "blue")

0 commit comments

Comments
 (0)