Skip to content

Commit e51301d

Browse files
authored
Merge pull request #1748 from definity/3.1dev
Added support for custom user agent
2 parents b873441 + 59c24e3 commit e51301d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

testssl.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ else
229229
MEASURE_TIME=${MEASURE_TIME:-false}
230230
fi
231231
DISPLAY_CIPHERNAMES="openssl" # display OpenSSL ciphername (but both OpenSSL and RFC ciphernames in wide mode)
232-
declare -r UA_STD="TLS tester from $SWURL"
232+
declare UA_STD="TLS tester from $SWURL"
233233
declare -r UA_SNEAKY="Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0"
234234

235235
########### Initialization part, further global vars just being declared here
@@ -19207,6 +19207,7 @@ tuning / connect options (most also can be preset via environment variables):
1920719207
b) arg "one" means: just test the first DNS returns (useful for multiple IPs)
1920819208
-n, --nodns <min|none> if "none": do not try any DNS lookups, "min" queries A, AAAA and MX records
1920919209
--sneaky leave less traces in target logs: user agent, referer
19210+
--user-agent <user agent> set a custom user agent instead of the standard user agent
1921019211
--ids-friendly skips a few vulnerability checks which may cause IDSs to block the scanning IP
1921119212
--phone-out allow to contact external servers for CRL download and querying OCSP responder
1921219213
--add-ca <CA files|CA dir> path to <CAdir> with *.pem or a comma separated list of CA files to include in trust check
@@ -21908,6 +21909,10 @@ parse_cmd_line() {
2190821909
--sneaky)
2190921910
SNEAKY=true
2191021911
;;
21912+
--user-agent|--user-agent=*)
21913+
UA_STD="$(parse_opt_equal_sign "$1" "$2")"
21914+
[[ $? -eq 0 ]] && shift
21915+
;;
2191121916
-q|--quiet)
2191221917
QUIET=true
2191321918
;;

0 commit comments

Comments
 (0)