Filtering protocol and string in tcpdump command?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Filtering protocol and string in tcpdump command?
# 1  
Old 08-10-2012
Filtering protocol and string in tcpdump command?

Hello to all in forum,

Maybe some unix expert could help me. I have the following tcpdump command:

Code:
tcpdump -i any port 13907 -s 0 -w Out.cap

I would like to run tcpdump to only capture data related with especific string.

Within the dump the protocol is GSM MAP and the string is Address digits: 1006257359

If I do right click in Wireshark over that text, the "Copy as Filter" expression is:

Code:
gsm_map.address.digits == "1006257359"

Then, is possible to filter for that protocol and string, something like:
Code:
tcpdump -i any port 13907 -s 0 -w "gsm_map[Address digits: 1006257359]" Out.cap

Thanks in advance for your help.

---------- Post updated 08-10-12 at 09:17 AM ---------- Previous update was 08-09-12 at 11:46 PM ----------

Hello guys,

Somebody knows about this?

Thank in advance.

Moderator's Comments:
Mod Comment edit by bakunin: please do not "bump up" your threads. We have even a rule against this.

If you do not get the expected answer or no answer at all it might be that nobody knows what you want to know, but it might as well be that:

- you haven't explained your problem well enough so that nobody understands what exactly you want
- you haven't given enough information to solve it and nobody feels obligated to ask for the missing data prior to solving the problem for you

If you get no answer to your question you might as well try to address these (or other) possible problems and elaborate on your description instead of just adding "any takers??" to your thread.

Last edited by bakunin; 08-11-2012 at 06:34 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Egrep -v command not filtering correctly

Hello guys, I have an issue when trying to do an egrep -v on a file, let me show you. I want to filter the last column as to where it filters out the columns with asterisks and zeros ( * and 0 ) it is working properly up to a certain point where I have a value of '10000' which is also getting... (3 Replies)
Discussion started by: evergreen
3 Replies

2. Shell Programming and Scripting

Need Help of filtering string from a file.

HI All, We have an Redhat Machine, And some folder with couple simple text files, this files containing a lot of lines with various strings and IP address with different classes. The Requirement in eventually , is to pass the all various IP addresses to Excel. My question is : what is... (4 Replies)
Discussion started by: James Stone
4 Replies

3. Red Hat

tcpdump command example

Hi, I have linux server in a network with hardware firewall device with ip 192.168.1.1 in front. we have domain http://t.exaple.com which resolves 192.168.1.10 My admin has blocked ping to 192.168.1.10 Now using tcpdump, how do I check if I am receiving the traffic or not ? Could... (0 Replies)
Discussion started by: ashokvpp
0 Replies

4. Shell Programming and Scripting

filtering string

hlow all i need help for my case i want to get variable 20(in bold) but filter in print $3 not $2 so this input 95:20111005_20111123:1821546322 96:20111005_20111123:0053152068 97:20111005_20111123:1820960407 98:20111005_20111123:2021153102 99:20111005_20111123:2021153202... (4 Replies)
Discussion started by: zvtral
4 Replies

5. Shell Programming and Scripting

filtering out duplicate substrings, regex string from a string

My input contains a single word lines. From each line data.txt prjtestBlaBlatestBlaBla prjthisBlaBlathisBlaBla prjthatBlaBladpthatBlaBla prjgoodBlaBladpgoodBlaBla prjgood1BlaBla123dpgood1BlaBla123 Desired output --> data_out.txt prjtestBlaBla prjthisBlaBla... (8 Replies)
Discussion started by: kchinnam
8 Replies

6. Shell Programming and Scripting

Command filtering ONLY rows NOT beginning with '*'

I need a command which filters rows ONLY NOT beginning with '*' So far I have following NOT sufficient command, because it does not include ALL possible literals except of '*' grep ^ INPUT_FILE >>OUTPUT_FILE Is it possible to write something like grep NOT ^ INPUT_FILE... (3 Replies)
Discussion started by: ABE2202
3 Replies

7. Shell Programming and Scripting

Need help in string filtering (KSH)

Hi all, I'm interested in printing out only the prefix of a formatted set of filenames. All files of this type have the same 8 character suffix. I'm using KSH. Is there a command I could use to print the filenames, less the last 8 characters? Was thinking of using sed 's/<last 8 chars>//',... (1 Reply)
Discussion started by: rockysfr
1 Replies

8. UNIX for Dummies Questions & Answers

filtering with find command...

dear all, i have a rather simple question that I cannot seem to find an answer to.. i have a directory with 8 base directories and 30 something subdirectories.. in each subdirectory I have aloccated base files (empty files) that I can refer to from find.. these base files will then have three or... (7 Replies)
Discussion started by: moxxx68
7 Replies

9. UNIX for Dummies Questions & Answers

Filtering text from a string

I'm trying to write a script which prints out the users who are loged in. Printing the output of the "users" command isn't the problem. What I want is to filter out my own username. users | grep -v (username) does not work because the whole line in which username exists is suppressed. If... (5 Replies)
Discussion started by: Cozmic
5 Replies
Login or Register to Ask a Question