4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:curl — newest first
  • GitHub - reorx/httpstat: curl statistics made simple
    December 8, 2019 - permalink - https://github.com/reorx/httpstat
    curl http stat
  • Note: curl --resolve
           --resolve <host:port:address>
                  Provide  a  custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Con-
                  sider it a sort of /etc/hosts alternative provided on the command line. The port number should be the number used for the specific protocol the host will be used for. It means you need several entries
                  if you want to provide address for the same host but different ports.
    
                  The provided address set by this option will be used even if -4, --ipv4 or -6, --ipv6 is set to make curl use another IP version.
    
                  This option can be used many times to add many host names to resolve.
    
                  Added in 7.21.3.
    

    Plus propre que de jouer avec du -H Header et en plus le https ne rale pas

    October 9, 2019 - permalink - https://links.infomee.fr/shaare/tV1KDA
    curl
  • HTTPie – command line HTTP client
    August 18, 2019 - permalink - https://httpie.org/
    curl
  • Curlie | curlie
    August 18, 2019 - permalink - https://curlie.io/
    curl
  • Convert cURL command syntax to Python requests, Node.js, R, PHP and Go code

    via pierrick

    November 19, 2018 - permalink - https://curl.trillworks.com/
    curl python requests
  • How do I measure request and response times at once using cURL? - Stack Overflow

    Create a new file, curl-format.txt, and paste in:

    time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n
    

    time_pretransfer: %{time_pretransfer}\n
    time_redirect: %{time_redirect}\n
    time_starttransfer: %{time_starttransfer}\n
    ----------\n
    time_total: %{time_total}\n

    Make a request:

    curl -w "@curl-format.txt" -o /dev/null -s "http://wordpress.com/"

    February 8, 2017 - permalink - http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
    curl
  • Note: xargs parallel, example with curl

    A way to parallelize curl call with xargs:

    cat url.list | xargs -n 1 -P 15 -I % curl -so /dev/null -k -A curltestxargs %

    August 22, 2016 - permalink - https://links.infomee.fr/shaare/b3ibmA
    curl xargs
  • rfc - Is there any documentation for omitting zeroes in dot-decimal notation of IPV4 addresses? - Stack Overflow

    ok ok... curl 127.0.0.1 == curl 127.1

    On peut omettre les 0

    Pas 'standard' mais fonctionne sur debian

    Il y avait un autre shortcut pour ping localhost mais je l'ai perdu :-/

    August 16, 2016 - permalink - http://stackoverflow.com/questions/10133820/is-there-any-documentation-for-omitting-zeroes-in-dot-decimal-notation-of-ipv4-a
    curl localhost tips
  • Note: curl, header host, https, SNI

    Si on veut curl une ressource sur l'ip (car pas de résolution, pas envie de modifier /etc/hosts..)
    On va utiliser -H pour rajouter un header host et arriver sur le bon virtualhost :

    curl -H 'Host: www.foo.com' http://192.168.1.1/

    Si la ressource est en https, ça ne passe pas :

    curl -H 'Host: www.foo.com' https://192.168.1.1/

    curl: (51) SSL: certificate subject name (*.foo.com) does not match target host name '192.168.1.1'

    Car le SNI hello se fait avec l'host dans l'url (192.168.1.1) et non pas avec le Header Host

    Un workaround est d'utiliser l'option --resolve

    curl --resolve www.foo.com:192.168.1.1 https://www.foo.com

    On peut aussi utiliser --insecure pour ignore l'erreur mais on ne valide pas que le certificat est ok :

    curl --insecure -H 'Host: www.foo.com' http://192.168.1.1/

    August 10, 2016 - permalink - https://links.infomee.fr/shaare/Lqccgg
    curl https sni
  • Detecting the use of "curl | bash" server side | Application Security

    :o

    April 22, 2016 - permalink - https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/
    bash curl security
  • Trouver son adresse ip public en ligne de commande

    curl http://bot.whatismyipaddress.com
    Une parmi d'autres qui a l'avantage d'être rapide ;)

    October 24, 2014 - permalink - https://links.infomee.fr/shaare/v-CE1w
    curl ip
  • Curl firefox

    Dans l'inspecteur on peut récupérer pour chaque requete l'équivalent en curl (un gros paté avec tous les headers qui vont bien)
    Parmis ces headers on retrouve 'Accept-Encoding: gzip, deflate' donc le curl va nous retourner quelquechose d'illisible

    Pour résoudre ça : curl blablablalba | gunzip -

    October 1, 2014 - permalink - https://links.infomee.fr/shaare/ucO98Q
    curl firebug firefox gunzip