Go Back   GamerzPlanet - For All Your Online Gaming Needs!! > gPotato Games > FlyFF Discussion

FlyFF Discussion Discuss anything about FlyFF in this section. FlyFF Hacks


FlyFF Packet Checksum (Client)

FlyFF Discussion


Reply
 
Thread Tools Display Modes
Old 08-03-2009, 03:47 PM   #1
nitrix
Lurker
 
Last Online: 10-05-2009 07:56 PM
Join Date: Aug 2009
Posts: 4
Rep Power: 0
Rep Points: 10
nitrix is on a distinguished road
Feedback: (0)
Points: 760.35
Bank: 0.00
Total Points: 760.35
FlyFF Packet Checksum (Client)

Hey guys! :D

I'm playing flyforfun since years and, as a programmer, I find myself pitiful to keep playing this game instead of making one but anyway XD

I would like to create a chatterbot for FlyFF. No, don't worries, I hate penya's flooder too >.< Well, I want to create an application to log shouts and maybe interact with people later, I'll see.

So here it comes. On my way to create the coolest bot ever (xD).. I'm stuck!! >__<

I just CANNOT figure out how the checksums works!

Packets are like that:
5E (Hash One ^ Session Key) (Size [Little Endian]) (Hash Two ^ Session Key) (Data)

And here's the hash i get from the server:
5E 08 00 00 00 00 00 00 00 25 54 A9 83

I know the result is supposed to looks something like that (from sniffing):
5E 92 14 56 E9 64 00 00 00 45 91 C4 78 FC 00 00 00 ...

How do I calculate them? I mean.. yes I know there's a XOR thing around it and a bit or CRC32 but I'm very lost :(

Could someone help me to achieve my goal?

According to my knowledge in programming, it isn't the program itself but the protocol that annoys me. Seriously, I just need to know what to do step-by-step with the hash (I understand better with examples) and I'll be fine.

I'm googling/programming/debugging since hours, please someone X___X

Last edited by nitrix; 08-03-2009 at 04:27 PM.
nitrix is offline   Reply With Quote
Sponsored Links
Old 08-04-2009, 05:10 AM   #2
joostp
Game Developper
 
Last Online: Today 12:46 PM
Join Date: Apr 2008
Posts: 366
Rep Power: 2
Rep Points: 25
joostp is on a distinguished road
Feedback: (0)
Points: 218,717.99
Bank: 0.00
Total Points: 218,717.99
No Message - joostp No Message - joostp 
Re: FlyFF Packet Checksum (Client)

For chatpackets you dont have to en/decrypt anything.
The funpart with flyff is that the packets are not encrypted at all!
You simply have to look out for the 0xd0 (shout) and 0x01 (chat) commands.
This is the structure for a shoutcommand. [(int)shouter_character's id][(pstr)shouter_char_name][(pstr)text]
joostp is offline   Reply With Quote
Old 08-04-2009, 12:38 PM   #3
Tombana
Registered User
 
Last Online: 10-10-2009 05:45 AM
Join Date: Feb 2009
Posts: 29
Rep Power: 0
Rep Points: 10
Tombana is on a distinguished road
Feedback: (0)
Points: 6,463.86
Bank: 0.00
Total Points: 6,463.86
Re: FlyFF Packet Checksum (Client)

Just wondering: why don't you use postmessage for saying text?
Tombana is offline   Reply With Quote
Old 08-04-2009, 03:38 PM   #4
carru
d(ñ_ñ)b
 
carru's Avatar
 
Last Online: Today 07:06 AM
Join Date: Dec 2005
Location: /dev/null
Posts: 1,077
Rep Power: 6
Rep Points: 127
carru will become famous soon enoughcarru will become famous soon enough
Feedback: (0)
Points: 2,761.59
Bank: 86,007.32
Total Points: 88,768.91
Re: FlyFF Packet Checksum (Client)

Quote:
Originally Posted by Tombana View Post
Just wondering: why don't you use postmessage for saying text?
What he's developing is an application that logs chat text and thus listens for incoming packets.

carru ~

Last edited by carru; 08-04-2009 at 03:41 PM.
carru is offline   Reply With Quote
Old 08-04-2009, 08:10 PM   #5
nitrix
Lurker
 
Last Online: 10-05-2009 07:56 PM
Join Date: Aug 2009
Posts: 4
Rep Power: 0
Rep Points: 10
nitrix is on a distinguished road
Feedback: (0)
Points: 760.35
Bank: 0.00
Total Points: 760.35
Re: FlyFF Packet Checksum (Client)

Well the application WILL interact with players, but it wont go that far if I still can't manage to log in >_>
nitrix is offline   Reply With Quote
Old 08-05-2009, 02:13 AM   #6
joostp
Game Developper
 
Last Online: Today 12:46 PM
Join Date: Apr 2008
Posts: 366
Rep Power: 2
Rep Points: 25
joostp is on a distinguished road
Feedback: (0)
Points: 218,717.99
Bank: 0.00
Total Points: 218,717.99
No Message - joostp No Message - joostp 
Re: FlyFF Packet Checksum (Client)

So youre actually thinking about actually sending packets to the server?

That will require much more than simply sniffing the packets and filtering/logging the chat/shoutpackets.
joostp is offline   Reply With Quote
Old 08-05-2009, 04:58 AM   #7
Tombana
Registered User
 
Last Online: 10-10-2009 05:45 AM
Join Date: Feb 2009
Posts: 29
Rep Power: 0
Rep Points: 10
Tombana is on a distinguished road
Feedback: (0)
Points: 6,463.86
Bank: 0.00
Total Points: 6,463.86
Re: FlyFF Packet Checksum (Client)

Yes because that's what I thought: use PostMessage for login and sending chats and you can snif packets for 'receiving' chats. And since the chat message itself isn't encrypted (only the header if i understand correctly) you won't have trouble with that.

EDIT: I just found the chat-packet function ingame.
It's really easy once you have the address. You can just do:
Code:
push ChatText;
mov ecx, constant_value;
call chatfunction;
It'll also work if you add commands like /shout to the chat text.

I can't send PM's yet but once I can i'll show you how you can find and use it.

Last edited by Tombana; 08-05-2009 at 09:18 AM.
Tombana is offline   Reply With Quote
Old 08-07-2009, 10:45 AM   #8
nitrix
Lurker
 
Last Online: 10-05-2009 07:56 PM
Join Date: Aug 2009
Posts: 4
Rep Power: 0
Rep Points: 10
nitrix is on a distinguished road
Feedback: (0)
Points: 760.35
Bank: 0.00
Total Points: 760.35
Re: FlyFF Packet Checksum (Client)

Oh well, I'm sorry if it was a bit blurry, my ultimate goal is to create a A.I bot, since I worked in the past in few huge A.I. projects, i thought it can be interesting to make a FlyFF bot. It wont be redistributed, no sources or any help because I hate script kiddies and I spent over 50$ in the game so I don't want to see an assh0le ruining the whole flyff server' economy ^^'

So again, more vividly this time, I would like to begin with a chatterbot but it will migrate to a real bot later on. I want to connect directly to the FlyFF server. I want a real handy client, not a piece of ... mixed sniffer and hook/injection >< At least, the project can progress to a OpenSource FlyFF Client for linux O.O Oh what a good idea! =]

I still need to build my own packets and the CRC32/XOR are real pain.
nitrix is offline   Reply With Quote
Old 08-07-2009, 12:13 PM   #9
Tombana
Registered User
 
Last Online: 10-10-2009 05:45 AM
Join Date: Feb 2009
Posts: 29
Rep Power: 0
Rep Points: 10
Tombana is on a distinguished road
Feedback: (0)
Points: 6,463.86
Bank: 0.00
Total Points: 6,463.86
Re: FlyFF Packet Checksum (Client)

Oh, so you want the chatbot to be completely seperate from the Neuz.exe client. I didn't understand that correctly.
Well I don't know how the XOR/CRC32 works in flyff's packet but I do know the exact function in the exe that generates it.
I still can't send PM's but once I can I'll send you some info on it.
I like the idea of your project, so if you want could I help you with it? I've been developing a private bot (similar to automation) and your project sounds like a really interesting programming challenge.

EDIT: I tried to find out how the checksums are generated. I don't know if this is any usefull to you, but the first checksum dword is the session hash (not completely sure but i think it's the session hash) xor'ed with something it calculates from the packet contents (still finding out how it's calculated) and then inverted (all bits inverted).
2nd EDIT: If some sort of value is not available it uses the lenght of the packet at the place of the first checksum dword. Might that be the case at the first packet flyff sends?
3rd edit: for the first checksum dword it only seems to be using the packet lengt for the calculation. For the 2nd checksum dword it actually uses the packet contents.

Last edited by Tombana; 08-07-2009 at 01:15 PM.
Tombana is offline   Reply With Quote
Old 08-07-2009, 04:25 PM   #10
joostp
Game Developper
 
Last Online: Today 12:46 PM
Join Date: Apr 2008
Posts: 366
Rep Power: 2
Rep Points: 25
joostp is on a distinguished road
Feedback: (0)
Points: 218,717.99
Bank: 0.00
Total Points: 218,717.99
No Message - joostp No Message - joostp 
Re: FlyFF Packet Checksum (Client)

Quote:
Originally Posted by nitrix View Post
Oh well, I'm sorry if it was a bit blurry, my ultimate goal is to create a A.I bot, since I worked in the past in few huge A.I. projects, i thought it can be interesting to make a FlyFF bot. It wont be redistributed, no sources or any help because I hate script kiddies and I spent over 50$ in the game so I don't want to see an assh0le ruining the whole flyff server' economy ^^'

So again, more vividly this time, I would like to begin with a chatterbot but it will migrate to a real bot later on. I want to connect directly to the FlyFF server. I want a real handy client, not a piece of ... mixed sniffer and hook/injection >< At least, the project can progress to a OpenSource FlyFF Client for linux O.O Oh what a good idea! =]

I still need to build my own packets and the CRC32/XOR are real pain.
Ah alright.
Ive been working on a similiar program before.
Pm me your contact details and Ill introduce you to the guy that actually continued that project.
joostp is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

All times are GMT -7. The time now is 06:31 PM.

 

Copyright ©2009, GamerzPlanet.Net
Visits: