加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

bash – 二进制数据发布卷曲

发布时间:2020-12-15 19:10:31 所属栏目:安全 来源:网络整理
导读:所以基本上,我正在尝试写一系列的脚本与Dot Net Nuke进行交互。我一直在分析流量,现在可以登录并执行一些基本任务。但是,我从来没有使用卷曲处理二进制文件上传。有人愿意看这个帮助我吗?以下是请求的解剖: http://pastebin.com/qU8ZEMaQ 这是我到目前
所以基本上,我正在尝试写一系列的脚本与Dot Net Nuke进行交互。我一直在分析流量,现在可以登录并执行一些基本任务。但是,我从来没有使用卷曲处理二进制文件上传。有人愿意看这个帮助我吗?以下是请求的解剖:

http://pastebin.com/qU8ZEMaQ

这是我到目前为止卷曲的原因:

http://pastebin.com/LG2ubFZG

编辑:对于懒惰 –

文件的长度实现并存储在LENGTH中
Bullshit只是使用参数的请求URL的副本/粘贴,减去URL本身。

curl -L --cookie ~/.cms --data-binary "@background.jpg" 
--header "Content-Length: $LENGTH" 
--header "Content-Disposition: form-data" 
--header "name="RadFileExplorer1_upload1file0"" 
--header "Content-Type: image/jpg" 
--header "Filename="background.jpg"" 
--data $BULLSHIT 
--referer "Kept-Secret" 
"Kept-Secret"
你不需要–header“Content-Length:$ LENGTH”。

以Google示例为例:

http://code.google.com/apis/gdata/articles/using_cURL.html#creating-entries

curl --request POST --data-binary "@template_entry.xml" $URL

请注意,GET请求不支持数据传输。

还要记住,POST请求有两种不同的编码模式。这是第一种形式:

  $ nc -l -p 6666 &
  $ curl  --request POST --data-binary "@README" http://localhost:6666

POST / HTTP/1.1
User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
Host: localhost:6666
Accept: */*
Content-Length: 9309
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

.. -*- mode: rst; coding: cp1251; fill-column: 80 -*-
.. rst2html.py README README.html
.. contents::

你可能要求:

-F/--form name=content
           (HTTP) This lets curl emulate a filled-in form in
              which a user has pressed the submit button. This
              causes curl to POST data using the Content- Type
              multipart/form-data according to RFC2388. This
              enables uploading of binary files etc. To force the
              'content' part to be a file,prefix the file name
              with an @ sign. To just get the content part from a
              file,prefix the file name with the symbol . The
              difference between @ and  is then that @ makes a
              file get attached in the post as a file upload,while the makes a text field and just get the
              contents for that text field from a file.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读