|
You last visited: Today at 21:33
Advertisement
Packet Info.
Discussion on Packet Info. within the CO2 Private Server forum part of the Conquer Online 2 category.
01/19/2010, 07:35
|
#1
|
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
|
Packet Info.
I heard that the lotf packets are very poorly coded, is that true? And what is the downfall of unsafe code?
Anyway to convert them to a better coded packet, like "Packet.WriteUint16(X);" instead of the *(p-1) = ***". i think i might know when it says like "*(p-1) = (uint)***" or w/e, but what is its just like *(p-1) = ***". Is that just WriteByte?
That may be confusing, but the first question is what I really wanna know.
|
|
|
01/19/2010, 07:37
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by StarBucks
I heard that the lotf packets are very poorly coded, is that true? And what is the downfall of unsafe code?
Anyway to convert them to a better coded packet, like "Packet.WriteUint16(X);" instead of the *(p-1) = ***". i think i might know when it says like "*(p-1) = (uint)***" or w/e, but what is its just like *(p-1) = ***". Is that just WriteByte?
That may be confusing, but the first question is what I really wanna know.
|
Yes, lotf is poorly coded period.
|
|
|
01/19/2010, 07:41
|
#3
|
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
|
Quote:
Originally Posted by Hepatitis C
Yes, lotf is poorly coded period.
|
I do realize, but what part, and why.
|
|
|
01/19/2010, 07:47
|
#4
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
|
Quote:
Originally Posted by StarBucks
I do realize, but what part, and why.
|
Lol all of it ftl.
It is super unstable.
Tanel's technique is just plain horrible :/
|
|
|
01/19/2010, 09:00
|
#5
|
elite*gold: 1
Join Date: Dec 2009
Posts: 126
Received Thanks: 17
|
ya, it takes alot fix to fix lotf.
in my server i fixed alot things, but still need alot.
here is what i fixed so far i remember:
Quote:
Damage
GuildWar The one i released
ArtisanWind
PK
Gear dissapear
Stamina
Some NPC's that was bad
Items from shoppingmall (Ninja amulet etc.)
Reborn
Potency
There is some more, i just cant remember =]
|
|
|
|
01/19/2010, 09:44
|
#6
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Packets arent too bad coded. just a unssafe class... use them but stay with your packethandler and it will result good.
|
|
|
01/19/2010, 09:48
|
#7
|
elite*gold: 1
Join Date: Dec 2009
Posts: 126
Received Thanks: 17
|
Quote:
Originally Posted by ~Yuki~
Packets arent too bad coded. just a unssafe class... use them but stay with your packethandler and it will result good.
|
i wouldnt say the packets are bad either.
The bad things in lotf is more calculations and so on.
|
|
|
01/19/2010, 12:01
|
#8
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Just so you know this:
Code:
*(ushort*)PTR = (ushort)Buffer.Length;
*((ushort*)(PTR + 2)) = 2030;
*((uint*)(PTR + 4)) = npc.StaticID;
*((ushort*)(PTR + 8)) = (ushort)npc.Cords.Position.X;
*((ushort*)(PTR + 10)) = (ushort)npc.Cords.Position.Y;
*((ushort*)(PTR + 12)) = (ushort)(npc.StaticID + (byte)npc.Direction);
*((ushort*)(PTR + 14)) = npc.Interaction;
Is faster than this:
Code:
PacketBuilder Packet = new PacketBuilder(new byte[20]);
Packet.WriteUInt16(Packet.Packet.Length);
Packet.WriteUInt16(2030);
Packet.WriteUInt32((uint)Type);
Packet.WriteUInt16(X);
Packet.WriteUInt16(Y);
Packet.WriteUInt16(SubType);
Packet.WriteUInt16(Dir);
Packet.WriteUInt32((uint)Flag);
|
|
|
01/19/2010, 16:29
|
#9
|
elite*gold: 80
Join Date: Sep 2007
Posts: 642
Received Thanks: 168
|
Quote:
Originally Posted by Korvacs
Just so you know this:
Code:
*(ushort*)PTR = (ushort)Buffer.Length;
*((ushort*)(PTR + 2)) = 2030;
*((uint*)(PTR + 4)) = npc.StaticID;
*((ushort*)(PTR + 8)) = (ushort)npc.Cords.Position.X;
*((ushort*)(PTR + 10)) = (ushort)npc.Cords.Position.Y;
*((ushort*)(PTR + 12)) = (ushort)(npc.StaticID + (byte)npc.Direction);
*((ushort*)(PTR + 14)) = npc.Interaction;
Is faster than this:
Code:
PacketBuilder Packet = new PacketBuilder(new byte[20]);
Packet.WriteUInt16(Packet.Packet.Length);
Packet.WriteUInt16(2030);
Packet.WriteUInt32((uint)Type);
Packet.WriteUInt16(X);
Packet.WriteUInt16(Y);
Packet.WriteUInt16(SubType);
Packet.WriteUInt16(Dir);
Packet.WriteUInt32((uint)Flag);
|
Yes, i do understand that, but i someone was saying pointers aren't good to use and its what makes lotf unstable
@yuki, what do you mean stick with my PAcket handler?
|
|
|
01/19/2010, 16:55
|
#10
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Pointers are good aslong as you do it correctly.
|
|
|
01/19/2010, 18:13
|
#11
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Quote:
Originally Posted by StarBucks
Yes, i do understand that, but i someone was saying pointers aren't good to use and its what makes lotf unstable
@yuki, what do you mean stick with my PAcket handler?
|
The packethandler in lotf pretty much sux so just ues the one u already got in cofuture.
|
|
|
01/19/2010, 18:53
|
#12
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Korvacs
Pointers are good aslong as you do it correctly.
|
So how is LOTF's use incorrect?
|
|
|
01/19/2010, 19:22
|
#13
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Kiyono
So how is LOTF's use incorrect?
|
They do/did things like:
Code:
byte[] Buffer = new byte[20];
fixed (byte* PTR = Buffer)
{
*(ushort*)PTR = (ushort)Buffer.Length;
*((ushort*)(PTR + 2)) = 2030;
*((uint*)(PTR + 4)) = npc.StaticID;
*((ushort*)(PTR + 8)) = (ushort)npc.Cords.Position.X;
*((ushort*)(PTR + 10)) = (ushort)npc.Cords.Position.Y;
*((ushort*)(PTR + 12)) = (ushort)(npc.StaticID + (byte)npc.Direction);
*((uint*)(PTR + 20)) = npc.Interaction;
}
So that the last uint was not dumped into the buffer, it would be dumped into invalid memory and you would get memory errors and memory leaks.
|
|
|
01/19/2010, 21:14
|
#14
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Korvacs
They do/did things like:
Code:
byte[] Buffer = new byte[20];
fixed (byte* PTR = Buffer)
{
*(ushort*)PTR = (ushort)Buffer.Length;
*((ushort*)(PTR + 2)) = 2030;
*((uint*)(PTR + 4)) = npc.StaticID;
*((ushort*)(PTR + 8)) = (ushort)npc.Cords.Position.X;
*((ushort*)(PTR + 10)) = (ushort)npc.Cords.Position.Y;
*((ushort*)(PTR + 12)) = (ushort)(npc.StaticID + (byte)npc.Direction);
*((uint*)(PTR + 20)) = npc.Interaction;
}
So that the last uint was not dumped into the buffer, it would be dumped into invalid memory and you would get memory errors and memory leaks.
|
So what would be the correct way of doing it since it looks pretty much the same as your example.
//edit I think that I see what the problem is, uint uses 4 bytes making it 22 bytes total while it was stated before that 20 was the max causing the 2 leftover bytes to be dumped into invalid memory.
This means that ushort had to be used cause that uses 2 bytes which would end up at 20, correct?
|
|
|
01/19/2010, 22:19
|
#15
|
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
|
Quote:
Originally Posted by StarBucks
Yes, i do understand that, but i someone was saying pointers aren't good to use and its what makes lotf unstable
@yuki, what do you mean stick with my PAcket handler?
|
what makes lotf unstable is the way they use packets. send/receive.
also just to say somehow i never had a stability problem... it always worked for me i could keep it on for days...
|
|
|
 |
|
Similar Threads
|
[Info] XPI (Packet editor) & HS Bypass + MSCRC Bypass for sale!
02/06/2010 - MapleStory Trading - 0 Replies
Irwin(x0r from CEF) from GGCRCBYPASS.com is selling a packet inspector, and will include:
MapleStory CRC bypass
A generic HackShield bypass(I assume that it'll work for games such as Combat Arms, Mabinogi, Dungeon Fighter, Poptag, etc..)
NOTE : Both XPI and the MsCRC bypass should work with other versions of MapleStory like EMS, MSEA, etc. The HackShield bypass should work with other games such as Combat Arms, Dungeon Fighter, Poptag, and Mabinogi.
Lifetime updates(as long as he's able...
|
[question] Packet 0x3b, picking drop. Info about number
01/24/2010 - Kal Online - 9 Replies
Hello,
I want to have the item structure with info about amount etc.
When I pick up drop and I've already own this kind of item (all countable items) the packet 3b is sent to client when sent pick packet to server.
Those packets looks like:
------- size hd ????? ev hh num
Recv - 07003b c378 5f 02 da
Recv - 07003b b17c 5f 02 db
Recv - 07003b 6572 5f 02 dc
|
[NEED INFO]Packet Editing
10/05/2007 - Dekaron - 3 Replies
i would like to get started on how to packet edit. i know that the packets sent from 2moons server is encrypted. i wanna learn how to decrypt them, edit them, and resend them.
anyone that has sites, ideas, or tuts please reply. thanks much.
P/S: i know that wpe pro is detectable by gg...i'm trying other options out there.
|
All times are GMT +1. The time now is 21:34.
|
|