-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a -w flag so the user can choose the location of capture file
This work is in support of issue #111. Termshark now takes a `-w` flag: ``` Application Options: ... -w=<outfile> Write raw packet data to outfile. ``` If you invoke termshark like this: ``` $ termshark -i eth0 -w foo.pcap ``` then the UI will launch as usual but termshark will save the capture to `foo.pcap` instead of e.g. `~/.cache/termshark/pcaps/eth0-xyz.pcap`. The argument to `-w` has to be a file and not something like stdout because termshark repeatedly re-reads the file during its operation. If you invoke termshark on an interface but without `-w`, then termshark's behavior depends on these new config variables: - `main.always-keep-pcap` (default: false) - unless this is true, when you quit termshark after reading from an interface, termshark will prompt you to see whether you want to keep or delete the capture file. - `main.use-tshark-temp-for-pcap-cache` (default: false) - if true, termshark will write the capture file to tshark's configured `Temp` directory. - `main.pcap-cache-dir` (string) - if set, and if `main.use-tshark-temp-for-pcap-cache` is false, termshark will write the capture file to this directory. If you invoke termshark on an interface and use the `-w` flag, termshark will not prompt you when it terminates, and will keep the capture file.
- Loading branch information
Showing
8 changed files
with
189 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters