Page 1 of 1

Dev Chat: 10/21/2013 - Packets/Strings/Encryption

Posted: Mon Oct 21, 2013 9:10 pm
by John Adams
[quote]Session Start: Mon Oct 21 13:55:57 2013
[14:10] <@Xinux_Work> Hope you don't mind i tweaked what you did Scat with the code i tried to keep everything together where i had to adjust
[14:10] <Scatman> not at all!
[14:11] <~john> haha, hard-coding gives JA the itchy skins.
[14:12] <@Xinux_Work> it's pretty ghetto they way i did it tho lol
[14:13] <@Xinux_Work> don't forget the host entry or else it won't work
[14:13] <~john> Xin I was thinking of that. Can't we just sub in our own value?
[14:14] <@Xinux_Work> yes
[14:14] <@Xinux_Work> atleast i think it will work
[14:14] <@Xinux_Work> i'm hopeing the client doesn't have a check on that address
[14:14] <~john> like we do with eq2's zoneinfomsg, i think we put in our own details.
[14:15] <~john> i saw no hits to external addy's when running the VGClient.exe connecting to my local login.
[14:15] <@Xinux_Work> for now doing local testing it was just easier to add the line to my host file

[14:19] <@Scatman> so it doesn't really look like a whole lot changed
[14:20] <@Xinux_Work> combine the first 3 packets then added on the the second SOE 09 opcode and changed the packet sequence
[14:21] <@Scatman> did the combining of the first 3 packets matter?
[14:22] <@Xinux_Work> it may not have because i forgot to change the packet sequence
[14:22] <@Xinux_Work> it shouldn't have to tell you the truth
[14:23] <@Scatman> yeah i wouldn't think so
[14:23] <@Xinux_Work> i was just copying the packet exactly from the logs
[14:24] <@Xinux_Work> we will also need a chuck server and probally a social server at some point also
[14:24] <@Xinux_Work> but that is a long way away
[14:24] <@Scatman> yeah i kinda figured we would
[14:24] <@Scatman> chunk=zoneserver right?
[14:24] <@Xinux_Work> yup
[14:24] <@Scatman> strange word
[14:24] <@Xinux_Work> social is chat and stuff
[14:25] <@Xinux_Work> chunk is from the unreal engine
[14:25] <@Scatman> oh
[14:26] <~john> we can certainly name stuff however makes sense to us, though I am leaning towards the common VG:SOH terminology. However, even in their postings they call it chunk OR zone, depending who wrote it
[14:27] <@Scatman> yeah i'm fine with using their terminology
[14:27] <@Scatman> less confusing
[14:34] <@Scatman> ok so i need to add an entry in my hosts file to redirect
[14:34] <@Scatman> or we can just change the packet?
[14:35] <@Scatman> and that packet is the world list?
[14:35] <@Scatman> ist hat a character? blahh
[14:35] <@Scatman> or 'lahh'
[14:35] <~john> he lost his B. no one knows where it went.
[14:35] <@Scatman> lol
[14:35] <~john> and yes, the end of that packet.
[14:37] <@Scatman> ok
[14:37] <@Xinux_Work> you need to add the address i put in the post
[14:37] <@Xinux_Work> to your host file
[14:38] <@Scatman> ok
[14:39] <@Scatman> i'd rather just change the packet me thinks
[14:39] <@Xinux_Work> that should work also
[14:39] <@Xinux_Work> if you have a domain name you can point it to
[14:40] <@Xinux_Work> it has to be a name address
[14:40] <@Scatman> kk
[14:43] <@Xinux_Work> and your shortcut needs to have that sessionid

[14:44] <~john> is it a bad sign when the elastic on your shorts has no more stretch when pulled up over your belly?
[14:44] <@Xinux_Work> yes
[14:44] <@Scatman> lol
[14:44] <~john> That reminds me, i need to order pizza.
[14:44] <@Xinux_Work> yup that is why i restarted my diet last week
[14:44] <~john> my problem isn't diet. it's sitting at this fucking computer 18 hours a day

[14:44] <@Scatman> so what's so special about that sessionid?
[14:45] <@Xinux_Work> if the sessionid between the server and client do not match the client will close
[14:46] <@Scatman> ok
[14:48] <~john> scat, not to do this now, but eventually Login will get that --sessionid from the client (whatever it is) and use it in the packet. the sessionid in the Launcher is generated by a php_session() call on the login script.
[14:51] <@Scatman> ok
[14:51] <@Scatman> ok cool so there's the character create packet
[14:53] <~john> I also learned that the hour I spent goofing around in VG game on Flarney, is probably useless packet data. I used EQ2's hacked collector, and Xinux informs me it's not right
[14:53] <~john> so he posted the wpeproblah whatever tool.
[14:53] <@Scatman> ahh
[14:53] <~john> i'm sure Collector is "close enough" for some things, but if you feel mystified, it's probably collector damage.
[14:54] <@Xinux_Work> it need's to be tweaked
[14:56] <@Xinux_Work> packet wise it is pretty good except for stripping the size sometimes in the middle opf the packet and the header need's work
[14:57] <~john> yeah and the re-assembling of fragmented packets? don't we need to observe those cleanly?
[14:58] <@Scatman> yes
[14:58] <@Scatman> so a lot of these strings don't have sizes
[14:58] <@Scatman> they are just nul-terminated
[15:00] <~john> they do it both ways, yes?
[15:05] <@Scatman> yep

[15:55] <@Scatman> so i think i'm going to need to create a null-terminated string data struct type
[15:55] <@Scatman> and also add size to datastructs
[15:56] <~john> are these nulls just in the login/connection packets, or are you finding them in gameplay packets too?
[15:57] <~john> hoping it could just be their hacked way of doing things on login
[15:58] <@Scatman> looks like they have some in world too
[15:58] <@Scatman> 0000: 00 09 00 1E 02 00 15 02 00 00 1D 01 00 00 53 00 ..............S.
[15:58] <@Scatman> 0010: 70 00 72 00 69 00 6E 00 74 00 00 00 49 00 6E 00 p.r.i.n.t...
[15:58] <@Scatman> 74 00 00 00
[15:58] <@Scatman> ends the string
[15:58] <@Scatman> then onto the next one
[16:00] <~john> bummerpants
[16:01] <~john> how will we know? our structs xmls will define when to use 16bit string vs null terminator?
[16:01] <@Scatman> yah
[16:01] <@Scatman> it'll be another type
[16:03] <~john> woot.[/quote]

Notable finding:
[quote][16:31] <@Xinux_Work> well the good thing so far if there was any encryption the hard codeing of packets wouldn't have worked
[16:33] <@Xinux_Work> can actually play with the data to visual,level,class etc etc to try and figure some of the packet out
[16:33] <~john> you need a /test command!
[16:34] <~john> oh wait, there's no world..
[16:34] <@Xinux_Work> can just take the hard coded packets and edit the data there for now
[16:37] <~john> wow, i had no idea you could do that!
[16:37] * john is being sarcastic
[16:38] <@Xinux_Work> ..|..[/quote]

[quote][19:25] <@Scatman> ok. NUL-Termianted strings and size=<> time!
[19:25] <@Scatman> bastards
[19:57] <@Scatman> xin or john
[19:57] <@Scatman> do either of yuo know if a null-terminated string in a packet is empty, is the null terminator included?
[19:57] <@Scatman> not sure how else we'd know if it was set or not
[21:09] <~john> guessing, but if the value in hex is 00 00, that looks kinda null ish? maybe it's interpreted as such?
[21:10] <~john> in other words, I have no idea, but I am off to bed. I got 2 hrs sleep last night and am starting to see spaceships flying out of my lamps. night!

[02:51] <@Scatman> yeah 00 00 is a null-terminator for wide strings[/quote]