intercpet curl command to get body request

2 posts, 0 answers
  1. fabrizio
    fabrizio avatar
    7 posts
    Member since:
    Oct 2010

    Posted 31 Aug 2018 Link to this post

    windows 10 connected to the internet through wifi, no proxy. I need to read a curl request to rewrite in c# code.

    using curl 7.61.0 and fiddler 5.

    this command just works fine:

      curl -X POST -u "73b63264-b68c-4591-af76-96f325969d0b":"X7bECApaBi0o" -F "file=@c:\temp\1.json"

    with fiddler running the command above works fine too ma no traced into fiddler.

    this command is traced into fiddler but fails to execute:

    curl --proxy -X POST -u "73b63264-b68c-4591-af76-96f325969d0b":"X7bECApaBi0o" -F "file=@c:\temp\1.json"

    this the error "curl failed to verify the legitimacy of the server and therefore could not
    establish a secure connection to it. To learn more about this situation and
    how to fix it, please visit the web page mentioned above"


    Inspecting the requerst in fiddler , this the raw data of request, but i need to extract the body of request. How do i do?



    User-Agent: curl/7.61.0
    Connection: Keep-Alive

    A SSLv3-compatible ClientHello handshake was found. Fiddler extracted the parameters below.

    Version: 3.3 (TLS/1.2)
    Random: 14 67 89 3B 5E 0D 45 EF 2B 75 A0 39 5D C0 B0 BB EB 78 1E 49 BC F1 64 5C ED F6 19 BF 37 79 80 07
    "Time": 26/08/2001 23:16:04
    SessionID: empty
        ec_point_formats    uncompressed [0x0], ansiX962_compressed_prime [0x1], ansiX962_compressed_char2  [0x2]
        elliptic_curves    unknown [0x1D), secp256r1 [0x17], secp521r1 [0x19], secp384r1 [0x18]
        NextProtocolNego    empty
        ALPN        h2, http/1.1
        encrypt_then_mac (RFC7366)    empty
        extended_master_secret    empty
        signature_algs    sha512_rsa, sha512_dsa, sha512_ecdsa, sha384_rsa, sha384_dsa, sha384_ecdsa, sha256_rsa, sha256_dsa, sha256_ecdsa, sha224_rsa, sha224_dsa, sha224_ecdsa, sha1_rsa, sha1_dsa, sha1_ecdsa
        [C02C]    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
        [C030]    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
        [009F]    TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
        [C02B]    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
        [C02F]    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
        [009E]    TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
        [C024]    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
        [C028]    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
        [006B]    TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
        [C023]    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
        [C027]    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
        [0067]    TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
        [C014]    TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA
        [0039]    TLS_DHE_RSA_WITH_AES_256_SHA
        [C009]    TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
        [C013]    TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA
        [0033]    TLS_DHE_RSA_WITH_AES_128_SHA
        [009D]    TLS_RSA_WITH_AES_256_GCM_SHA384
        [009C]    TLS_RSA_WITH_AES_128_GCM_SHA256
        [003D]    TLS_RSA_WITH_AES_256_CBC_SHA256
        [003C]    TLS_RSA_WITH_AES_128_CBC_SHA256
        [0035]    TLS_RSA_AES_256_SHA
        [002F]    TLS_RSA_AES_128_SHA

        [00]    NO_COMPRESSION



  2. Alexander
    Alexander avatar
    357 posts

    Posted 04 Sep 2018 Link to this post


    It seems that curl does not trust Fiddler's root certificate as a certificate authority. You should get Fiddler's certificate (Tools -> Options -> HTTPS -> Actions -> Export Root Certificate to Desktop) and add it to curl's trusted CA certificate store.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top