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.
[12:54 pm]
Ultraviolet -- :wob:
[2021-10-22. : 8:31 pm]
O)FaRTy1billion[MM] -- :wob:
[2021-10-22. : 6:07 pm]
UndeadStar -- :wob:
[2021-10-22. : 12:00 pm]
Ultraviolet -- :wob:
[2021-10-22. : 10:38 am]
jjf28 -- :wob::wob:
[2021-10-22. : 10:32 am]
Zycorax -- :wob: intensifies.
[2021-10-22. : 8:51 am]
Zincoshine -- :wob:
[2021-10-22. : 4:43 am]
RdeRenato -- :wob:
[2021-10-22. : 4:43 am]
RdeRenato -- : wob :
[2021-10-21. : 4:52 pm]
jjf28 -- :wob: cause you failed to prefix your message with :wob:
Please log in to shout.


Members Online: Roy, Wing Zero, Bruce