Giter VIP home page Giter VIP logo

open-steamworks's Introduction

Hi there ๐Ÿ‘‹

open-steamworks's People

Contributors

armata avatar asherkin avatar azuisleet avatar criptych avatar didrole avatar dordnung avatar icculus avatar m4dengi avatar omega32 avatar psyolus avatar rlabrecque avatar seishun avatar sokie avatar t-maxxx avatar voided avatar yaakov-h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-steamworks's Issues

IClientShortcuts breaks ESP

Hi. Nice fork ;D
[Windows, Stable Steam]

Unfortunately, met situation where I can not use IClientShortcuts interface in my program. Calling any function from it will cause next error:
image

The code is:

auto pClientShortcuts = (IClientShortcuts*)pClientEngine->GetIClientApps(hPipe, hUser, CLIENTSHORTCUTS_INTERFACE_VERSION);
    if (!pClientShortcuts)
    {
        cerr << "Unable to get Steam Client Shortcuts Interface" << endl;
        pClientEngine->ReleaseUser(hPipe, hUser);
        pClientEngine->BReleaseSteamPipe(hPipe);
        pClientEngine->BShutdownIfAllPipesClosed();
        return 1;
    }

    //AppId_t appID = parentID;
    AppId_t appID = pClientShortcuts->GetUniqueLocalAppId();

The call always returns (uint)(-1) value no matter if I have launched my app through Steam shortcut or directly using EXE.
Interface class seems correct according to latest steamclient.dll and steamclient.dylib. (I meant position of virtual functions in steamclient's maps and in interface class).

Thank you.

What's my mistake?

I want the bot to go online. Saw similar code in many examples. But it does not work. What am I missing? Thank.

`void TestClient::OnLoggedOnManual(SteamServersConnected_t* cbMsg)
{
printf("TestClient::OnLoggedOnManual Logged in\n");

EPersonaState state = m_pClientFriends->GetPersonaState();
    if (state != k_EPersonaStateOnline)
    {
   m_pClientFriends->SetPersonaState(k_EPersonaStateOnline);
   printf("Online\n");
   }

}`

Missing interfaces

Looks like the only actively changing part of steam client nowadays is vr/controller related interfaces. And that part almost completely missing/outdated here. And my dev skills atm are too low to fix that on my own.

Logging in with protobuf

Logging in using SetLoginInformation and SetTwoFactorCode followed with the LogIn call works fine, but it doesn't save the password.
I'm assuming since the client log says "Using JWT" with the official client and "Using credential pair" with my client, it doesn't send the required protobufs itself, and I can't send them through SharedConnection. Am I missing something?

How I'm doing it right now:

  1. Retrieve RSA key for password encryption through https://steamcommunity.com/login/getrsakey?username=
  2. Use RSA key with openssl to encrypt the password.
  3. Fill out CAuthentication_BeginAuthSessionViaCredentials_Request
  4. Connect to the CMs with ClientUser->EConnect()
  5. Send the protobuf with SendMessageAndAwaitResponse
  6. Steam starts complaining about "Trying to send a message with mismatched session id for current cm connection"
  7. No callbacks are received and login isn't performed.

How can I use SharedConnection successfully? And is it possible to get the response data?

TestClient login returns EResult 3

Hello,
I've been trying to get the test client to run before I start programming my app with open-steamworks, however, I've run into a problem.
The test client and the library compiles just fine on Linux, however it seems that for some reason, trying to login returns an "EResult 3". Looking through the code, "EResult 3" is returned when the client can't connect to the internet.

k_EResultNoConnection = 3,    // no/failed network connection

I though it was a firewall problem at first but since I don't have one installed it shouldn't be an issue. Although the logs do raise a problem, that is:

/home/<username>/.steam/sdk32//../ubuntu12_32/gldriverquery: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory

I think that might be the problem. How would I go about fixing that ?
Thanks in advance for the reply !

PS: Here are some specs for my system if it helps

OS: Arch Linux x86_64
Kernel: 5.19.12-arch1-1
Shell: bash 5.1.16 
Resolution: 1920x1080 
DE: Plasma 5.25.5 
WM: KWin 
Terminal: konsole 
CPU: Intel i5-3570 (4) @ 4.000GHz 
GPU: NVIDIA GeForce GTX 650 Ti Boost 
Memory: 3573MiB / 7903MiB 

Help with IClientUser::SpawnProcess

Hello, I would like to start by saying nice fork, thanks for keeping it up to date.

The issue i'm currently facing is that i can't get IClientUser::SpawnProcess to work for the life of me.

If anyone can please look at my code and tell my what I did wrong, or what I'm missing, please tell me.

    IClientShortcuts* clientShortcuts = m_clientEngine->GetIClientShortcuts(hSteamUser, hSteamPipe);
    uint32_t appId = clientShortcuts->GetUniqueLocalAppId();
    uint32_t parentAppId = 243750;
    uint64_t gameId = 0xD8A9994402000000 | parentAppId; // 'cfx' crc32 + shortcut
    std::cout << "[parent] " << appId << ' ' << parentAppId << ' ' << gameId << std::endl;

    IClientApps* clientApps = m_clientEngine->GetIClientApps(hSteamUser, hSteamPipe);
    KeyValuesBuilder builder;
    builder.PackString("name", "Muck.NET");
    builder.PackUint64("gameid", gameId);
    builder.PackString("installed", "1");
    builder.PackString("gamedir", "cfx");
    builder.PackString("serverbrowsername", "lovely!");
    builder.PackEnd();

    std::string str = builder.GetString();
    bool ok = clientApps->SetLocalAppConfig(appId, (uint8_t*)str.c_str(), str.size());
    if (ok)
    {
        std::cout << "[parent] " << "Config Set OK" << std::endl;
        IClientUtils* clientUtils = m_clientEngine->GetIClientUtils(hSteamPipe);

        // set pipe appid
        clientUtils->SetAppIDForCurrentPipe(parentAppId, false);
        std::cout << "[parent] " << "AppId set for current pipe" << std::endl;

        IClientUser* clientUser = m_clientEngine->GetIClientUser(hSteamUser, hSteamPipe);

        wchar_t directory[MAX_PATH];
        GetCurrentDirectoryW(sizeof(directory), directory);
        std::wstring process(directory);
        process.append(L"\\Test Platform.exe");
        std::wstringstream cmdwss;
        cmdwss << '"' << process << "\" child " << parent_parentPID;
        std::wstring cmd = cmdwss.str();
        
        std::wcout << "[parent] " << directory << std::endl;
        std::wcout << "[parent] " << process.c_str() << std::endl;
        std::wcout << "[parent] " << cmd.c_str() << std::endl;

        std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> converter;

        if(clientUser->SpawnProcess(converter.to_bytes(process).c_str(), converter.to_bytes(cmd).c_str(), converter.to_bytes(directory).c_str(), &gameId, "Muck.NET", 0, 0, 0))
            std::cout << "[parent] " << "Process Spawned" << std::endl;
        else {
            std::cout << "[parent] " << "SpawnProcess returned false" << std::endl;
        }
    }

This code is mostly copied from the FiveM repository, here

Thanks to anyone reading and trying to help me.

Auto-updating headers with steamworks_dumper

It should be possible to auto-update these headers with your other project, steamworks_dumper. This will fix the headers breaking as the client updates. I've written OSWUpdater for OpenSteamClient, so if you need inspiration feel free to take it from there (I wouldn't copy paste the code though, it's pretty terribly written).

I've also forked the steamworks_dumper repo and made it dump IPC function info, which is really useful when typing the functions.
Example output available here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.