getTorBrowserUserAgent 388 Bytes
Newer Older
1
#!/bin/sh
2

Tails developers's avatar
Tails developers committed
3
4
set -eu

5
6
7
# Import the TBB_INSTALL variable
. /usr/local/lib/tails-shell-library/tor-browser.sh

8
ua="$(unzip -q -p "${TBB_INSTALL}"/browser/omni.ja \
Tails developers's avatar
Tails developers committed
9
10
11
12
13
14
15
16
17
          defaults/preferences/000-tor-browser.js | \
          sed -n 's@^pref("general\.useragent\.override", "\(.*\)");$@\1@p')"

if [ -z "${ua}" ]; then
    echo "Got empty user agent string" >&2
    exit 1
fi

echo "${ua}"