Vice City: Multiplayer

Community Projects => George's VC:MP Launcher => Topic started by: ysc3839 on February 27th, 2016, 03:32 PM

Title: About VC:MP's update protocol
Post by: ysc3839 on February 27th, 2016, 03:32 PM
@George
Check update:
(click to show/hide)
Request:
Code: [Select]
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:
Code: [Select]
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
Download file:
(click to show/hide)
Request:
Code: [Select]
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:
Code: [Select]
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......)
Title: Re: About VC:MP's update protocol
Post by: EK.IceFlake on June 23rd, 2016, 07:58 AM
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
Title: Re: About VC:MP's update protocol
Post by: ysc3839 on June 23rd, 2016, 09:36 AM
Quote from ext-d.CrystalBlue on June 23rd, 2016, 07:58 AM
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
I won't give you any support. I suggest you use the 'Postman' Chrome App.
Title: Re: About VC:MP's update protocol
Post by: Thijn on June 23rd, 2016, 04:19 PM
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.

(http://i.imgur.com/x2yyog4.png)
(http://i.imgur.com/docM3nC.png)

Code: [Select]
<?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;