Difference between revisions of "Curl"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 5: Line 5:
 
curl --resolve example.com:443:127.0.0.1 https://example.com/
 
curl --resolve example.com:443:127.0.0.1 https://example.com/
 
curl -vik --resolve example.com:443:198.18.110.10 https://example.com/
 
curl -vik --resolve example.com:443:198.18.110.10 https://example.com/
 +
```
 +
 +
```
 +
tshark -l -i F5_Internal -f 'dst port ( 443 )' -Y 'ssl.handshake.extension.type == "server_name" || http.host' -T fields -e ip.src -e ip.dst -e tcp.dstport -e ssl.handshake.extensions_server_name -e http.host | grep example
 
```
 
```
  

Revision as of 01:04, 14 January 2022

SNI header

curl --connect-to www.example.com:443:example.a:443 https://www.example.com
curl -sv   --resolve $host:443:$ip https://$host
curl --resolve example.com:443:127.0.0.1 https://example.com/
curl -vik --resolve example.com:443:198.18.110.10 https://example.com/
 tshark -l -i F5_Internal -f 'dst port ( 443 )' -Y 'ssl.handshake.extension.type == "server_name" || http.host' -T fields -e ip.src -e ip.dst -e tcp.dstport -e ssl.handshake.extensions_server_name -e http.host | grep example

Non sni header (port 80 unencrypted header)

curl --header "Host: example.com" http://127.0.0.1/

https://daniel.haxx.se/blog/2018/04/05/curl-another-host/

Testing ciphers

# curl https://www.example.com -k -v --location-trusted --sslv2
curl https://www.example.com -k -v --location-trusted --tlsv1.1
curl https://www.example.com -k -v --location-trusted --tlsv1.2
curl https://www.example.com -k -v --location-trusted --tlsv1.3
for host in 10.1.1.10 10.1.1.52 10.1.1.16 10.1.1.16; do echo $host; curl --header "Host: www.example.org" http://$host/downloads/myfile.png --output /dev/null; done