How add extra data in sendtoservernew

09/08/2022 00:21 NicolasG_99#1
What's up, I'm trying to add an extra data when try login, I want to add an extra data but I want to do it inside sendtoservernew, not when forming the package as such, but the reality is that my knowledge of c++ is really limited, I wanted to know if someone could educate me on the subject, what I have tried so far has not given results, basically inside sendtoservernew I am doing this:
Code:
int nMessage = 512;

CNetworkMessage tmpMessage;
tmpMessage = nmMessage;

tmpMessage.nm_pubPointer[sizeof(tmpMessage.nm_pubPointer)+1] = (UBYTE)&nMessage;
tmpMessage.nm_slSize += sizeof(nMessage);
before loop for seedencrypt. buts its not work... the login package has 6 iterations, but after adding my code it doesn't increase the iterations to 7, also try:
Code:
tmpMessage.Write(&nMessage, sizeof(nMessage));
but i didn't get any result, can someone give me a hand :feelsbadman:
09/13/2022 17:34 NicolasG_99#2
i'm continue trying buts continue having issues, i don't know what's is wrong... i try too with

Code:
char nMessage[4] = "512";
SLONG slSize = strlen(nMessage) + 1;
memcpy(tmpMessage.nm_pubPointer + 6, &nMessage, slSize);
tmpMessage.nm_pubPointer += slSize;
tmpMessage.nm_iBit = 0;
tmpMessage.nm_slSize += slSize;
buts this code add nMessage to username, i don't understand how "array" of unsigned char works, or how lc code use it. :feelsbadman:
09/14/2022 09:45 Wizatek#3
If you're only using it for 1 packet, to login, why would you want to change it for all packets?
09/14/2022 17:08 NicolasG_99#4
Quote:
Originally Posted by Wizatek View Post
If you're only using it for 1 packet, to login, why would you want to change it for all packets?
Actually my intention is to try to add some security to prevent package editors (At least the basics/Generics), use the example in the login package because it is the first in the game...
09/14/2022 19:11 Wizatek#5
You are starting a battle you cannot win.
Instead of preventing packet editors to be used, you should make it so that edited packets cannot be abused to get a advantage
09/14/2022 19:27 NicolasG_99#6
Quote:
Originally Posted by Wizatek View Post
You are starting a battle you cannot win.
Instead of preventing packet editors to be used, you should make it so that edited packets cannot be abused to get a advantage
The devs does something and eventually the hacker gets past it, in the end everything is vulnerable, I know. But my idea is not to start a "war" against the possible attacker, I just want to get the basic package editor that is published on the internet out of the way, by adding an extra value inside of every packaque sended to server...

edit: Anyway, small clarification, this is a hobby for me. I don't have a server so this isn't critical, I'd just like to learn...