Required Resources...
For this demonstration, we will need a Kali Linux system, Internet Access to obtain a package titled FIGlet and root access.
FIGlet...
As per the FIGlet man page, FIGlet prints its input using large characters (called ``FIGcharac- ters'')made up of ordinary screen characters (called ``sub-charac- ters''). FIGlet can print in a variety of fonts, both left-to-right and right- to-left, with adjacent FIGcharacters kerned and ``smushed'' together in various ways. FIGlet fonts are stored in separate files, which can be identified by the suffix ``.flf''. FIGlet can also use ``control files'', which tell it to map certain input characters to certain other characters, similar to the Unix tr command. Complete details can be found here.
Demonstration in a nutshell...
For this demonstration, we will need a Kali Linux system, Internet Access to obtain a package titled FIGlet and root access.
FIGlet...
As per the FIGlet man page, FIGlet prints its input using large characters (called ``FIGcharac- ters'')made up of ordinary screen characters (called ``sub-charac- ters''). FIGlet can print in a variety of fonts, both left-to-right and right- to-left, with adjacent FIGcharacters kerned and ``smushed'' together in various ways. FIGlet fonts are stored in separate files, which can be identified by the suffix ``.flf''. FIGlet can also use ``control files'', which tell it to map certain input characters to certain other characters, similar to the Unix tr command. Complete details can be found here.
Demonstration in a nutshell...
- Boot Kali Linux with Internet Access
- Obtaing FIGlet with apt-get install
- Edit the bashrc file with our custom FIGlet Characters
- Launch bash and Confirm
1. Boot Kali Linux with Internet Access
Boot Kali Linux and be sure to have Internet access. I am utilizing a VM and have placed the machine adapter in a Bridged" state.
Boot Kali Linux and be sure to have Internet access. I am utilizing a VM and have placed the machine adapter in a Bridged" state.
Once booted and authenticated, I will confirm access to the Internet by pinging Googles DNS server at 8.8.8.8.
Linux Commands
root@kali:~# ping 8.8.8.8
2. Obtain FIGlet with apt-get install
We will use FIGlet to place our banner in the bashrc file. To do so, let's leverage apt-get install to obtain it through our repositories.
root@kali:~# apt-get install figlet
We will use FIGlet to place our banner in the bashrc file. To do so, let's leverage apt-get install to obtain it through our repositories.
root@kali:~# apt-get install figlet
Enter "Y" to accept the package installation. Install will complete and you will be returned to your root@kali:~# prompt.
3. Edit the bashrc file with our custom FIGlet Characters
Let's confirm FIGlet's functionality with the following command:
root@kali:~# figlet "Hello World"
Let's confirm FIGlet's functionality with the following command:
root@kali:~# figlet "Hello World"
Basic options/switches to use with figlet:
- man figlet will display the man page
- showfigfonts will output font examples to terminal
- -f allows you to specify the font to use for your output
- Example: figlet -f block "YourTextHere"
- -c will center the output
- You can leverage figlet to display a day/time format to your terminal with the following:
- watch -n1 "date '+%D%n%T'|figlet -k"
Explore the app and have some fun! But back to our purpose here...Let's edit the bash with a banner now!
root@kali:~# gedit /etc/bash.bashrc
You WILL need root access the edit the file so you may need to proceed the command with sudo.
Head to the bottom of the file output and enter the following:
figlet "YourTextHere"
Then save the file and close the terminal.
Head to the bottom of the file output and enter the following:
figlet "YourTextHere"
Then save the file and close the terminal.
4. Launch bash and Confirm!
Let's close out the terminal and confirm the banner has been added.
Let's close out the terminal and confirm the banner has been added.
That's it folks! Have fun!!!