Skip to content

Commit 97568ab

Browse files
committed
add '-t|--timers' param
- signed-off-by: trimstray <[email protected]>
1 parent 000e258 commit 97568ab

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/__init__

+17-2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ function __main__() {
7272
# shellcheck disable=SC2034
7373
local _destination_host=""
7474

75+
# Default `curl timers` variables.
76+
local _curl_timers="0"
77+
7578
# Default 'ssl' variables.
7679
local ssl_state="0"
7780

@@ -388,9 +391,9 @@ function __main__() {
388391

389392
# Specifies the call parameters of the script, the exact description
390393
# can be found in _help_ and file README.md.
391-
local _short_opt="u:shbM:H:p:r:i:a"
394+
local _short_opt="u:shbM:H:p:r:i:ta"
392395
local _long_opt="help,version,examples,url:,ssl,headers,body,"
393-
_long_opt+="req-method:,req-header:,proxy:,resolve:,iface:,"
396+
_long_opt+="req-method:,req-header:,proxy:,resolve:,iface:,timers,"
394397
_long_opt+="all-scans,testssl,observatory,ssllabs,mixed-content,"
395398
_long_opt+="nse,waf,dns,http2,conn-debug,ssl-bin:,ssl-debug,"
396399
_long_opt+="cache-bypass:,user-agent:,referer:,auth:,httpv:,tlsv:,ciph:,"
@@ -503,6 +506,12 @@ function __main__() {
503506

504507
shift 2 ;;
505508

509+
-t|--timers)
510+
511+
export _curl_timers=1
512+
513+
shift ;;
514+
506515
-a|--all-scans)
507516

508517
export all_scans_state=1
@@ -1046,6 +1055,12 @@ function __main__() {
10461055

10471056
fi
10481057

1058+
if [[ "$_curl_timers" -eq 1 ]] ; then
1059+
1060+
CURL_TIMERS="on"
1061+
1062+
fi
1063+
10491064
if [[ "$referer_state" -eq 1 ]] ; then
10501065

10511066
_referer_curl="--referer $_referer"

src/helpers

+1
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ function _help_() {
643643
-p|--proxy <value> set proxy server (not for external tools)
644644
-r|--resolve <value> resolve the host+port to this address
645645
-i|--iface <value> set network interface (or address)
646+
-t|--timers turn on curl timers
646647
-a|--all-scans use all external security tools
647648
648649
Security tools:

static/man8/htrace.sh.8

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ htrace.sh is a shell script for http/https troubleshooting and profiling. It's a
4141
-i|--iface <value>
4242
set network interface (or address)
4343

44+
-t|--timers
45+
turn on curl timers
46+
4447
-a|--all-scans
4548
use all external security tools
4649

0 commit comments

Comments
 (0)