Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Multipart/Form-data (uploading http)

Here you go.

picArray[] is the file data.

Code
Local $boundary = "a65h7a" & @CRLF
Local $boundary2 = "--" & $boundary
Local $binary = "Content-Transfer-Encoding: binary" & @CRLF
local $typeCon = "Content-Type: txt/html" & @CRLF & @CRLF
Local $postData = $boundary2

$postData &= 'Content-Disposition: form-data; name="file[]"; filename="1.txt"' & @CRLF
$postData &= $typeCon
$postData &= $picArray[1] & @CRLF
$postData &= $boundary2
$postData &= 'Content-Disposition: form-data; name="file[]"; filename="2.txt"' & @CRLF
$postData &= $typeCon
$postData &= $picArray[2] & @CRLF
$postData &= "--a65h7a--"            ;End of HTTP HEADER

;begin send
$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("POST", $upshot, False)
$oHTTP.SetRequestHeader("Content-Type", "multipart/form-data; boundary=" & $boundary)
$oHTTP.Send($postData)



Possibly Related Threads...
Thread / Author Replies Views Last Post
[Help] by RezyOct 15, 2016 09:37 AM 8 213 Oct 15, 2016 09:37 AM
Last Post: Rezy
[Assembly] by TeLneT_Aug 18, 2013 08:18 PM 15 3,806 Aug 18, 2013 08:18 PM
Last Post: jhony_112
by LonelyVirginMar 28, 2013 12:33 PM 3 110 Mar 28, 2013 12:33 PM
Last Post: BaussHacker