CS: GO get a link to the. dem file

You need to get the file link in the format .dem by demo code (as an example code CSGO-OyjY3-pPKCF-cmpHJ-wdohh-CY5dK)

The desired link looks like this http://replay124.valve.net/730/003072985384448163905_0699089210.dem.bz2 , but how do I get the values from the demo code?:

  1. 003072985384448163905
  2. 0699089210
  3. 124

I would like to do it in PHP, but you can also do it in NodeJS, but I didn't find anything on this topic on the Internet.

Up: In the game itself, the demo can be downloaded from the game's internal console with the command csgo_download_match код демо for example csgo_download_match CSGO-pj5MV-zyzpa-PaHVb-tFUwV-HGXbD, but it's still like it deciphering the link remains a mystery

Author: viiprogrammer, 2016-06-11

3 answers

Your problem is already solved, moreover, there is a library for nodejs https://www.npmjs.com/package/csgo And here is the code that decrypts your code:

var scDecoder = new csgo.SharecodeDecoder("CSGO-U6MWi-hYFWJ-opPwD-JciHm-qOijD");
console.log(scDecoder.decode());

The turnip has a more complete example, use it.

--

The in-game loader uses the CMsgGCCStrike15_v2_MatchListRequestFullGameInfo function from the internal library NetHook2.dll

UPD: Here is a method that uses these functions, even called also https://github.com/joshuaferrara/node-csgo/blob/master/handlers/match.js#L77

 8
Author: ReklatsMasters, 2016-06-15 10:05:02
 1
Author: own2pwn, 2016-06-14 17:02:31

Well, who asks questions like that?! What kind of link should I create? But, if, as I understand, you need to give the file to a specific request, then something like this once did a long time ago.

if($_GET['code'] == 'CSGO-OyjY3-pPKCF-cmpHJ-wdohh-CY5dK') {
    Header("HTTP/1.1 200 OK");
    Header("Connection: close");
    Header("Content-Type: application/pdf");
    Header("Accept-Ranges: bytes");
    Header("Content-Disposition: Attachment; filename=new_filename.pdf");
    Header("Content-Length: 50000");

    readfile('test_file.pdf');
}
 -2
Author: BrusSENS, 2016-06-11 15:06:56