This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

How to specify path to Configuration Profile?

0

Hello,

I am using some Configuration Profiles with tshark to automate some testing. We want to store the config profiles in source control (Git). When I copy the profile folders from their original directory into our Git directory, tshark is unable to find them when specifying the full path.

This is what we want to accomplish:

tshark -r C:\git\wireshark\captures\test_packets.pcapng -C C:\git\wireshark\config_profiles\NoEncryption_NoCRC

However it generates this error:

tshark: Configuration Profile "C:\git\wireshark\config_profiles\NoEncryption_NoCRC" does not exist

The command below works, but I am assuming is is using the original profile that is in my User directory.

tshark -r C:\git\wireshark\captures\test_packets.pcapng -C NoEncryption_NoCRC

How do I specify the path to a Configuration Profile when using tshark?

asked 12 Apr '16, 06:51

bakerbug's gravatar image

bakerbug
11113
accept rate: 0%


2 Answers:

1

You can accomplish this by setting WIRESHARK_APPDATA to C:\git\wireshark and renaming config_profiles to profiles. For example:

SET WIRESHARK_APPDATA=C:\git\wireshark
tshark -r C:\git\wireshark\captures\test_packets.pcapng -C NoEncryption_NoCRC

Refer to the very first documented environment variable in the tshark man page for more details.

answered 12 Apr '16, 07:45

cmaynard's gravatar image

cmaynard ♦♦
9.4k1038142
accept rate: 20%

This method works! However, one thing to note is that the profiles must be stored in a directory called 'profiles' otherwise they won't be found. I was originally going to store them in a directory with a more descriptive name, but that is an easy thing to give up.

(12 Apr '16, 14:00) bakerbug

0

Not sure if this can be done - I guess tshark is always looking into your user directory. Wireshark.exe has a command line parameter to specify the config directory like this:

-P <key>:<path>          persconf:path - personal configuration files

But for tshark, -P is already taken. So I don't think it's possible at the moment. Maybe open a bug report at https://bugs.wireshark.org and file a feature request.

answered 12 Apr '16, 07:02

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%