Hey Guys, I hope you are doing absolutely fine, and welcome back to another post. so in this post. I am going to show you “How to Customize Termux like a Pro Hacker using Python?”
if you want to make your Termux application look amazing, like a pro hacker, then this blog is just for you.
But before we start anything, let me give you a brief introduction to Termux. Termux is essentially a terminal emulator that allows us to use it as a terminal for our Android devices. It provides a similar terminal experience to that of Linux machines, such as Kali Linux, Ubuntu, Arch Linux, and more.
With this terminal, we can perform various tasks, including cyber-attacks and computer programming. It offers a command-line interface that significantly helps us speed up our work and makes it easier, just like a computer, but on our Android device.
In this article, I will be discussing the Terminal Emulator for Android. Considering the title of this article, I believe you have already guessed what topics will be covered in this post. If you have, then you are absolutely right.”
Anyway, to customize our Termux terminal, we need to perform several steps. It’s important to note that the ideas I’ll be sharing in this post are not the only available options for customizing your Termux.
Once you review my ideas, including the codes or programs I’ll be sharing, you can modify them to suit your specific requirements. Additionally, you can explore alternative ideas.
Now, let me describe the methods or aspects I’ll be discussing.
Firstly, we need to create some Python files or programs. You can also develop your own programs. One such program will focus on a hacker login screen, although it’s actually a simple login screen with a humorous touch.
- How to Rename the Administrator Account in Windows 11
- How to install Tor Browser in Kali Linux
- How to list USB Devices Connected to Linux System
- How To Send/Received Files All-Over-World (CLI) without Port Forwarding?
- How to Install Kali Linux on Android without Root – 2022
- How to Stop Website from Opening new Tabs?
- FRP Bypass APK Download for Android 2022 | How to Install FRP Bypass App in Android Device
Our next objective is to create system components loading screen using Python. Again, this will be a straightforward Python program.
Following that, we’ll design a progress bar or loading bar using Python.
Once we complete the above steps, we’ll proceed to create another Python program that displays an anonymous hacker mask or ASCII banner on our screen.
You can choose any type of mask or banner, which can be found on a website. I will provide the website details at the end of this post.
Once we finish these tasks, we’ll be ready to customize the ‘bash.bashrc’ file of our Termux.
Unfamiliar with the ‘bash.bashrc’ file in Termux? It’s a bash file and serves as the main script controlling the settings and appearance of your command-line interface, that is, Termux.
Now, let’s get started!”
How to Customize Termux Like a Pro Hacker Using Python
$ pwd
STEP 2: If you are in the home directory, the output will be like-
/data/data/com.termux/files/home
STEP 3: Now, the first one is about creating the login screen. So Create a new Python file, using $ nano login.py, and paste the following code on it.
import curses
import time
def animate_login_screen(stdscr):
# Clear the screen
stdscr.clear()
# Get screen dimensions
height, width = stdscr.getmaxyx()
# Set up text
login_text = “Termux Login”
username_text = “Username: “
password_text = “Password: “
# Predefined username and password
username = “termux”
password = “”
# Calculate the positions of text elements
login_x = width // 2 – len(login_text) // 2
username_x = width // 2 – len(username_text) // 2
password_x = width // 2 – len(password_text) // 2
text_y = height // 2
# Animation loop
while True:
# Clear the screen
stdscr.clear()
# Print login text
stdscr.addstr(text_y – 2, login_x, login_text)
# Print username input
stdscr.addstr(text_y, username_x, username_text + username)
# Print password input
stdscr.addstr(text_y + 1, password_x, password_text + “*” * len(password))
# Refresh the screen
stdscr.refresh()
# Wait for user input
key = stdscr.getch()
# Check if Enter key is pressed
if key == ord(‘n’):
# Clear the screen
stdscr.clear()
# Print login success message
success_message = “Login successful!”
success_x = width // 2 – len(success_message) // 2
stdscr.addstr(text_y, success_x, success_message)
# Refresh the screen
stdscr.refresh()
# Pause for a short duration
time.sleep(2)
break
# Check if backspace key is pressed
elif key == curses.KEY_BACKSPACE or key == 127:
password = password[:-1] # Remove the last character
else:
password += chr(key) # Append the typed character to the password
# Initialize curses and run the animation
curses.wrapper(animate_login_screen)
Note: In the above program, there is a need of some modules to be installed on your termux, by default it comes preinstalled, but in some case, if it is not there, you can install them by using $ pip install time and $ pip install curses.
STEP 4: So Create a new Python file, using $ nano sysload.py and paste the following code on it.
import time
def boot_system():
print(“Starting system boot…”)
time.sleep(0.3)
print(“Analyzing processor speed…”)
time.sleep(0.3)
print(“Checking memory modules…”)
time.sleep(0.3)
print(“Loading system resources…”)
time.sleep(0.3)
print(“Initializing peripherals…”)
time.sleep(0.3)
print(“Establishing network connection…”)
time.sleep(0.3)
print(“Booting operating system…”)
time.sleep(0.3)
print(“Configuring system settings…”)
time.sleep(0.3)
print(“Performing system diagnostics…”)
time.sleep(0.3)
print(“Running startup scripts…”)
time.sleep(0.3)
print(“Checking disk drives…”)
time.sleep(0.3)
print(“Initializing graphics subsystem…”)
time.sleep(0.3)
print(“Loading user profiles…”)
time.sleep(0.3)
print(“Mounting file systems…”)
time.sleep(0.3)
print(“Starting system services…”)
time.sleep(0.3)
print(“Launching user interface…”)
time.sleep(0.3)
print(“System boot complete!”)
# Call the function to start the system boot
boot_system()
STEP 5: Now, you can add your own lines to appear on the screen, and also you can modify it to the next level. So Create a new Python file, using $ nano bar.py and paste the following code on it.
from tqdm import tqdm
import time
for i in tqdm (range (101),
desc=”Loading…”,
ascii=False, ncols=75):
time.sleep(0.01)
print(“Complete.”)
In this program, we need to take the help of an external module, which does not come preinstalled, so install it by using $ pip install tqdm
STEP 6: Now, you need to edit or customize this file, we need to go to the directory where this file is located, and this file is located in the /data/data/com.termux/files/usr/etc folder. So let’s go there.
I am assuming you are in the home directory now.
So let’s move one directory backward (to /data/data/com.termux/files), use the command 👇
$ cd ..
Now we need to go to files/usr/etc
So, use 👇
$ cd usr/etc
Great! we have successfully arrived at the destination!
STEP 7: So, now let’s open the file and start our editing. type the below command to edit bash.bashrc file.
$ nano bash.bashrc
Here, below the PS1 variable, add the following line👇
export PS1=”[e[1;32m]╭─u@h [e[1;34m]w [e[1;31m]$(if [[ $? == 0 ]]; then echo “✔️ “; else echo “✘ “; fi)[e[1;37m]n╰─[e[0m] “
and then, scroll down to the end of the file, Here add the following command as it is:
clear
python login.py
clear
python sysload.py
python bar.py
clear
python mask.py
LAST WORD: In this way, you can easily customize Termux. This is enough for now, we will meet very soon with a new and very interesting article. Thank you so much to read my article post, if you like this and want to get daily updates, I wish you all are always happy and stay tuned with us as always.