Giter Site home page Giter Site logo

leystryku / leysourceengineclient Goto Github PK

View Code? Open in Web Editor NEW
159.0 7.0 40.0 1.74 MB

A source engine network client implementation based on some of my reversing work from 2016 with basic functionality ( joining servers, talking, receiving/sending voicedata etc. ). Made this & reversed netchan to learn about Sources networking.

License: MIT License

Batchfile 0.01% Lua 0.50% C++ 95.54% C 3.95%
source-engine css tf2 gmod reverse csgo orangebox ob

leysourceengineclient's Introduction

Hi there! I'm Leystryku ๐Ÿ‘‹

๐Ÿ’ป Development & Exploit Research | ๐ŸŒด Germany

About Me

  • ๐Ÿ“Š Self-taught Software Engineer since the age of 11.
  • โšก๏ธ Degree in Computer Science (B.Sc. CompSci)
  • ๐Ÿ‘จโ€๐Ÿ’ป Really enjoy reverse engineering stuff, finding exploits, tinkering with embedded systems, and other IT related fun things
  • ๐Ÿ•บ I love dancing

Programming Languages

I am a polyglot software engineer. A list of programming languages I used previously, as well as first contact. I try to interact with IT or software engineering daily. Some of my work is on GitHub.

frequently using or used at some point
  • Lua (age: 12)
  • C++ (age: 15)
  • C (age: 15)
  • C# (age: 16)
  • Java (age: 20)
  • Racket (age: 22)
  • Flutter/Dart (age: 23)
  • ASM (age: 15) (focus on IA-32/x86, Atmel AVR Instruction Set - ATMega etc)
  • SQL (age: 15) (MySQL, MsSQL)
never used frequently or dislike
  • VB (age: 23)
  • Javascript (age: 15)
  • PHP (age: 15)
  • HTML (age: 15)
  • CSS (age: 15)
  • AutoIt (age: 11)

leysourceengineclient's People

Contributors

creekie1337 avatar lastplayertr avatar leystryku avatar yunusemregul 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

leysourceengineclient's Issues

Can't get a working connection

Whenever i try to join any garry's mod server it will constantly try to reconnect with the message

Connecting to XXXXX | client port: 27002 | Nick: XXXXXX| Pass:
Challenge: XXXXX|Auth: XXX|SKey: 0|VAC: 0
Server is telling us we can connect
Sent connect packet
Server is telling us we can connect
Sent connect packet
Received first ingame packet
out of order packet 1 at 274
Receiving complete: 1 fragments, 248 bytes
svc_Print:

XXXXXXXX
Map: XXXXXX
Players: XXX
Build: XXXX
Server Number: XXX

ServerInfo, XXXXXXX
ProcessServerInfo
Receiving complete: 1 fragments, 6 bytes
Received net_SignOnState: 2, count: -1
leychan::SetSignonState Should do SetSignonState  2, -1
leychan::SetSignonState Forced to reconnect

the XXXX's are stuff i replaced obviously

Doesn't work for me.

I have compiled the program and when I run it it instantly crashes.
Visual Studio said this when I used the debugger:
Exception thrown at 0x00000001 in leysourceengineclient.exe: 0xC0000005: Access violation executing location 0x00000001.

Are there more informations that you/someone need to know?
What could be the reason?

Disconnected: Server uses different class tables

ServerInfo, players: 0/10 | map: gm_flatgrass | name: Garrys Mod Server | gm: sandbox | count: 1 | left: 2 | step: 3
DATA IS COMPRESSED, UNCOMPRESSED, !SINGLE: 177741
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
UNCOMPRESSED
Receiving complete: 399 fragments, 102077 bytes
Received svc_CreateStringTable, name: downloadables | maxentries: 8192 | size: 14 | entries: 25 | compressed: 0
Received svc_CreateStringTable, name: modelprecache | maxentries: 4096 | size: 13 | entries: 450 | compressed: 1
Received svc_CreateStringTable, name: genericprecache | maxentries: 512 | size: 10 | entries: 1 | compressed: 0
Received svc_CreateStringTable, name: soundprecache | maxentries: 16384 | size: 15 | entries: 830 | compressed: 1
Received svc_CreateStringTable, name: decalprecache | maxentries: 512 | size: 10 | entries: 213 | compressed: 1
Received svc_CreateStringTable, name: instancebaseline | maxentries: 1024 | size: 11 | entries: 60 | compressed: 1
Received svc_CreateStringTable, name: lightstyles | maxentries: 64 | size: 7 | entries: 64 | compressed: 1
Received svc_CreateStringTable, name: userinfo | maxentries: 256 | size: 9 | entries: 10 | compressed: 1
Received svc_CreateStringTable, name: server_query_info | maxentries: 4 | size: 3 | entries: 2 | compressed: 0
Received svc_CreateStringTable, name: ParticleEffectNames | maxentries: 2048 | size: 12 | entries: 18 | compressed: 0
Received svc_CreateStringTable, name: EffectDispatch | maxentries: 1024 | size: 11 | entries: 19 | compressed: 0
Received svc_CreateStringTable, name: Materials | maxentries: 1024 | size: 11 | entries: 7 | compressed: 0
Received svc_CreateStringTable, name: Scenes | maxentries: 4096 | size: 13 | entries: 1325 | compressed: 1
Received svc_CreateStringTable, name: ServerMapCycle | maxentries: 128 | size: 8 | entries: 1 | compressed: 0
Received svc_CreateStringTable, name: GameRulesCreation | maxentries: 1 | size: 1 | entries: 1 | compressed: 0
Received svc_CreateStringTable, name: networkstring | maxentries: 2048 | size: 12 | entries: 382 | compressed: 1
Received svc_CreateStringTable, name: client_lua_files | maxentries: 8192 | size: 14 | entries: 884 | compressed: 1
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13120
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12640
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 21192
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 13960
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12872
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12904
Received svc_UpdateStringTable, id: 5 | changed: 4 | bits: 29704
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 15760
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14168
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14360
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14208
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14224
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14320
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14184
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14200
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14168
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14328
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14208
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14336
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14328
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12824
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13896
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 14456
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12920
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13296
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12704
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13800
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25208
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25256
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12680
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12784
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 26272
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13888
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 15840
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 13760
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12832
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13984
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25008
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13920
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13944
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13048
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25008
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13112
Received svc_UpdateStringTable, id: 5 | changed: 2 | bits: 13280
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25208
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 12736
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25264
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14320
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 14168
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 25272
Received svc_UpdateStringTable, id: 5 | changed: 1 | bits: 13144
Received svc_UpdateStringTable, id: 21 | changed: 32 | bits: 11072
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 39 | bits: 11349
Received svc_UpdateStringTable, id: 21 | changed: 33 | bits: 9603
Received svc_GMod_ServerToClient, type: 3 |  bits: 8
net_SetConVar: 59
sbox_maxemitters to: 5
sbox_maxbuttons to: 20
sbox_maxhoverballs to: 20
sbox_maxthrusters to: 30
sbox_maxwheels to: 20
sbox_maxlamps to: 20
sbox_maxsents to: 20
sbox_maxballoons to: 10
sbox_maxeffects to: 50
sbox_maxvehicles to: 6
sbox_maxragdolls to: 5
sbox_maxprops to: 150
sk_plr_dmg_ar2 to: 8
sk_npc_dmg_ar2 to: 3
sk_max_ar2 to: 60
sk_max_ar2_altfire to: 3
sk_plr_dmg_alyxgun to: 5
sk_npc_dmg_alyxgun to: 3
sk_max_alyxgun to: 150
sk_plr_dmg_pistol to: 5
sk_npc_dmg_pistol to: 3
sk_max_pistol to: 150
sk_plr_dmg_smg1 to: 4
sk_npc_dmg_smg1 to: 3
sk_max_smg1 to: 225
sk_plr_dmg_buckshot to: 8
sk_npc_dmg_buckshot to: 3
sk_max_buckshot to: 30
sk_plr_dmg_rpg_round to: 100
sk_npc_dmg_rpg_round to: 50
sk_max_rpg_round to: 3
sk_plr_dmg_sniper_round to: 20
sk_npc_dmg_sniper_round to: 100
sk_max_sniper_round to: 30
sk_plr_dmg_grenade to: 150
sk_npc_dmg_grenade to: 75
sk_max_grenade to: 5
sk_plr_dmg_smg1_grenade to: 100
sk_npc_dmg_smg1_grenade to: 50
sk_max_smg1_grenade to: 3
sk_plr_dmg_357 to: 40
sk_npc_dmg_357 to: 30
sk_max_357 to: 12
sk_plr_dmg_crossbow to: 100
sk_npc_dmg_crossbow to: 10
sk_max_crossbow to: 10
sk_plr_dmg_airboat to: 3
sk_npc_dmg_airboat to: 3
sk_max_gauss_round to: 30
sk_npc_dmg_gunship to: 40
sk_npc_dmg_gunship_to_plr to: 3
sv_skyname to: painted
think_limit to: 0
sk_combineball_guidefactor to: 1
sk_combineball_seek_angle to: 15
sv_allow_voice_from_file to: 0
sv_maxrate to: 20000
sv_minrate to: 0
sv_client_predict to: 1
net_SetConVar_end, left: 5
Received net_SignOnState: 3, count: 4
KK __ 3
LOL: 22
Disconnected: Server uses different class tables
Reconnecting in 100 ms ...Reconnecting..
Challenge: 1494751456__190519362|Auth: 3|SKey: 0|VAC: 0
Connected successfully
Receiving complete: 1 fragments, 176 bytes

