First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

tshark syntax error

  • retag add tags

I am working on an assignment and having trouble with the syntax. Below is the prompt and command I am using. I had to map to tshark then add the command.

C:\Windows\system32>"c:\Program Files\Wireshark\tshark" -x -n SYNscan.txt

Below is the error

Capturing on 'Npcap Loopback Adapter'
tshark: Invalid capture filter "SYNscan.txt" for interface 'Npcap Loopback Adapter'.

That string isn't a valid capture filter (syntax error in filter expression).
See the User's Guide for a description of the capture filter syntax.
0 packets captured
cal516's avatar
1
cal516
asked 2018-09-12 15:39:17 +0000
grahamb's avatar
23.8k
grahamb
updated 2018-09-12 15:50:29 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Do you want tshark to write the dissection to "SYNscan.txt"? If so, then you'll have to redirect the output, e.g.

C:\Windows\system32>"c:\Program Files\Wireshark\tshark" -x -n > SYNscan.txt

Any final argument supplied to tshark without an argument prefix is treated as a capture filter.

Note also that you won't be able to write to the current directory (C:\Windows\System32) unless you're running with elevated privileges, and you shouldn't be running tshark with elevated privileges.

grahamb's avatar
23.8k
grahamb
answered 2018-09-12 15:55:58 +0000
edit flag offensive 0 remove flag delete link

Comments

Thank you for the response. I realized the error (no >) as soon as I read your response

cal516's avatar cal516 (2018-09-12 15:59:42 +0000) edit

If an answer has resolved your issue, then for the benefit of others looking for solutions, please accept the answer by clicking the checkmark icon next to it.

grahamb's avatar grahamb (2018-09-12 16:31:30 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer