Staredit Network > Forums > General StarCraft > Topic: Reading StarCraft Packets
Reading StarCraft Packets
Mar 29 2016, 1:09 am
By: jjf28  

Mar 29 2016, 1:09 am jjf28 Post #1

Cartography Artisan

Working with WinPcap I've developed a basic reader for packets (currently it's reading IPv4, UDP and TCP packets on ports 6112-6119). The code can be found on GitHub, you must have WinPcap installed on the devices running such programs.

Note that this project is for reading packets only; it is not intended for intercepting/modifying/sending packets. While the example code is setup for StarCraft it can be easily altered for listening to most any type of traffic. This repository is meant for generic packet listening code, please make different ones if you intend to make StarCraft-specific readers (PacketReader uses the MIT licence - no restrictions on what you're allowed to do with the code).

Documentation for bnet traffic can be found at https://bnetdocs.org/

I had a request for this kind of thing a while back though I can't recall where (or if this was the type of listener requested), nonetheless I'm happy to have this done :)





Post has been edited 1 time(s), last time on Mar 29 2016, 1:14 am by jjf28.



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Mar 29 2016, 10:13 pm NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Quote from jjf28
currently it's reading IPv4, UDP and TCP packets on ports 6112-6119
I'm curious, does it actually intercept port 6113+ packets when you connect with a bw client? Because I thought you really only need port 6112 and the rest is for diablo and wc.




Mar 29 2016, 10:44 pm jjf28 Post #3

Cartography Artisan

Quote from NudeRaider
Quote from jjf28
currently it's reading IPv4, UDP and TCP packets on ports 6112-6119
I'm curious, does it actually intercept port 6113+ packets when you connect with a bw client? Because I thought you really only need port 6112 and the rest is for diablo and wc.

My loose understanding is 6112 is used by default, but under certain not-well-defined conditions (such as multiple people trying to play from the same IP) it tries higher numbered ports (supporting source).



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Mar 30 2016, 5:34 am iCCup.xboi209 Post #4



Quote from jjf28
Quote from NudeRaider
Quote from jjf28
currently it's reading IPv4, UDP and TCP packets on ports 6112-6119
I'm curious, does it actually intercept port 6113+ packets when you connect with a bw client? Because I thought you really only need port 6112 and the rest is for diablo and wc.

My loose understanding is 6112 is used by default, but under certain not-well-defined conditions (such as multiple people trying to play from the same IP) it tries higher numbered ports (supporting source).
No, StarCraft will use port 6112 unless another instance of StarCraft is already running on the same computer, then the second StarCraft instance will increment the port number. Also, StarCraft can be set to use any port as specified by the Game Data Port entry in the registry.



None.

Mar 30 2016, 5:45 am jjf28 Post #5

Cartography Artisan

Ah, thanks for clarifying



TheNitesWhoSay - Clan Aura - github

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Roy, jun3hong