Coder Social home page Coder Social logo

steamre / steamkit Goto Github PK

View Code? Open in Web Editor NEW
2.5K 120.0 479.0 58.33 MB

SteamKit2 is a .NET library designed to interoperate with Valve's Steam network. It aims to provide a simple, yet extensible, interface to perform various actions on the network.

License: GNU Lesser General Public License v2.1

C# 99.05% C++ 0.74% C 0.18% PowerShell 0.04% Batchfile 0.01% Shell 0.01%
steamkit2 c-sharp nuget steam valve networking steam-network reverse-engineering protobuf

steamkit's People

Contributors

adustyoldmuffin avatar asherkin avatar azuisleet avatar benjamin-dobell avatar dependabot-preview[bot] avatar dependabot[bot] avatar didrole avatar doctormckay avatar ezhevita avatar felipe19930 avatar justarchi avatar leonard-thieu avatar m4dengi avatar manveru avatar powergamer1 avatar prodigysim avatar psychonic avatar rlabrecque avatar rossengeorgiev avatar rudeysh avatar sapphyrus avatar seishun avatar shravan2x avatar stgn avatar teliosdev avatar theds avatar timotheejeannin avatar voided avatar xpaw 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

steamkit's Issues

Dota 2 send ready bot state

Hello,

I've managed to create a bot that creates a lobby within dota 2 and it launches it.
But didn't figure out how to pass the Failed to load thing. Closed spectators/Moved bot to broadcasting/tried to ReadyUp method after launching the game/Told the bot to quit the game after launching by Abandon etc..
How do i get the lobby_id dinamically? CMsgReadyUpStatus might do the trick.

Is there any other solution or a workaround for the Failed to load when the game launches?

Thanks,
iCe

Off-topic: Where can i find the nethook software so i can investigate things myself?

Get chat channel messages

Hello,

So, basically I want to get user chat message in chat channel. I can use CMsgDOTAChatMessage to send message to chat channel, but have no idea to get message from other ppl?
Is there anyway to get it?

Sorry for my bad english (maybe).

SteamUser.LogOn (or CMClient.LocalIP?) doesn't check if it's connected

There's a rare issue where calling LogOn inside OnConnected and have it throw an exception because connection is not a valid object.

@voided thinks it's up to me to work it around in my code, however I disagree and think SteamKit should handle it nicely itself (why allow LogOn to be called if not connected?).

IsConnected is useless in OnConnected callback, because it checks universe, which is invalid if you're not logged in yet.

Thoughts?

Activate Steam CD Key using SteamKit

Will it be able to activate steam cd key using SteamKit?
Then it might be the customized long waiting feature "Activate Steam Cd Key on Web".

Help with building nethook2

I am trying to get my hands on nethook2.dll. As I didn't find any links I tried building it myself.
I added zlib and protobuf, but now I get
This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc.

I have no idea how am I supposed to do what it asks me to do.

SteamTrading

Just found your kit.
So, we can accept trade , but when i send request from my second account i always see Waiting for Nickname and then sesion expired.
How to accept request fully?

Steam network limits

Hello,
This is more of a question than an issue. Are you guys aware of any rate limits on the steam network? Is there a list available anywhere?

For example, friend/group invites, messages etc.

Query Steam Master Server?

Hello,

sorry if I am bit annoying, but I am currently trying to figure out how to query the Steam Master Server to get a list of Gameservers.
I was using steam-condeser w/ PHP until now, but Steam has made some changes on their Backend, so that Method is not working anymore (hl2master is offline).

I have found the Class SteamMasterServer inside of SteamKi2, but I neither have a clue how it works (since there is not even a constructor) nor if it even is the correct one.

Is querying the Master Server possible and if yes, how?

Thanks in advance.

[Question] Enable SteamGuard protection

Can i enable SteamGuard protection via this toolkit? I mean i have fresh account and i want to enable SteamGuard like default client does when i log in.
If not, is there any info about SteamGuard? Maybe some Web API's?

Make SteamLanguageParser a library

To simplfiy adding new generators (without having to change the SteamKit repository) SteamLanguageParser should have the LanguageParser and TokenAnalyzer classes public (and maybe could be made a library) so that the parser can be added as a dependency from another project/solution.

CMsgSourceTVGamesRespons

message CMsgSourceTVGamesResponse {
repeated .CSourceTVGame games = 1;
optional uint32 num_total_games = 2;
}

Im using this to return live games, but currenty it will only display 6 results, even though

optional uint32 num_total_games = 75.

Any idea how to retrieve the data on more than 6 results?

OnMachineAuth never called and sentry file not created

I am trying to run https://github.com/SteamRE/SteamKit/blob/master/Samples/6.SteamGuard/Program.cs to get login with SteamGuard working.
If I run it, the email containing the unlock code is sent and the program asks for it.
It then tries to reconnect and sends the unlock code (I guess) but never gets to the step where it actually receives the sentry file or logs in correctly, so OnMachineAuth is never called and the file never created.
Why is this?

I've added a few outputs to show the state of the program:

Connecting to Steam...

> OnConnected
Connected to Steam! Logging in '***'...
>> AuthCode:
>> SentryFileHash:

