Create Your Own Termux Tool Installer: A Beginner’s Guide

Are you looking to streamline your workflow in Termux and easily access your favorite tools? Creating your own Termux tool installer script is a fantastic way to do just that. This guide will walk you through the process of building a simple yet effective tool installer, allowing you to quickly set up and run your preferred utilities within Termux. This method not only saves you time but also provides a personalized experience, tailored to your specific needs. Let’s dive into how you can Cara Buat Tools Termux Sendiri – make your own Termux tools!

Setting Up Your Termux Environment

Before we begin crafting our tool installer, we need to ensure Termux is properly set up and ready for scripting. Follow these initial steps to prepare your environment:

  1. Open Termux Application: Launch the Termux application on your Android device.

  2. Update and Upgrade Packages: It’s crucial to start with an updated system. Run the following commands sequentially:

    pkg upgrade && pkg update

    This command first upgrades existing packages and then updates the package lists, ensuring you have the latest versions and information.

  3. Install Essential Packages: We’ll need a few packages to create and run our script. Install them using the following command:

    pkg install ruby && gem install lolcat && pkg install figlet && pkg install nano

    Let’s break down what each of these packages does:

    • ruby: A dynamic, open source programming language. We need it as lolcat is a ruby gem.
    • gem install lolcat: Installs lolcat, a utility that produces rainbow-colored text, making our script output visually appealing.
    • pkg install figlet: Installs figlet, a program that creates large text banners from ordinary text, which we’ll use for our tool installer’s title.
    • pkg install nano: Installs nano, a simple and user-friendly text editor that we’ll use to write our script.

Creating the Tool Installer Script

Now that our environment is ready, let’s create the script that will serve as our tool installer.

  1. Create the Script File: Use nano to create a new file named mrfinch99toolsinstaller.sh. You can choose any name, but for this example, we’ll use this name. Execute the following command:

    nano mrfinch99toolsinstaller.sh

    This command will open the nano text editor with a new, empty file.

  2. Paste the Script: Copy the following script and paste it into the nano editor. This script is the core of our tool installer.

    #!/bin/bash
    #version 1.0
    
    # Variables
    b='33[1m'
    u='33[4m'
    bl='E[30m'
    r='E[31m'
    g='E[32m'
    bu='E[34m'
    m='E[35m'
    c='E[36m'
    w='E[37m'
    endc='E[0m'
    enda='33[0m'
    blue='e[1;34m'
    cyan='e[1;36m'
    red='e[1;31m'
    
    figlet Tools | lolcat
    echo -e "Tools : Mr_Finch99 $white" |lolcat
    echo -e "By : Mr_Finch99 $white " |lolcat
    echo -e "Blog : https://mrfinchtalk.wordpress.com $white " |lolcat
    ####################################################
    # CTRL + C
    ####################################################
    trap ctrl_c INT
    ctrl_c() {
    clear
    echo -e $red"[#]> (Ctrl + C ) Detected, Trying"
    echo -e $cyan"[#]> Thanks"
    sleep 1
    echo ""
    echo -e $white"[#]> see you :)..."
    sleep 1
    exit
    }
    
    lagi=1
    while [ $lagi -lt 6 ];
    do
    echo ""
    echo -e $b "1. Nmap${enda}";
    echo -e "============================" | lolcat
    echo -e $r "2. Admin-finder${endc}";
    echo -e "============================" | lolcat
    echo -e $g "3. RED_HAWK${endc}";
    echo -e "============================" | lolcat
    echo -e $c "4 Lazymux${endc}";
    echo -e "============================" | lolcat
    echo -e $r"5. Tools-X${endc}";
    echo -e "============================" | lolcat
    echo -e $r "6. Exit${endc}";
    echo ""
    echo -e "╭>MC" |lolcat
    read -p "╰─#" pil;
    
    # Nmap
    case $pil in
    1) pkg install nmap
    echo -e "${y} {1} Masukkan Web${endc}:"
    read web
    nmap $web
    echo
    ;;
    
    # admin-finder
    2) git clone https://github.com/the-c0d3r/admin-finder.git
    echo -e "${y} cara menggunakan admin finder"
    echo -e "${y} cd admin-finder"
    echo -e "${y} python admin-finder.py"
    cd /data/data/com.termux/files/home/admin-finder/
    python2 /data/data/com.termux/files/home/admin-finder/admin-finder.py
    echo
    ;;
    #RED_HAWK
    3) git clone https://github.com/Tuhinshubhra/RED_HAWK
    echo -e "${y} Installer RED_HAWK..."
    echo -e "${y} cd RED_HAWK"
    echo -e "${y} php RED_HAWK.php"
    cd /data/data/com.termux/files/home/RED_HAWK/
    php /data/data/com.termux/files/home/RED_HAWK/RED_HAWK.php
    ;;
    
    #Lazymux
    4) git clone https://github.com/Gameye98/Lazymux
    echo -e "${y} Installer Lazymux..."
    echo -e "${y} cd Lazymux"
    echo -e "${y} python lazymux.py"
    cd /data/data/com.termux/files/home/Lazymux/
    python2 /data/data/com.termux/files/home/Lazymux/lazymux.py
    ;;
    
    #Tools-X
    5) git clone https://github.com/Rajkumrdusad/Tool-X
    echo -e "${y} Installer Tool-X..."
    echo -e "${y} cd Tool-X"
    echo -e "${y} sh install.aex"
    cd /data/data/com.termux/files/home/Tool-X
    bash /data/data/com.termux/files/home/Tool-X/sh install.aex
    ;;
    
    6) echo "created by : Mr_Finch99" | lolcat
    exit
    ;;
    *) echo "sorry, pilihan yang anda cari tidak ada"
    esac
    done
    done

    Understanding the Script:

    • #!/bin/bash: Specifies that this script should be executed with Bash.
    • Variables: Defines color variables for enhanced output using ANSI escape codes.
    • Header: Uses figlet and lolcat to create a colorful and prominent title.
    • CTRL+C Trap: Handles the Ctrl+C interrupt, providing a graceful exit message.
    • Menu Loop: A while loop presents a menu with options to install different tools (Nmap, Admin-finder, RED_HAWK, Lazymux, Tools-X) and an exit option.
    • Case Statement: A case statement processes user input, executing the corresponding command for each tool selection. Each tool installation typically involves:
      • git clone: Cloning the tool repository from GitHub.
      • echo commands: Displaying instructions on how to use the tool.
      • cd: Changing directory to the tool’s directory.
      • Executing the tool’s main script (e.g., python admin-finder.py, php RED_HAWK.php).
    • Exit Option: Option 6 allows the user to exit the script.
    • Default Case: Handles invalid input, displaying an error message.
  3. Save the Script: To save the script in nano, press Ctrl + X, then type Y (for yes) and press Enter. This will save the file and exit nano.