Sandbox
Map: gm_flatgrass
Players: 1 / 10
Build: 7836
Server Number: 1 

"Server uses different class tables"

When connecting to a Garry's Mod server I get kicked for "Server uses different class tables" even though the server I'm connecting to is running the latest version of Garry's Mod

Logs from SourceEngineClient.exe
Sending clc_ClientInfo
Sending SignonState 3
Sending SignonState 4
Sending SignonState 5
Sending SignonState 6
Unhandled Message: 1

The server I'm connecting to logs:
3><>" disconnected (reason "Server uses different class tables")

Disconnected: Server uses different class tables

Hey @Leystryku and thanks for creating something awesome! ๐Ÿ‘
Wanted to ask about a bug I'm getting recently with this client.

The client is unable to fully load in and it gets disconnected with the Gmod console message of: "Server uses different class tables."

Any thoughts on what could cause this?

Thanks, you're the man!

Connection issue

Sometimes the server sends you two signon packets on connectstep 4 which makes it so you cant connect further
fix - skip the second command in OOB::ReceiveQueryPacketConnection

L4D2 Bad challenge

idk it supports L4D2, i just try use it and I got Bad challenge. Error

server console

RejectConnection: ip:port - Bad challenge.

client console

Connecting to ip:port | client port: port| Nick: leysourceengineclient | Pass:
Challenge: xxx|Auth: xxx|SKey: 320|VAC: 0
Connection refused! [challenge.

Class Tables

I spent a bit of time getting this to connect, but the client is getting kicked for "server uses different class tables". It's authorizing/joining etc just fine.

I take it this is to-do with clc_ClientInfo? If so, what's the best way of updating that value?

Doesn't work

Server is telling us we can connect (2x)
Sent connect packet
Received first ingame packet
Unhandled Message: 1

Changed the code to ignore the second "Server is telling us we can connect" message. After that the client showed up as connecting to the server but eventually drops once the Unhandled message gets printed.

Console hang

Before connecting to the server the application hangs and doesn't do anything until i interact with the console by pressing enter.

e-mail

Hello, I have sent you an email regarding a very important matter, please send me a reply to it.

UTF8 Support

This does not enable utf8 support in the console
Fix - SetConsoleOutputCP(CP_UTF8);

Unsure how to connect

I suppose it's something like this uh?
leysourceengineclient 31.213.243.248 27005 MyInGameUsername

Am I doing something wrong?

Edit: I have to learn reading, it's an ability that apparently I'm missing.

Invalid usage

Invalid usage in readme: you need to put 4000 AND a newline into appid txt, but better just tell them to copy it from the gmod folder

Bug/Error

When trying to connect to the server, the "Unhandled Message: 1" error pops up and then the bot exits the server

Crashing upon starting

Seems to be at the following line it crashes:

steamuser->GetAuthSessionTicket(steamkey, STEAM_KEYSIZE, &keysize);

I'm logged into steam and it owns Garry's Mod, so I'm unsure why this isn't working. It was previously working fine until a couple weeks ago. Something updated possibly?

tf2 compatibility?

"
Challenge: 1655574393__17678352|Auth: 3|SKey: 0|VAC: 0
Connection refused! [#GameUI_ServerRejectSteam]
Reconnecting..
"

I get this even when using appid 440

"
S3: Client connected with invalid ticket: UserID: 655
"

And this is on the server side.

It works fine for Gmod, can I get steps to make it work for TF2?

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.