Page 1 of 1

Dev Chat: 01/29/2014 - Collector/Packets

Posted: Wed Jan 29, 2014 6:55 pm
by John Adams
Just some conversation about the Collector, got it working with some discoveries, and initial Packet Analysis. There also appears to no longer be a Social server (for Chat)

[quote]Session Start: Wed Jan 29 00:57:44 2014
[00:57] <@Xinux> i got it working no idea why this is working tho
[00:57] <@Xinux> if (bFromServer && m_pClientRC4) {
[00:57] <@Xinux> SendCBData(GetOpcodeString(pDataPtr + 1), pData,
[00:57] <@Xinux> nLength, nOffset, srcAddr, dstAddr,
[00:57] <@Xinux> bFromServer);
[00:58] <@Xinux> well i kinda do sorta but not really
[01:07] <@Xinux> commited change and new collector

[06:49] <~john> [00:58] <@Xinux> well i kinda do sorta but not really
[09:59] <~john> yo, to anyone conscious.
[10:04] <~john> Xinux viewtopic.php?p=431#p431

[12:30] <@Xinux_Work> ok this is nice to know
[12:30] <@Xinux_Work> inorder to capture chat you must have the collector running before you start the game
[12:31] <~john> ahh, is it that Social Server thing?
[12:31] <@Xinux_Work> actually it look's like it is coming from the world/chunk server now
[12:32] <@Xinux_Work> think they combined some stuff
[12:32] <~john> oh so maybe they ditched that. which would be great.
[12:32] <@Xinux_Work> lvsvgo-login-01.vanguardsoh.net [69.174.203.28] LoginServer 2
[12:32] <@Xinux_Work> lvsvgo-01-01.vanguardsoh.net [69.174.203.8] WorldServer/Chunk 2 3 5 6
[12:32] <@Xinux_Work> lvsvgo-01-13.vanguardsoh.net [69.174.203.20] ZoneServer 1 2
[12:32] <~john> just weird that Chat doesn't come in the packets without pre-login?
[12:32] <@Xinux_Work> my guess is it opens a seperate stream at startup and if the collector isn't there for that stream it doesn't know it exists

[14:28] <Scatman> GOOD AFTERNOON EFFERS!
[14:31] <@Xinux_Work> got the collector reading client -> server packets
[14:31] <@Xinux_Work> give you a chance to catch up on irc
[14:34] <Scatman> awesome!
[14:34] <Scatman> good job
[14:34] <@Xinux_Work> not completly sure why it works but it does
[14:35] <Scatman> lol oh well
[14:35] <@Xinux_Work> added if (bFromServer && m_pClientRC4) {
[14:36] <@Xinux_Work> since m_pClientRC looked just for client packets figured i would try that
[14:39] <Scatman> ahh
[14:45] <Scatman> xin i think you just answered my question
[14:45] <Scatman> and pieced everything together for me
[14:45] <Scatman> those next 4 bytes have to be the 0x09 opcode

[14:54] <Scatman> so is that a server type ID?
[14:54] <@Xinux_Work> i think so
[14:55] <@Xinux_Work> atleast that is what it look's like to me
[14:55] <Scatman> yeah
[14:55] <Scatman> me too
[14:56] <Scatman> i wonder if it matters if it's coming from or going to
[14:56] <@Xinux_Work> easy enough to check in the log
[14:59] <Scatman> maybe i'll just put it in as a packetstruct config element
[14:59] <Scatman> name="" opcode="" serverId=""
[15:04] <Scatman> 0000: 00 09 00 00 03 00 09 00 00 00 53 4F 45 5F 4C 4F ..........SOE_LO
[15:04] <Scatman> 0010: 47 49 4E 10 00 00 00 44 57 36 5A 65 36 69 36 6E GIN....DW6Ze6i6n
[15:04] <Scatman> 0020: 38 56 79 62 43 68 63 C0 72 8VybChc.r
[15:04] <Scatman> now that packet messes up what we think
[15:05] <Scatman> guess i'll make it optional
[15:05] <Scatman> i feel like xinux. pasting packets and talking to myself
[15:05] <@Xinux_Work> lol
[15:05] <@Xinux_Work> that looks right
[15:06] <@Xinux_Work> 03 00 then the opcode just happens to be 09 00 00 00
[15:06] <@Scatman> hmmm
[15:06] <@Scatman> sony, those slick bastards. making the string length 9 and the opcode 9
[15:07] <@Scatman> so then char array, size=9
[15:07] <@Scatman> BAM
[15:07] <@Scatman> let's code this shit
[15:07] <~john> Can we raid yet?
[15:07] <@Scatman> lol
[15:07] <~john> hey, want me to commit my changes? Just a few more things to worldlist.
[15:07] <@Scatman> sure
[15:09] <@Xinux_Work> humm that packet is different then the rest actually
[15:09] <~john> committed.
[15:09] <@Xinux_Work> 00 09 00 00 03 00 09 00 00 00 53 4F 45 5F 4C 4F ..........SOE_LO
[15:09] <@Xinux_Work> 47 49 4E 10 00 00 00 41 46 66 55 36 59 4B 42 34 GIN....AFfU6YKB4
[15:09] <@Xinux_Work> 62 31 4C 44 7A 47 41 D5 DB b1LDzGA..
[15:09] <@Xinux_Work> that is the full packet nothing cut off
[15:10] <@Scatman> thanks xin
[15:10] <@Xinux_Work> no unicode i bet that is like the opcodes 1 - 10ish on eq2
[15:14] <@Xinux_Work> just need to handle that packet the same way eq2 does i think
[15:15] <@Scatman> yeah xin

[15:16] <@Scatman> ok i'm calling the 0x01,0x02,0x03,0x05,0x09 and such Protocol Opcodes
[15:16] <@Scatman> and the 4 byte ones for ProtocolOpcode will be called PacketOpcodes
[15:16] <@Scatman> for ProtocolOpcode 0x09
[15:16] <@Scatman> does that make sense?
[15:16] <@Xinux_Work> yup
[15:17] <@Scatman> k
[15:17] <@Scatman> i'm notoriously bad at naming things, right john?
[15:17] <@Xinux_Work> well does it make sense to john?
[15:17] <@Scatman> DatabaseNew
[15:17] <~john> casted_on
[15:18] <~john> Xinux, I haven't been following too closely on where the 0x01,0x02,0x03,0x05,0x09 actually are. I saw Scat's post, but thought he was sleep-typing.
[15:18] <~john> you talking about the first bytes? 0x00 0x09?
[15:18] <@Scatman> the 0x01,0x02,0x03,... are the first 2 bytes
[15:18] <@Scatman> yeah
[15:19] <@Scatman> they're always the first 2 bytes
[15:19] <~john> does this equate to this at all? http://wiki.vgoemulator.net/Docs/Backup ... _Breakdown
[15:20] <@Scatman> yeah, directly
[15:20] <~john> k, then I follow
[15:20] <@Xinux_Work> then you have the packets where it didn't get stripped
[15:20] <@Xinux_Work> –- OP_Unknown_46 --
[15:20] <@Xinux_Work> 1/29/2014 11:38:58
[15:20] <@Xinux_Work> 69.174.203.14 -> 10.15.155.168
[15:20] <@Xinux_Work> 0000: 00 09 00 7E 02 00 2E 00 00 00 10 00 00 00 D0 07 ...~............
[15:20] <@Xinux_Work> 0010 00 00 0B 00 00 00 78 04 00 00 00 00 00 00 ......x.......
[15:21] <@Scatman> yeah i can pretty easily tell which ones got stripped or not
[15:21] <@Scatman> 0x00 0x09 = ProtocolOpcode
[15:21] <@Scatman> 0073=seq
[15:21] <@Scatman> 2000=server id
[15:21] <@Scatman> 2e000000=packet opcode
[15:22] <@Scatman> yeah i believe it strips it when the packets are combined
[15:22] <@Scatman> and/or fragmented?
[15:22] <@Xinux_Work> sounds right
[15:26] <@Scatman> ok well hang on here...
[15:26] <@Scatman> PacketStructs will always be ProtocolOpcode=0x09
[15:27] <@Scatman> so i really only need 1 opcode in packet structs, which is the 32bit one
[15:42] <@Xinux_Work> not sure if you saw this Scat
[15:42] <@Xinux_Work> [11:30] <@Xinux_Work> ok this is nice to know
[15:42] <@Xinux_Work> [11:30] <@Xinux_Work> inorder to capture chat you must have the collector running before you start the game
[15:42] <@Scatman> yeah i saw that
[15:50] <@Scatman> yeah?

[16:00] <~john> SCAT! Whatcha doin?
[16:00] <@Scatman> coding!
[16:00] <@Scatman> whats up
[16:02] <~john> just reading your reply to me on FB... so the VG Protocol is different than the SOE Protocol?
[16:03] <~john> I'm assuming since you replied hours ago, you answered your own questions lol
[16:03] <@Xinux_Work> yes and no
[16:03] <@Scatman> well, what i meant was: in the 0x09 opcode there is data
[16:03] <@Scatman> VG (and other SOE games) structure their data differently
[16:03] <@Scatman> within the 0x09 opcode
[16:04] <~john> ahh ok. i figured because it was a Sigil game first, it might not be SOE at all lol
[16:04] <~john> maybe that's just mostly standard though
[16:04] <@Scatman> yeah unless they just used SOE's proto
[16:04] <@Scatman> or changed it
[16:05] <@Scatman> *shrug*
[16:07] <~john> yeah i probably shouldn't be adding any code right now. it will just get in your way I can wait a bit longer, pick on Xinux some more.
[16:08] <@Scatman> heh no problem

[18:48] <~john> Fattening up the guide a little more viewtopic.php?p=388#p388
[18:48] <~john> Still waiting for Xinux to give me the go-ahead on Collector
[18:49] <theFoof_> nice
[18:52] <@Xinux_Work> Waiting to scat to tell me if there is anything else that need's to be fixed with it
[18:55] <~john> howdy eq2emu team [/quote]

Zcoretri, Jabantiz and theFoof from EQ2Emulator.net joins the VGOEmulator team (part-time)