I want to change wireshark ".pcapng" temp files' directory, how to config or where to modify the source code? asked 20 Jan '14, 17:09 metamatrix |
One Answer:
Presumably you mean the directory in which it writes temporary capture files. On UN*X, you can set the TMPDIR environment variable to the directory you want the temporary files (which may be difficult if you're launching it from the GUI rather than the command line); on Windows, you can set the TEMP environment variable. answered 20 Jan '14, 17:39 Guy Harris ♦♦ |
I need only wireshark temp files to write in user config directory, without modifying the system temp directory. How to do?
Modify the source code by changing the
create_tempfile()
routine to use a different directory.Just create a batch file that sets "temp" to whatever you need and runs Wireshark afterwards. That will get you a temporary "temp" path that will be discarded as soon as Wireshark exits. Much easier than a code change :)