Install Wireshark in Termux : Without Root

 Wireshark





What is Wireshark?


Wireshark is an open source network protocol analysis software program started by Gerald Combs in 1998. 
Wireshark is a packet sniffer and analysis tool. It captures network traffic on the local network and stores the data for offline analysis. Wireshark captures network traffic from Ethernet, Bluetooth, Wireless(IEEE.802.11), Token Ring, Frame Relay Connections, and many more.
Wireshark allows you to filter the log either before the capture starts or during analysis, so you can narrow down and zero into what you are looking in the network trace.

So let's get started.

Install Wireshark

first we need to update our repository. Type the following commands in your terminal.
apt update && apt upgrade -y


Now type the following commands and press enter, 

pkg install x11-repo


Now we need to install wireshark by typing the following command.

apt install wireshark-gtk


Wait for the installation to be finished. It will take approximately 3-4 minutes depends upon your internet connection.

Install Required Tools 

Wireshark has a graphical user interface (GUI), but we can run only the command line interface(CLI) tools in termux, we need to install some tools that will help us to run wireshark on termux.

Follow below commands:

pkg install xterm

 

apt install tigervnc

 

apt install tigervnc-viewer


Now we have to configure Tigervnc. Type vncserver and press enter. 

If you are running this command for first time then it will ask you to enter the VNC password. You can enter any password but you must remember the password which you enter.


In order for the GUI application to use display, you must set the environment variable with the command export DISPLAY=":1"


Now we need to install a VNC viewer  application for android. it helps us to run wireshark in GUI mode. you can install it from Google Play Store.(Click Here To Download)


After installing VNC viewer. Open the application then click on (+)sign. Basically, VNC server listens at localhost(127.0.0.1) and 5901 port. 

On Address field add 127.0.0.1:5901


On name field you can add anything like termux, wireshark etc., Then click on create. After this you will be promoted to add the password. Now type the password that you have typed at the time of configuring the VNC server. Now, you are successfully connected you will see the terminal in the VNC viewer simply type the following command in VNC viewer inorder to run the wireshark:

 

wireshark-gtk


Finally! we are done👍 


To run the wireshark again simply open Termux and type the following command to run the vnc server

vncserver

Then type the following command

export DISPLAY=":1"

 Then open VNC viewer application and click on your machine type the password and click on continue. In VNC terminal type the following command.

wireshark-gtk



Enjoy!!💥

Post a Comment

0 Comments