79
Comment:
|
1374
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
* Links: [Security/Web] , [LinuxOpenSSL] | * Links: [[Security/Web]] , [[Linux/OpenSSL]] * Check Headers e.g. CORS (access-control-allow-origin:) headers {{{ $ curl -k -sD - -H "Origin: https://wiki.vigor.nz" -o /dev/null https://wiki.vigor.nz/ }}} * or {{{ curl -H "Origin: https://mydomain.nz" -H "Access-Control-Request-Method: GET" -H "Access-Control-Request-Headers: X-Requested-With" -X OPTIONS --verbose https://vigor.nz 2>&1 | grep -i "access\|cors" }}} == Use Curl to measure web page response == * From: https://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl 1. Create a new file, curl-format.txt, and paste in: {{{ time_namelookup: %{time_namelookup}s\n time_connect: %{time_connect}s\n time_appconnect: %{time_appconnect}s\n time_pretransfer: %{time_pretransfer}s\n time_redirect: %{time_redirect}s\n time_starttransfer: %{time_starttransfer}s\n ----------\n time_total: %{time_total}s\n }}} 2. Make a request: {{{ curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/" }}} * Or on Windows, it's...{{{ curl -w "@curl-format.txt" -o NUL -s "http://wordpress.com/" }}} == Curl with http proxy == * {{{ curl -x myproxy.com:8080 https://reqbin.com/echo }}} ---- CategoryLinux |
Using Curl to access web pages
Links: Security/Web , Linux/OpenSSL
Check Headers e.g. CORS (access-control-allow-origin:) headers
$ curl -k -sD - -H "Origin: https://wiki.vigor.nz" -o /dev/null https://wiki.vigor.nz/
or
curl -H "Origin: https://mydomain.nz" -H "Access-Control-Request-Method: GET" -H "Access-Control-Request-Headers: X-Requested-With" -X OPTIONS --verbose https://vigor.nz 2>&1 | grep -i "access\|cors"
Use Curl to measure web page response
Create a new file, curl-format.txt, and paste in:
time_namelookup: %{time_namelookup}s\n time_connect: %{time_connect}s\n time_appconnect: %{time_appconnect}s\n time_pretransfer: %{time_pretransfer}s\n time_redirect: %{time_redirect}s\n time_starttransfer: %{time_starttransfer}s\n ----------\n time_total: %{time_total}s\n
Make a request:
curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"
Or on Windows, it's...
curl -w "@curl-format.txt" -o NUL -s "http://wordpress.com/"
Curl with http proxy
curl -x myproxy.com:8080 https://reqbin.com/echo