Termux for Web Testing
Hello there, I am dropping a Termux Guide mainly focused for Web Bug Hunting . It will help you to save time , esp if you are doing a full time Job like me. This might aid in your journey especially to those who are starting this bug hunting journey on Andorid. . You can install Termux from here .
Topic to be covered:
Installing package’s in Termux
Exporting path for python,go, rust tool,etc
Using Bug hunting tool’s in termux.
About Termux:
Termux is a powerful terminal emulator for Android that supports Linux-like environments, making it a great tool for mobile penetration testing and programming.
Well, It has been app for just show off in Youtube By so called youtuber’s. They have never felt the true power of termux. They don’t know how to use what to use , Just running some tool’s with their title “Hack Everything using Termux blabla“.
Here’s the Github Link for repo: https://github.com/termux
Let’s Get Started:
Just after installing termux update & upgrade it or simply copy paste below command’s.
apt update && apt upgrade -y
pkg install python-pip git -y
pkg i vim
clear
Before Starting I will suggest you to Learn about basic linux tutorials..
Using Zsh shell:
Termux supports all kind of shell but we will be using zsh .We will learn to setup autocompletion,autosuggestion and syntax-highlighting .
Repo for ohmyzsh: Ohmyzsh.
You Just need to Clone this Repo either by using git or by using curl,wget.
Installation:
paste the below code in termux :
wget
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh
install.sh
You will have to get new session like this .After this, Close the termux app and reopen it, You will see zsh shell (~) ,if not just type "zsh" without ("") you will see zsh shell being active
For Auto-sugg & auto completion’s.
Paste this directly in Terminal.
git clone
https://github.com/zsh-users/zsh-autosuggestions
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone
https://github.com/zsh-users/zsh-syntax-highlighting.git
${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Now for .zshrc
We have to add those in path . For this ,if you want to use vim only type :alias nano="vim". Now as we will use nano Type. Just Copy and paste inside plugins():
nano ~/.zshrc
zsh-autosuggestions zsh-syntax-highlighting zsh-autocomplete
it should look like this: plugins(git zsh-autosuggestions zsh-syntax-highlighting zsh-autocomplete)
tap CTRL+x ,then y, then hit enter from keyboard and Restart the terminal
Now you should see the changes like this:)
See it suggest and do Autocomplete on choosing arrow keys or TAB keys from Keyboard.
If you are in office or workplace and have free time , You can do bug bounty stuff,solve programming problems from your android mobile too.
Exporting path
Exporting go/python path for using golang/python based tool from anywhere in terminal.
HeadAche for beginner’s
Before you need to change the directory to run go tool like this:
But we will export go path and use this types of tool from anywhere in terminal.We will be using amass .
Same goes for python based tool .We will learn to setup for them too in termux.We will use sqlmap .
For Go based tool
Move to zshrc and copy and paste there.
nano ~/.zshrc
Paste below code in zshrc :
export GOROOT=/data/data/com.termux/files/usr/lib/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
2.Exit you know the method:)
Now restart the termux and see the magic ,just type amass and hit enter ,it runs from direct terminal no need to change directory.
For Python tool
You have to change dir for python based tool too. It’s pain in ass and time consuming too.
Before: For running sqlmap
cd sqlmap
python sqlmap.py -u target.com
We will solve this too. locate where sqlmap or other python tool is located .
Again move to ~/.zshrc
for sqlmap
1.paste this at the end of line
sqlmap() {
python /data/data/com.termux/files/home/sqlmap/
sqlmap.py
"$@"
}
sqlmap runs with python, python3 so i have kept python at beginning if it's python2 tool keep python2 at first
let's take one more example of paramspider.
paramspider() {
python /data/data/com.termux/files/home/ParamSpider/
paramspider.py
"$@"
}
Save and exit and see the changes, No need to struggle more for changing directory.
now you can run python tools directly as
sqlmap -u
paramspider --h
from anywhere anytime…………….
More app’s:
1.Hackbar ,DH hackbar ,AndroHackbar,PentestSuite,Nmap scanner,OpenVpn
2.Coding C C++,Spck editor,Java,Kiwi Browser
We can host dvwa,our own sql servers,etc JuSt search it in Youtube .Do research.
Final Thought:
With Termux, you can learn bug hunting, programming,R.E. and more—all from your Android device. Use your free time wisely, whether you’re at work or free.
Remember, don’t limit yourself—you are the only one stopping yourself from achieving your goals. Start with what you have and go from there.
Best of luck on your journey!
Subscribe to my newsletter
Read articles from Brahma directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Brahma
Brahma
Aspiring developer and security enthusiast. Highly focused on automation, malware development, and vulnerability discovery with hands-on experience in creating large-scale production tools & Bot's Development.