Tshark is an open-source command line tool for dumping and analyzing network traffic it lets you capture packet data from a live network. Tshark is developed as part of the Wireshark project (TShark is a terminal oriented version of Wireshark). On Debian-based systems, it can be installed using apt by simply typing
sudo apt-get install tshark
But if you do not have internet connectivity try below steps:-
Download ‘tshark’ and Debian dependencies from below link.
Install the downloaded files as below..
root@oracle:/home/oracle/Downloads/tshark# dpkg -i libsmi2ldbl_0.4.8+dfsg2-4_i386.deb
root@oracle:/home/oracle/Downloads/tshark# dpkg -i libc-ares2_1.7.3-1_i386.deb
root@oracle:/home/oracle/Downloads/tshark# dpkg -i libc-ares2_1.7.5-1_i386.deb
root@oracle:/home/oracle/Downloads/tshark# dpkg -i wireshark-common_1.2.11-6+squeeze4_i386.deb
root@oracle:/home/oracle/Downloads/tshark# dpkg -i tshark_1.2.11-6+squeeze4_i386.deb
You are done !!!
To get pcap output file:-
Create an empty file on Desktop and give permission as below.
root@oracle:/ chmod 777 /home/oracle/Desktop/tcpdump
Run below Command:-
root@oracle:/ tshark -w /home/oracle/Desktop/ tcpdump
(If the -w option is not specified, TShark writes to the standard output the text of a decoded form of the packets it captures or reads. If the -w option is specified, TShark writes to the file specified by that option the raw data of the packets, along with the packets' time stamps.)
‘You can use wireshark to open and analyze the output file’

No comments:
Post a Comment