Making the Script Executable and Running It

Our script is now created, but we need to make it executable and then run it.

  1. Change Permissions: Use the chmod command to make the script executable:

    chmod +x mrfinch99toolsinstaller.sh

    This command modifies the file permissions, adding execute permission for the user.

  2. Run the Script: Execute the script using the following command:

    ./mrfinch99toolsinstaller.sh

    This command runs the script. You will see the colorful title and the menu options.

Using Your Tool Installer

Now that you have your tool installer running, here’s how to use it:

  1. Select a Tool: Enter the number corresponding to the tool you want to install from the menu (1 for Nmap, 2 for Admin-finder, etc.) and press Enter.

  2. Follow Instructions: The script will then execute the commands to install the selected tool. For some tools, it will also display instructions on how to use them after installation.

  3. Interact with Tools: Once a tool is installed, you can typically run it by following the on-screen instructions or navigating to the tool’s directory.

  4. Exit the Installer: To exit the tool installer, select option 6 from the menu.

Customizing and Expanding Your Tool Installer

The script we created is a basic example. You can expand and customize it further to create a more powerful and personalized tool installer:

  • Add More Tools: Include more of your favorite Termux tools in the menu by adding new options in the while loop and corresponding cases in the case statement. Find the GitHub repository for the tool and adapt the installation commands.
  • Improve Descriptions: Add more detailed descriptions for each tool in the menu to help users understand their purpose.
  • Implement Error Handling: Enhance the script with error handling to gracefully manage potential issues during installation, such as network errors or missing dependencies.
  • Create Categories: If you have many tools, consider organizing them into categories within the menu for better navigation.
  • Configuration Options: For advanced users, you could add options to configure tool settings during installation.

Sharing Your Tool Installer

If you want to share your tool installer with others, you can upload the script to platforms like GitHub. This allows others to easily download and use your script. Remember to include clear instructions on how to use it in your repository’s README file.

Conclusion

Congratulations! You’ve successfully learned how to cara buat tools termux sendiri and created your own Termux tool installer. This simple script can significantly enhance your efficiency in Termux by providing quick access to your frequently used tools. By customizing and expanding upon this basic framework, you can create a highly personalized and powerful tool management system within Termux. Keep exploring, experimenting, and adding new tools to make your installer even more useful for your penetration testing or system administration tasks on the go!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *