Curl 更正卷曲以复制wireshark捕获

Curl 更正卷曲以复制wireshark捕获,curl,Curl,我正试图从wireshark捕获中构造一个curl命令,但不知何故,我无法让它工作 如果您能在这方面提供帮助,我们将不胜感激 捕获来自IP摄像头的web界面,该界面同步了登录时的时间 Expert Info (Chat/Sequence): PUT /netsdk/system/time/localTime?r=0.1618186405000 HTTP/1.1\r\n Frame 6749975: 809 bytes on wire (6472 bits), 809 bytes capture

我正试图从wireshark捕获中构造一个curl命令,但不知何故,我无法让它工作

如果您能在这方面提供帮助,我们将不胜感激

捕获来自IP摄像头的web界面,该界面同步了登录时的时间

Expert Info (Chat/Sequence): PUT /netsdk/system/time/localTime?r=0.1618186405000 HTTP/1.1\r\n

Frame 6749975: 809 bytes on wire (6472 bits), 809 bytes captured (6472 bits) on interface \Device\NPF_{FD7BA0E5-2937-40C4-8217-058F53B4CECE}, id 0
Ethernet II, Src: ASUSTekC_d5:8f:cd (04:92:26:d5:8f:cd), Dst: 9c:a3:aa:36:19:12 (9c:a3:aa:36:19:12)
Internet Protocol Version 4, Src: 192.168.102.100, Dst: 192.168.103.10
Transmission Control Protocol, Src Port: 49497, Dst Port: 80, Seq: 1, Ack: 1, Len: 755
Hypertext Transfer Protocol
    PUT /netsdk/system/time/localTime?r=0.9514279744997252 HTTP/1.1\r\n
        [Expert Info (Chat/Sequence): PUT /netsdk/system/time/localTime?r=0.9514279744997252 HTTP/1.1\r\n]
        Request Method: PUT
        Request URI: /netsdk/system/time/localTime?r=0.9514279744997252
            Request URI Path: /netsdk/system/time/localTime
            Request URI Query: r=0.9514279744997252
                Request URI Query Parameter: r=0.9514279744997252
        Request Version: HTTP/1.1
    Host: 192.168.103.10\r\n
    Connection: keep-alive\r\n
    Content-Length: 27\r\n
    Accept: application/json, text/javascript, */*; q=0.01\r\n
    DNT: 1\r\n
    X-Requested-With: XMLHttpRequest\r\n
    Authorization: Basic YWRtaW46bWF0cml4eDIw\r\n
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36\r\n
    Content-Type: application/x-www-form-urlencoded\r\n
    Origin: http://192.168.103.10\r\n
    Referer: http://192.168.103.10/view.html\r\n
    Accept-Encoding: gzip, deflate\r\n
    Accept-Language: en-DE,en;q=0.9,de-DE;q=0.8,de;q=0.7,en-GB;q=0.6,en-US;q=0.5\r\n
    Cookie: sync_time=true; usr=admin; juanipcam_lang=en; login=admin%2CXXXXXXX; pwd=XXXXXXX\r\n
    \r\n
    [Full request URI: http://192.168.103.10/netsdk/system/time/localTime?r=0.9514279744997252]
    [HTTP request 1/1]
    [Response in frame: 6750396]
    File Data: 27 bytes
HTML Form URL Encoded: application/x-www-form-urlencoded
这是我到目前为止提出的,但它给了我一个错误

curl -v -H "Accept: application/json, text/javascript, */*;" -H "Content-Type: application/x-www-form-urlencoded" -X PUT --cookie "sync_time=true; usr=admin; juanipcam_lang=en; login=admin%2CXXXXXXX; pwd=XXXXXXX"  http://admin:XXXXXXX@192.168.103.11/netsdk/system/time/localTime?r=0.1618186405000
错误:

* Expire in 0 ms for 6 (transfer 0x1dac8b0)
*   Trying 192.168.103.11...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x1dac8b0)
* Connected to 192.168.103.11 (192.168.103.11) port 80 (#0)
* Server auth using Basic with user 'admin'
> PUT /netsdk/system/time/localTime?r=0.1618186405000 HTTP/1.1
> Host: 192.168.103.11
> Authorization: Basic YWRtaW46bWF0cml4eDIw
> User-Agent: curl/7.64.0
> Cookie: sync_time=true; usr=admin; juanipcam_lang=en; login=admin%2CXXXXXXX; pwd=XXXXXXX
> Accept: application/json, text/javascript, */*;
> Content-Type: application/x-www-form-urlencoded
>
< HTTP/1.1 200 OK
< SERVER: nginx
< CONNECTION: close
< CONTENT-TYPE: text/json
< CONTENT-LENGTH: 153
< CACHE-CONTROL: no-cache
<
* Closing connection 0
{"requestMethod":"PUT","requestURL":"/netsdk/system/time/localTime","requestQuery":"r=0.1618186405000","statusCode":6,"statusMessage":"Invalid Document"}
*在0毫秒内过期6(传输0x1dac8b0)
*正在尝试192.168.103.11。。。
*TCP_节点集
*在200毫秒内过期4次(传输0x1dac8b0)
*连接到192.168.103.11(192.168.103.11)端口80(#0)
*使用用户“admin”的Basic进行服务器身份验证
>PUT/netsdk/system/time/localTime?r=0.1618186405000 HTTP/1.1
>主持人:192.168.103.11
>授权:基本YWRtaW46bWF0cml4eDIw
>用户代理:curl/7.64.0
>Cookie:sync_time=true;usr=管理;juanipcam_lang=en;登录名=管理员%2CXXXXXXX;pwd=XXXXXXX
>接受:application/json,text/javascript,*/*;
>内容类型:application/x-www-form-urlencoded
>
我猜这个问题是针对我想做的事情而提出的:)比如魔幻8号球。哈!

不过我现在明白了。对于任何试图做同样事情的人。下面的卷发给了我一个OK:

curl -v --header "Content-Type: application/x-www-form-urlencoded" -X PUT -d "\"2021-04-12T16:42:19 +02:00"\" http://admin:XXXXXXX@192.168.103.11/netsdk/system/time/localTime?r=0.9514279744997252