About VC:MP's update protocol

Started by ysc3839, Feb 27, 2016, 03:32 PM

Previous topic - Next topic

ysc3839

@George
Check update:
[spoiler]Request:
POST /check HTTP/1.1
Host: u04.maxorator.com
Accept: */*
Content-Length: 247
Expect: 100-continue
Content-Type: multipart/form-data; boundary=------------------------fccbef9bbb9a1ec3

--------------------------fccbef9bbb9a1ec3
Content-Disposition: form-data; name="json"

{
   "password" : "",
   "versions" : {
      "04rel002" : "00000001",
      "04rel003" : "00000001"
   }
}

--------------------------fccbef9bbb9a1ec3--
(00000001 is the real version in the version.txt)
Response:
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Sat, 27 Feb 2016 15:21:21 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.6.0-1

04rel002|04rel003
[/spoiler]
Download file:
[spoiler]Request:
POST /download HTTP/1.1
Host: u04.maxorator.com
Accept: */*
Content-Length: 189
Expect: 100-continue
Content-Type: multipart/form-data; boundary=------------------------9aa7c8ebf7668d11

--------------------------9aa7c8ebf7668d11
Content-Disposition: form-data; name="json"

{
   "password" : "",
   "version" : "04rel003"
}

--------------------------9aa7c8ebf7668d11--
Response:
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Sat, 27 Feb 2016 15:24:46 GMT
Content-Type: application/octet-stream
Content-Length: 1696451
Connection: keep-alive
X-Powered-By: PHP/5.6.0-1
Content-Description: File Transfer
Content-Disposition: attachment; filename="build56A404F8.7z"
Content-Transfer-Encoding: binary
Expires: 0
Cache-Control: must-revalidate, post-check=0, pre-check=0
Pragma: public

(below is data......)
[/spoiler]

EK.IceFlake

#1
Check response
I'm not getting the 04rel002 | 04rel003
Also I'm not getting the data part in the download request
I'm using http://www.requestmaker.com/
It might be filtering out the data though

ysc3839

Quote from: ext-d.CrystalBlue on Jun 23, 2016, 06:58 AMCheck response
I'm not getting the 04rel002 | 04rel003
Also I'm not getting the data part in the download request
I'm using http://www.requestmaker.com/
It might be filtering out the data though
I won't give you any support. I suggest you use the 'Postman' Chrome App.

Thijn

You'd need to do some hacky stuff to make it work on that site.
It's best to just use a proper programming language to make the requests.




<?php
$versions 
= array('04rel003' => '00000001''04rel004' => '00000001');
$ch curl_init('http&#58;//u04.maxorator.com/check');
curl_setopt($chCURLOPT_TIMEOUT5);
curl_setopt($chCURLOPT_POSTFIELDS'json={"password" : "", "versions" : '.json_encode($versions).'}');
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
$versionInfo curl_exec($ch);
$http_code curl_getinfo($ch,CURLINFO_HTTP_CODE);
curl_close($ch);
echo 
$versionInfo;