diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-12-10 23:59:01 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-12-10 23:59:01 +0100 |
commit | e5c61dfcd6e3c89c0f7b003e76a522b805e80873 (patch) | |
tree | 4518e4b2871d7f03ad16bd017ce0dfeae712c300 /run-ws | |
parent | 0cac6f1f911590850e90894e14b3ecd0226cfa12 (diff) | |
download | wireshark-notes-e5c61dfcd6e3c89c0f7b003e76a522b805e80873.tar.gz |
run-ws: support gdb and valgrind
Diffstat (limited to 'run-ws')
-rwxr-xr-x | run-ws | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,10 +1,28 @@ -#!/bin/sh +#!/bin/bash if [ $# -lt 2 ]; then echo "Usage: $0 /path/to/wireshark capture.pcapng [ssl debug file] [--] [other wireshark options]" exit 1 fi +DEBUGGER=() +case $1 in +gdb|*/gdb) + while :; do + arg=$1; shift + DEBUGGER+=("$arg") + [[ $arg != --args ]] || break + done + ;; +valgrind|*/valgrind) + while :; do + arg=$1; shift + DEBUGGER+=("$arg") + [[ $arg != -- ]] || break + done + ;; +esac + SSLKEYLOGFILE=${SSLKEYLOGFILE:-$PWD/premaster.txt} WIRESHARK=$1 CAPTFILE=$2 @@ -34,6 +52,7 @@ fi [ -z "$SSLDEBUG" ] || set -- -o ssl.debug_file:"$SSLDEBUG" "$@" +"${DEBUGGER[@]}" \ "$WIRESHARK" -r "$CAPTFILE" \ -o http.ssl.port:443,4430-4433 \ -o ssl.keylog_file:"$SSLKEYLOGFILE" \ |