All Projects → jakoch → csgo-cli

jakoch / csgo-cli

Licence: GPL-3.0 license
CS:GO Console shows your user account, stats and latest matches. It also uploads demo sharecodes to csgostats.gg.

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to csgo-cli

valve-matchmaking-ip-ranges
Lists of locations & IP addresses of Valve servers
Stars: ✭ 69 (+122.58%)
Mutual labels:  steam, counter-strike, csgo
CallAdmin
CallAdmin is a multilingual sourcemod plugin which provides in-game report functionality
Stars: ✭ 52 (+67.74%)
Mutual labels:  steam, counter-strike, csgo
Server-Creation-Tool
A Tool to easily create Server via SteamCMD
Stars: ✭ 33 (+6.45%)
Mutual labels:  steam, counter-strike, counter-strike-global-offensive
Csgo Multi 1v1
CS:GO Sourcemod plugin to create multi-1v1 arena servers
Stars: ✭ 230 (+641.94%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
csgo-hud
Custom CS:GO Spectator HUD
Stars: ✭ 40 (+29.03%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Advancedfx
Half-Life Advanced Effects (HLAE) is a tool to enrich Source (mainly CS:GO) engine based movie making.
Stars: ✭ 231 (+645.16%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Steamworks
Exposing SteamWorks functions to SourcePawn.
Stars: ✭ 70 (+125.81%)
Mutual labels:  steam, counter-strike, steam-api
Anubis
Free open-source training software / cheat for Counter-Strike: Global Offensive, written in C.
Stars: ✭ 81 (+161.29%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
steam community market
Get item prices and volumes from the Steam Community Market using Python 3
Stars: ✭ 24 (-22.58%)
Mutual labels:  steam, csgo, steam-api
Vac Bypass
Valve Anti-Cheat bypass written in C.
Stars: ✭ 241 (+677.42%)
Mutual labels:  steam, counter-strike, csgo
Goesp
Cross-platform streamproof ESP hack for Counter-Strike: Global Offensive, written in modern C++. Rendering and GUI powered by Dear ImGui.
Stars: ✭ 210 (+577.42%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Public
The game is about a group of "terrorists" who have traitors among them, out to kill everyone who's not a traitor.
Stars: ✭ 94 (+203.23%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Garhal csgo
A project that demonstrates how to screw with CSGO from Kernel Space. (CSGO Kernel Cheat/Hack) All cleaned up, and with updated offsets.
Stars: ✭ 179 (+477.42%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
CSGOItemDB
An API to retrieve accurate CS:GO prices for high- and low-tier items
Stars: ✭ 35 (+12.9%)
Mutual labels:  steam, counter-strike, csgo
Aristois Legit
Full project files for aristois, Counter-Strike: Global Offensive cheat.
Stars: ✭ 110 (+254.84%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Node Csgo
A node-steam plugin for Counter-Strike: Global Offensive.
Stars: ✭ 367 (+1083.87%)
Mutual labels:  steam, counter-strike, csgo
Deadcell Csgo
Full source to the CS:GO cheat
Stars: ✭ 339 (+993.55%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Get5
CS:GO Sourcemod plugin for competitive matches/scrims
Stars: ✭ 390 (+1158.06%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive
Node Globaloffensive
A Node.js module to connect to and interact with the CS:GO game coordinator. Mostly used to get item data.
Stars: ✭ 96 (+209.68%)
Mutual labels:  steam, counter-strike, csgo
pengWin
An external cheat for the Linux version of Counter-Strike Global Offensive
Stars: ✭ 28 (-9.68%)
Mutual labels:  counter-strike, csgo, counter-strike-global-offensive

csgo-cli Build Version License

This console tool enables you to output informations of your CS:GO user profile and latest matches. You can also use the tool to upload demo sharecodes to csgostats.gg.

Installation

The installation is easy. It's just a zipped folder containing the application.

Download the zip file, extract it to a location of your choice and then run the app.

  • Download the lastest release of csgo-cli-vX.Y.Z.zip from Github: https://github.com/jakoch/csgo-cli/releases/latest
  • Extract the zip file. Switch to the "csgo_cli" folder.
  • Then run csgo_cli on the command-line interface or just run update.bat to upload your recent matches.

Requirements

  • Windows
  • Steam application running
  • CS:GO application not running

Usage

Display commands:

csgo_cli

Output:

csgo_cli v1.0.3, https://github.com/jakoch/csgo-cli
Copyright (c) 2018-2019 Jens A. Koch.

 CS:GO Console shows your user account, stats and latest matches.
 You can also use the tool to upload demo sharecodes to csgostats.gg.

Usage:
  command [options] [arguments]

Available commands:
  -user           Show your profile (SteamID, AccountID, MM-Rank, Likes, VAC-Status)
  -matches        Show your past matches in table form
  -upload         Upload your past matches to csgostats.gg
  -s, sharecode   Upload a demo sharecode to csgostats.gg

Options:
  -h, help        Display this help message
  -v, verbose     Increase verbosity of messages
  -V, Version     Display application version

Fetch matches and upload to csgostats (or just use update.bat):

csgo_cli -matches -upload

If you encounter any issues, please use the verbose mode for debugging purposes:

csgo_cli -matches -upload -verbose

How does this work internally?

The tool connects to your running Steam as CS:GO game client (SteamApp 730). It communicates with the Steam API to request the serialized player and match infos. The structure of the serialized data is described by the csgo-protobufs. These infos are then deserialized using Protobuf and placed into iteratable objects for further processing and output.

Automatic Upload of Demo ShareCodes to http://csgostats.gg/

The ShareCode is an URL, which you might pass around to your friends.

It looks like so: steam://rungame/730/76561202255233023/+csgo_download_match%20CSGO-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

If you click on this URL or open it in a browser tab it will tell Steam to launch CS:GO, automatically download the demo and open it for replay. The code at the end of the URL is the id of the match.

The tool requests your latest matches and builds the ShareCodes for the demos. The ShareCodes are then automatically uploaded to https://csgostats.gg/

This avoids the manual posting of the sharecode via the csgostats webinterface or the posting to the csgostats steam group, where the bots pick it up. https://csgostats.gg/getting-the-sharecode

Development Notes: ShareCode Uploading to csgostats.gg

The file containing the logic for uploading the ShareCode is ShareCodeUpload.cpp.

uploadShareCode() uses cURL to POST the ShareCode. Posting data to csgostats.gg is difficult, because the server is Cloudflare protected. Even normal browsing behaviour can trigger a cloudflare redirect to a captcha page or a website ban.

Before we can POST one or multiple sharecodes, a GET request to csgostats.gg is needed to get a cURL connection handle, including all relevant cookies. The cURL handle is then re-used for one or more POST requests (sending the cookies as header data and the sharecode(s) as post data).

The reponse is then parsed by processJsonResponse(). There are 4 response possibilites: There is a HTML response by Cloudflare, the HTML captcha page. There are 3 JSON response types by csgostats.gg: error, queued, complete. See testProcessJsonResponse()

For testing purposes: Posting a ShareCode to csgostats.gg using cURL on the CLI

  • curl "https://csgostats.gg/match/upload/ajax" -H "accept-language: en" -H "content-type: application/x-www-form-urlencoded; charset=UTF-8" -H "accept: application/json, text/javascript, */*; q=0.01" -H "x-requested-with: XMLHttpRequest" --data "sharecode=CSGO-WSACM-qX5Gv-ikbi3-Z6uOW-TGwPB&index=0"

Dependencies

  • Steamworks SDK API Docs
    • The official Steamworks SDK is used for making the Steam API connection and requesting data.
  • Google Protobuf
    • A language-neutral, platform-neutral, extensible mechanism for serializing structured data.
    • Protobuf is used for deserializing the player and match infos.
  • CS:GO Protobufs
    • The csgo-protobufs are provided by the steamdb.info project.
    • The Protobuf Compiler (protoc) is used during the build process to compile the csgo-protobufs to C++ objects for data access.
  • nlohmann/json
    • nlohmann/json is used to parse the JSON responses from the csgostats server (error, complete, queued).
  • ConsoleTable (inside /src)
    • ConsoleTable is used to print tables to the console.
  • Curl
    • libcurl is used for transferring data.
  • CMake
    • CMake is used as build tool.
  • Github Actions
    • Github Actions is used as build and deployment service.
Release Checklist

Before releasing a new version:

  • Update Version number in vcpkg.json
  • Update CHANGELOG.md

Todo

  • CI setup
    • cmake
    • appveyor.yaml - switched to Github Actions @ 09/2021
      • VC15 x64
    • added Github Actions (./github/workflows)
      • MSVC22 - VC17 - x64-windows-static
  • vendor dependencies
    • steam sdk
      • encrypt
      • decrypt via env secret
    • protobuf
    • cs:go protobufs
      • patch cs:go protobuf syntax
    • curl
    • rapidjson
    • nlohmann-json
    • fmt
    • spdlog
  • package and deploy the application
  • package and deploy the dependencies
    • exclude sw_sdk (not redistributable), ship encrypted version
  • connect as CSGO GameClient to Steam
  • fetch player info
    • calculate steamids
  • fetch latest matches
    • calculate demo share-codes
  • upload demo share-codes to csgostats.gg
    • curl based share-code uploader
    • rapid-json based response parser
    • nlohmann-json based response parser
  • to avoid re-posting sharecodes (ShareCodeCache)
  • store matches locally (json, cvs, sqlite)
  • request additional steam profile data via web-api
  • colors on the CLI (LOSS red, WIN green)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].