|
You last visited: Today at 19:56
Advertisement
[Question] The purpose of this is...?
Discussion on [Question] The purpose of this is...? within the CO2 Private Server forum part of the Conquer Online 2 category.
04/06/2011, 02:42
|
#16
|
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
|
Quote:
Originally Posted by Spirited
K, just making sure it isn't something with a meaning that I'm not aware of.
EDIT: You have a lot of things like that in your code Impulse... o.o
Code:
string IP = wr._socket.RemoteEndPoint.[COLOR="Red"]ToString()[/COLOR].Split(':')[0].[COLOR="Red"]ToString()[/COLOR];
|
Code:
string IP = ((IPEndPoint) wr._socket.RemoteEndPoint).Address.ToString();
|
|
|
04/06/2011, 05:33
|
#17
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Quote:
Originally Posted by _tao4229_
int[] i = new int[0];
Non null array with 0 length.
|
You're right. There is a possibility that, but it doesn't matter what key1 is because it's (forgive my terminology...) reassigned 3 lines below that.
Code:
public static void Initialization()
{
if (_key1 != null)
if (_key1.Length != 0)
return;
byte i_key1 = 0x9D, i_key2 = 0x62;
_key1 = new byte[0x100];
_key2 = new byte[0x100];
for (int i = 0; i < 0x100; i++)
{
_key1[i] = i_key1;
_key2[i] = i_key2;
i_key1 = (byte)((0x0F + (byte)(i_key1 * 0xFA)) * i_key1 + 0x13);
i_key2 = (byte)((0x79 - (byte)(i_key2 * 0x5C)) * i_key2 + 0x6D);
}
}
So... it should really look like this:
Code:
public static void Initialization()
{
byte i_key1 = 0x9D, i_key2 = 0x62;
_key1 = new byte[0x100];
_key2 = new byte[0x100];
for (int i = 0; i < 0x100; i++)
{
_key1[i] = i_key1;
_key2[i] = i_key2;
i_key1 = (byte)((0x0F + (byte)(i_key1 * 0xFA)) * i_key1 + 0x13);
i_key2 = (byte)((0x79 - (byte)(i_key2 * 0x5C)) * i_key2 + 0x6D);
}
}
|
|
|
04/06/2011, 09:02
|
#18
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Quote:
Originally Posted by _tao4229_
Under that assumption then the first if is "really useless" as well.
|
Nah, I don't think so, it just stops the generation of the keys so they won't be generated twice.
|
|
|
04/06/2011, 09:11
|
#19
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Quote:
Originally Posted by -impulse-
Nah, I don't think so, it just stops the generation of the keys so they won't be generated twice.
|
'm not flaming, just curious because I don't often see the full picture. If you have to invoke the void, then how could it be generated twice?
|
|
|
04/06/2011, 09:27
|
#20
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Based on what you have posted fang, the check returns and doesnt re-compute the key if Key1 has a value, saves time.
|
|
|
04/06/2011, 09:31
|
#21
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Quote:
Originally Posted by Korvacs
Based on what you have posted fang, the check returns and doesnt re-compute the key if Key1 has a value, saves time.
|
But I'm confused, the key isn't assigned a value until the Initialization process. It will never hit that return unless it's spontaneously invoked ._.
|
|
|
04/06/2011, 09:51
|
#22
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Spirited
But I'm confused, the key isn't assigned a value until the Initialization process. It will never hit that return unless it's spontaneously invoked ._.
|
It depends really, personally i wouldn't want the keys to be the same for every client anyway, but you can set it up so that it uses the same keys. I assume due to that snippet that the class and keys are static and that its only defined once and then initialization is called whenever a client logs in, if thats the case then the method is efficient because it doesnt re-create the keys.
|
|
|
04/06/2011, 09:54
|
#23
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Quote:
Originally Posted by Spirited
But I'm confused, the key isn't assigned a value until the Initialization process. It will never hit that return unless it's spontaneously invoked ._.
|
Retards usually tend to test things and forget, and so we have to make sure they won't waste time with finding what's wrong...(lol).
You are right Fang, if it is not spontaneously invoked the checks won't be needed, the call should be made once at the server start up.
|
|
|
04/06/2011, 09:56
|
#24
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Korvacs, you have permission to decide when to close this thread.
Thanks for the help you two. I know what I'm doing next.
|
|
|
04/06/2011, 09:58
|
#25
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Spirited
Korvacs, you have permission to decide when to close this thread.
Thanks for the help you two. I know what I'm doing next.
|
I had permission anyway, but thanks..?
|
|
|
04/06/2011, 10:07
|
#26
|
elite*gold: 0
Join Date: Jan 2011
Posts: 470
Received Thanks: 97
|
Quote:
Originally Posted by Korvacs
I had permission anyway, but thanks..?
|
Yah, i guess you do... .-.
I meant you can close it unless you have purpose for this thread being left open. I'm going to sleep in a few so I probably won't check back here until tomorrow.
|
|
|
 |
|
Similar Threads
|
The purpose of this site.
07/11/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 8 Replies
The purpose of this site was to share any hacks ? or Just an strategic playing the Grand Chase ?
Dude, it is for SHARING! not like a wrong thread or wrong post .
If some people has the mistakes, then delete it. Not by posting a thread closure.
For what? For earning a thanks ?
I would rather thank the one who shares the hack or cheat willingly . .
|
portablitiy purpose
11/03/2009 - Soldier Front Philippines - 3 Replies
in case i dont have my FLASH DRIVE. i got this..
|
All Purpose Bot - Farmer John
04/23/2009 - WoW Bots - 112 Replies
Farmer John, custom made World of Warcraft bot. Has all horde waypoints set up and can level a character from 1-70. Has alliance waypoints up to 40, will be adding rest of them this week. Auto trains, auto sells, auto repairs, auto skins. Have leveled a druid with it to 62.5 in about 3 weeks and made 3950g. You'll never have to buy gold, which will pay for the program itself. Developed by me personally, currently undetected for 7 months (never been affected by a ban wave).
-HideObjects Hack:...
|
All times are GMT +1. The time now is 19:57.
|
|