Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Hacks, Bots, Cheats, Exploits & Macros
You last visited: Today at 13:13

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[METIN2_GF]New KeyAgreement + PacketEncryption

Discussion on [METIN2_GF]New KeyAgreement + PacketEncryption within the Metin2 Hacks, Bots, Cheats, Exploits & Macros forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 5
Join Date: Dec 2011
Posts: 1,083
Received Thanks: 650
[METIN2_GF]New KeyAgreement + PacketEncryption

#removed
.Verkauf´ is offline  
Thanks
6 Users
Old 01/05/2017, 00:31   #2
 
elite*gold: 0
Join Date: Jan 2013
Posts: 4
Received Thanks: 1
i don't understand but thank you.
godxavc is offline  
Old 01/05/2017, 00:50   #3

 
EasyFarm's Avatar
 
elite*gold: 281
Join Date: May 2011
Posts: 1,552
Received Thanks: 946
Nice
EasyFarm is offline  
Thanks
1 User
Old 01/05/2017, 20:28   #4
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Good job, I have some tips about your programming style though which you of course don't need to follow, but I would recommend you to do so.

You use different c/c++ types for the same variable type. For sizes you used unsigned int and size_t, I recommend using size_t, it will save you from problems that will occur when you switch to x64 bit development. And you should use the <stdint.h> types like uint32_t instead of unsigned int in general.

The other thing are magic values. The small PHP code (please use [code] tags, not [php]) you posted contains 0x41 and 0x20 so often, either you should reuse your variables that contain the value or create a constant and use that. The Activate call even seems wrong because of that, you get the data length back from Prepare, either in dataLength or agreedLength, don't use 0x41 as the argument.

And please use sizeof(keyClient) instead of the magic value 261, maybe it changes in the future and then you have to search through your code to find out why it is not working correctly because you used a magic value.
Mi4uric3 is offline  
Thanks
1 User
Old 01/05/2017, 21:54   #5
 
elite*gold: 5
Join Date: Dec 2011
Posts: 1,083
Received Thanks: 650
Quote:
Originally Posted by Mi4uric3 View Post
Good job, I have some tips about your programming style though which you of course don't need to follow, but I would recommend you to do so.

You use different c/c++ types for the same variable type. For sizes you used unsigned int and size_t, I recommend using size_t, it will save you from problems that will occur when you switch to x64 bit development. And you should use the <stdint.h> types like uint32_t instead of unsigned int in general.

The other thing are magic values. The small PHP code (please use [code] tags, not [php]) you posted contains 0x41 and 0x20 so often, either you should reuse your variables that contain the value or create a constant and use that. The Activate call even seems wrong because of that, you get the data length back from Prepare, either in dataLength or agreedLength, don't use 0x41 as the argument.

And please use sizeof(keyClient) instead of the magic value 261, maybe it changes in the future and then you have to search through your code to find out why it is not working correctly because you used a magic value.
Aye aye sir, done.
.Verkauf´ is offline  
Thanks
1 User
Reply




All times are GMT +1. The time now is 13:14.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.