> OnLoggedOn
This account is SteamGuard protected!
Please enter the auth code sent to the email at gmail.com: 5JKNJ

> OnDisconnected
Disconnected from Steam, reconnecting in 5...

> OnConnected
Connected to Steam! Logging in '***'...
>> AuthCode: 5JKNJ
>> SentryFileHash:

> OnDisconnected
Disconnected from Steam, reconnecting in 5...

> OnLoggedOn
Unable to logon to Steam: NoConnection / Invalid

PS: The exact same thing happens if I purposely enter a wrong unlock code.

.Net 4.5 in Nuget?

Hi,

Are there plans to release a .NET 4.5 binary with Nuget?

Could not install package 'SteamKit2 1.5.0'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Installation of protobuf-net nuget succeeds in .NET 4.5 project

CDNClient api is inconsistent

The (CDNClient.ClientEndPoint, uint, SteamID) ctor takes depot id as a uint, while DownloadDepotChunk and DownloadDepotManifest take depot id as an int.

[request] NetHook releases

Could someone release a compiled version of NetHook2 on the releases page from time to time?

I'm playing around with node-steam and would like to look at the content of some messages being sent by Steam to add functionality, but I don't do any development in C#, so I don't really have an efficient way (or know how) to compile NetHook myself. If a compiled version was made available here I would really appreciate it.

Thanks!

What its client_tournament_gid param on protobuf Dota 2?

Hi everyone since the webapi method http://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/v1?key=APIKEY&league_id=65013 is not currently working i've been trying to get the mathches from a tournament obviously im trying on a tournament that doesnt need ticket.

On the protobuff i found a TournamentRequest and TournamentResponse, but in tournamentRequest it says there is 2 params:
https://github.com/SteamRE/SteamKit/blob/master/Resources/Protobufs/dota/dota_gcmessages_client.proto#L391

tournament_id : the tournament id of course,
and client_tournament_gid: ??

but i dont know what param give here, i dont know if this is correct way to get the matches from a tournament but if this is the way, what should i send in the second param ??

Thanks for advance.

Login to account that is being used

Hello, I'm not home right now so I can't test it but can I log into an account that is being used? Basically I want to make an app that plays custom sounds on chat/invites and other stuff but I still want to play

Greetings
Dustin

Missing EEconTradeResponse enum values

@psychonic and I looked at this yesterday and there are 2 values missing from the EEconTradeResponse enum:

ResetPasswordTooRecently = 24
SteamGuardNewDeviceDuration = 25

(or whatever you want to call them)

The first (I assume) is the trade restriction imposed when you reset your password. The second is when a device that has not authorized a SteamGuard account before is used. It has a 15 day limit for the first account but is then good to auth future accounts.

It may also be useful to put the proper values in the callback from the protobuf (at least this helped me know what the issue was in the Java Steamkit, so I added steamguard_required_days and new_device_cooldown_days, I'll probably add the others too.):

message CMsgTrading_InitiateTradeResponse {
    optional uint32 response = 1;
    optional uint32 trade_request_id = 2;
    optional uint64 other_steamid = 3;
    optional uint32 steamguard_required_days = 4;
    optional uint32 new_device_cooldown_days = 5;
    optional uint32 default_password_reset_probation_days = 6;
    optional uint32 password_reset_probation_days = 7;
}

I'm personally still investigating these values to try and determine the proper documentation ie: is new_device_cooldown_days the number of days remaining or the number of days into the new device?. Someone here may already know these things, but the Enum is the main issue.

Thanks again!

CMsgGCToRelayConnect functionality

Hi,

I'm back with a new question.
Can anyone tell me the functionality of the command : CMsgGCToRelayConnect ?
This can be found within the following file: dota_gcmessages_server.proto
I'll paste it here as well:
message CMsgGCToRelayConnect {
optional uint32 source_tv_public_addr = 1;
optional uint32 source_tv_private_addr = 2;
optional uint32 source_tv_port = 3;
optional uint64 game_server_steam_id = 4;
optional uint32 parent_count = 5;
optional fixed64 tv_unique_secret_code = 6;
}

Considering it's parameters i got the idea that this method allows me to connect a bot to the game server. If this is true, where could i find the game_server_steam id? How?

[Question] Trade Offer Status Callback

Good day!

I've been searching around and have been unable to figure out if steam's network sends out a protobuf message when someone you've sent an offer to has taken an action on that offer (eg Accept, Decline, Counter-Offer.) I was curious if this is so or of I would have to (unpreferably) continuously poll the web api for a status update.
I know that if I were to receive items from an offer that steam client would pop up and tell me I have new items (because it received a protobuf message I assume), so I'm hopeful that it will also send a message that an action was taken on an offer.

If this is possible but has not yet been developed could I get a brief overview of the process to start working on such a development by reverse engineering steam?

I appreciate your hard work on this project, thank you,
Brian

Changing EMail Address via SteamKit?

I have recently ran into the Problem that my old domain expired (to which my Bot's Account is linked to) and when logging in on a new Computer, I can't receive the Code-Email.

Since my current instance still got a valid sentry hash, I tried to change the EMail of the Account via SteamKit2 itself, but it doesn't work (I don't get an EMail)

That's what I have tried so far:

var msg = new ClientMsgProtobuf<CMsgClientEmailChange>(EMsg.ClientEmailChange4);
msg.Body.email = "[email protected]";
msg.Body.final = false;
msg.Body.password = "mypassword";
msg.Body.newmethod = true;
msg.Body.code = "";
client.Send(msg);

(email & password are correct, client is an instance of SteamClient)

Is this actually "intended" to work and if yes, what am I doing wrong?

Better server selection logic

Right now, CMClient just selects a random server to connect to. But it could be improved and act in a way Steam client does. Whenever the client gets disconnected/logged out, Steam marks current cm as bad, and doesn't use it in future reconnections (until flushed).

/cc @Netshroud

[Question] What does EAccountFlags.HWIDSet mean?

when i create a account through steamkit,and login on through it,the account flags is 2101509 always.
but if i login it by steam client,the account flags will be 2101637.
the difference is the EAccountFlags.HWIDSet.
does anyone know what it mean and how to change account flag from 2101509 to 2101637

Get the maximum amount of Friends?

I have been wondering if there is a method to get the available friend-slots for an Account.
Since the Community Update some months ago, the max. slots are not fixed anymore.

Is there such a method available in SteamKit2?

NetHookAnalyzer detection issues

With a nethook dump from a game server, I came across a few common messages whose body types do not get detected properly due to message names differing from type names. They instead get the generic proto message display missing field names and exact types.

EMsg.AMGameServerUpdate (uses CMsgGameServerData)
EGCBaseClientMsg.k_EMsgGCServerHello (shares CMsgClientHello)
EGCBaseClientMsg.k_EMsgGCServerWelcome (shares CMsgClientWelcome)

I fixed locally by just adding in a couple of direct hacks. Not sure if there's a better way to handle it.

Send authenticated raw requests

I am currently planning on developing a "one click" group management solution for steam.
For that solution I need to be able to quickly post predefined events and announcements to a group of the user's choice.
However, as that functionality is not implemented in SteamKit currently, I'd need to have a way to get the session cookie (I guess?) to be able to manually send an authenticated POST request to the respective endpoints (http://steamcommunity.com/groups/[group name]/announcements and http://steamcommunity.com/groups/[group name]/events).
Is there any way to send authenticated raw requests as the logged in user?

Lobbys

I have successfully created and launched a lobby using steamkit but I always fail to connect to the server, I have looked in all the resources to find a way to connect to lobby server but found none, could someone point me in the right direction please?

NuGet ocassionally causing CI builds to fail

There are some cases where the RestorePackages target of the build process is failing due to NuGet unable to locate and download some packages.

An example of this: https://travis-ci.org/SteamRE/SteamKit/builds/9271757#L183

My observations:

  • There's no package source being specified as visible here, the -source variable is being given an empty string.

I'm thinking the default source is (possibly) an outdated repo or url, and it may help to specify a source directly.

That could be done by modifying the package sources of the NuGet.targets file, or a better option would be to add it to the NuGet.config as documented here.

Another option to follow up with in case that specifying the package source directly doesn't help:

  • Modify the RestorePackages target to run a specific script when on Linux that will repeatedly try the restore until it succeeds (possibly with a ceiling of some amount of failures so that the build doesn't hang forever).

Nethook2: Cannot find function "CCrypto::SymmetricEncryptWithIV"

The function scan fails for the "CCrypto::SymmetricEncryptWithIV", so it cannot be detoured and data dumping is not possible.
It does work neither for the stable nor for the beta client.

Steam-client (official): May 29 2014 09:25:45
Steam-client (beta): Jun 9 2014 14:00:11

Commit: 2ab2564 (master, Jun 11 2014 11:04)

help

Where are these files which take you to the Steam
SteamKit2.dll
SteamKit2.xml
protobuf-net.dll
?
How to run these files?

Update NuGet Package

Github Steamkit samples(specifically the steamguard one) don't work with the older revision on NuGet

JobID error

Steamguard sample not working got these errors:
"'SteamKit2.SteamUser.LogOnDetails' does not contain a definition for 'TwoFactorCode'"

"''SteamKit2.SteamUser.UpdateMachineAuthCallback' does not contain a definition for 'JobID' and no extension method 'JobID' accepting a first argument of type 'SteamKit2.SteamUser.UpdateMachineAuthCallback' could be found (are you missing a using directive or an assembly reference?)"

"'SteamKit2.EResult' does not contain a definition for 'AccountLogonDeniedNeedTwoFactorCode'"

Move the protobufs into a separate repo

Many projects use Steam .proto files in one way or another. Some maintain local copies of the protobufs, e.g. SKSteamKit, while others, including node-dota2, go-steam and Steam++, link to this repo. With the former approach, the protos will be constantly out of date, while the latter requires the user to clone the pretty huge SteamKit2 repo.

It would greatly benefit the aforementioned projects if the .proto files were in their own repository. This would ensure a single central source for the protobufs that's easy to use as a dependency.

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.